by simplify · 8y ago · 0 comments
- ctrl+p - move cursor up one line
- ctrl+n - move cursor down one line
- ctrl+f - move cursor forward one character
- ctrl+b - move cursor back one character
- ctrl+a - move cursor to beginning of line
- ctrl+e - move cursor to end of line
- ctrl+k - delete all characters from cursor to end of line
There are a few missing useful ones (such as move by word), but you can fill them in by creating this file[1] in a specific place on your machine.[1] https://gist.github.com/gilbert/10fdd692799fc7269b50abbcfb2e...
Why not? You can use these shortcuts across OS X. That includes your web browser and any other GUI you have on your machine (I use them heavily in notational velocity).
set editing-mode vi
and get the vi bindings in everything that supports readline, e.g. the Python shell etc. There's tons more that can be customized here. You can even have it put the current vi mode in your prompt and stuff like that.https://www.gnu.org/software/bash/manual/html_node/Readline-...
2. Five of your seven shortcuts are for emacs[0], not vim.
[0]: https://www.gnu.org/software/bash/manual/html_node/Command-L...
They are also the default in most shells (bash/zsh), which also have optional vi-based bindings.
On macOS, you need to add the following to $HOME/Library/KeyBindings/DefaultKeyBinding.dict to get ctrl-w and ctrl-u to work everywhere in macOS.
{ "^w" = "deleteWordBackward:"; "^u" = "deleteToBeginningOfLine:"; }
Some folks find vim bindings to be just as bad to edit text grin
I don't actually agree: I think that vim's text-editing language is actually nicer than emacs's is. But I use emacs — with its bindings, not vim's — because after almost thirty years it's what I'm used to.
When I said "insert" I meant like, "insert mode" everywhere else but vim :)
But yes, RSI is a great plugin (as are most of tpope's plugins)
Do you know anyway to get the same behaviour on Linux and Gnome at all?