Including the Unix shell line editor, which typically supports both vi and emacs key bindings, and nothing else. Yet for some reason the default always seems to be emacs rather than vi, even on BSD (e.g. OpenBSD), and even though POSIX only mandates vi mode because "[t]he author of emacs requested that the POSIX emacs mode either be deleted or have a significant number of unspecified conditions."[1] Emacs line editing mode is more confusing for me as I use Joe (WordStar clone) which has emacs-like key combinations but with slightly different assignments. And because of this default I've never made a habit of using line editing commands; there's no way I can unlearn my Joe muscle memory, and over the years I've gotten into the habit of avoiding shell personalizations, to my detriment in this case.
[1] https://pubs.opengroup.org/onlinepubs/9699919799/utilities/s...
I like my emacs line editing mode :D
I love that control+a and command+a have different functions. I use control+k and control+a all the time while writing comments on websites, etc. Especially since I've been mapping caps-lock to control for more than a decade.
I'm not sure about this. For instance, I'm typing this message in a text box in my browser and I don't have access to vim keybindings. There are many cases where this happens (other example: google docs).
I do use vim whenever I can, but I'd say the most useful keybindings that one can learn are the ones from the OS.
I can Ctrl-C/Ctrl-X/Ctrl-V to copy/cut/paste, Ctrl-arrows to move around one word at a time, Ctrl-shift-arrows to select words, Home and End to go to the start and end of the line, etc, Ctrl-Home/Ctrl-End to move to the start and end of the text input, etc.
Those are emacs bindings. Readline uses emacs bindings by default, but it can also use vi bindings.
Unless you mean that it uses readline and so configuring it (i.e. ~/.inputrc) allows you to change the keybindings of macOS UI text fields. That'd be cool if it's the case.
Here’s another:
Very useful tool, too bad it does not support key mapping. I'd like to `nmap gj <ESC>` or the essential `nmap j gj`, because writing on small `<textbox/>` tends to wrap the content.
But both in this box and in google docs (and so many more places) you have access to the basic emacs C-* cursor movement and line manipulation bindings.
One should really know both vi and emacs style basic movement bindings. Both work in many places, sometimes it's one or the other.
> Sometimes, you edit text outside of Vim. These are sad times. Enter vim-anywhere!
https://github.com/GhostText/GhostText
GhostText extension for chrome/FF and listed $plugin for $editor means you can live edit a browser textarea in $editor with text sent in real time to browser.
Unfortunately, Google Suite(docs etc.) does not play nice and does not work.
Worth checking out.
Also for a more embedded vim experience: https://github.com/glacambre/firenvim
- google chrome
- sql server management studio
- jupyter notebook
- jupyter lab
- visual studio code
- ms visual studio
- dbeaver
- eclipse
- sublime text 2
- hackerank, iirc
Editing source code, on the other hand, benefits much more from vim, because inserting text is only part of it.
Firefox: https://www.reddit.com/r/firefox/comments/8y0q23/vim_mode_fo...
- Geany
- Sublime Text
- VS Code
- Notepad++
- micro
- ne
On top of these I usually memorize Ctrl-A and Ctrl-E for the command-line, and "i… :wq" for vim, although haven't needed the latter in a decade.
But, at the risk of branding myself a traitor, I would suggest that anyone who doesn't already have emacs shortcuts burned into their muscle memory should choose to learn the vim ones, because they're somewhat more widely supported.
(And to use doom emacs to do it.)
Also a lot of inputs use Emacs binding or a subset of it: Bash and other shells, Cisco routers, heck, even in Slack you can Crtl-a or Crtl-k.
Yeah, this is weird to me. I've seen some people list it on their resume. Why should I care what editor you use?
Let me explain: I've been an emacs person for decades now. I was never super committed to it, though. In practice, I'll use whatever editor has the best plugin for the language I'm working in. Which means that, for the longest time, I had to try and keep track of 4 or 5 different sets of editor keyboard commands. Which is too damn much for one brain, so I found that, over time, I stopped being as efficient in any editor as I was in emacs 25 years ago.
So why vim? Because every editor worth its salt has an option to use vim keybindings. So you don't have to learn 4, 5, 6 different sets of editor commands. You can learn one, and learn it well.