Ask HN: Is there an editor with insert mode and free cursor?
Looking for an editor (Linux) with insert/overwrite mode and free cursor movement, i.e. you can place cursor anywhere and start typing in any random column without having to pad lines with spaces first. This is kind of a nice feature from one of my Casio pocket organizers from the '90s. Thanks for any tips.
19 comments
Yes. It is called 'emacs', but you need to add (xterm-mouse-mode 1) to ~/.emacs.
Then it is almost amazing, because in a phone (and termux) your fingers are the mouse.
You can do scrolls with youres fingeries too, if you add
Then it is almost amazing, because in a phone (and termux) your fingers are the mouse.
You can do scrolls with youres fingeries too, if you add
(global-set-key (kbd "<mouse-5>") 'scroll-up-command)
(global-set-key (kbd "<mouse-4>") 'scroll-down-command)
Somebody should study howto turn long finger press into emacs cut/paste. Now it is regular Android cut/paste, which is little cumbersome.The 'joe' editor in 'picture draw' mode does exactly what you describe.
https://joe-editor.sourceforge.io/
https://joe-editor.sourceforge.io/
Thanks, I just tried in 4.6 and it works with the arrow cursor keys, and ^T P is the shortcut. The mouse won't work for ad hoc cursor placement though, with -mouse on the command line. Do you know if there's a workaround?
No, I don't, but 'mouse' support must also be supported by the terminal emulator you use. The joe manpage only mentions xterm, so try running it in an xterm to see if mouse support works.
Thanks, doesn't seem to work in xterm either unfortunately. I will have to look through the manual later.
To get the mouse to move the cursor beyond line endings you also have to give the -floatmouse CLI option to joe.
It also seems that you do need to enter lines before the cursor will position below the end of the file (which for an empty file is at the top of the window).
Otherwise, for me, in an xterm, with -floatmouse and -mouse activated, cursor positioning via the mouse in an xterm works just fine.
If you already have text in the file, then just -mouse allows positioning on the existing text.
It also seems that you do need to enter lines before the cursor will position below the end of the file (which for an empty file is at the top of the window).
Otherwise, for me, in an xterm, with -floatmouse and -mouse activated, cursor positioning via the mouse in an xterm works just fine.
If you already have text in the file, then just -mouse allows positioning on the existing text.
If I understand what you mean, Kate might fit the bill.
https://apps.kde.org/kate/
https://apps.kde.org/kate/
Give Micro a try: https://micro-editor.github.io/
It's insert-mode only but well-worth giving a whirl for faster edits.
It's insert-mode only but well-worth giving a whirl for faster edits.
I just tried it. You mean insert-mode only as in there's no free cursor movement without padding with spaces first, is that right? I can't seem to move the cursor around unless I'm in an already-typed-on position...
There is a setting to use vi this way (sorry not at computer), but I think it is ‘virtualedit’. I use it myself! I wish vscode would add it…
I believe the old DOS editor edit.com had this built in. If you went into insert mode.... actually.
I think even notepad has it actually, in insert mode. I can't imagine that Linux doesn't have something similar.
I think even notepad has it actually, in insert mode. I can't imagine that Linux doesn't have something similar.
That's odd, I just tried Notepad.exe in Wine and couldn't get Insert/Overwrite mode to work at all. Notepad++ has that mode, and it worked, but I can't find a way to use free cursor placement with it. LMK if you know fixes/workarounds for these.
You reminded me, I think pedit, breeze (both really good) or one of the other MS-DOS editors I used earlier this year had that now that you mention it. But better desktop integration would be needed in this case anyway...
You reminded me, I think pedit, breeze (both really good) or one of the other MS-DOS editors I used earlier this year had that now that you mention it. But better desktop integration would be needed in this case anyway...
I haven't needed it in so long but I remember doing ANSI and ASCII artwork in many of the editors and believe they had it too :) Ahhh, memories. ACiDDraw for example.....
If I understand you correctly this can be done in vim with:
set virtualedit=all
which allows cursor to be moved anywhere in normal modeOpen a file in emacs and do M-x artist-mode.
It's putting periods/dots all over my text file wherever I click. xD Not looking to start off with artistry right out the gate, will have to look at the manual, thanks for the tip for sure.