Athame – Full vim for bash and readline
github.com
github.com
But full vi has been available from the cl with readline for a long time. Not quite as nice as athame, but very easy and serviceable.
If you are in vi mode (set -o vi, or your .inputrc is so configured), then on the command line press esc to get out of insert mode and into normal mode, then type v. A full vim editor will open in the terminal, with whatever you've typed so far.
Edit, :wq to execute the command. Delete the whole buffer and :wq if you don't want to execute anything.
This won't work anywhere but the cl I don't think, so the bit about python in athame is nice.
It's basically the same as the bash built-in "fc" command, but operates on the current line instead of the last one.
Basically the only time I feel the need for vi editing powers in bash is when one (or more) long complicated commands need edited and this fills that gap nicely.
One of the Google results that most succinctly summed up what this command can do: http://htks.kylemilnes.com/2012/07/bash-fc-fix-command-cheat...
I also found editing you command and search history in vim by accident.
:q will quit the editor.
q: will open a buffer with a history of your vim commands, which are navigable and editable. Edit a command, then enter and it's executed.
In command history edit mode, :q to exit that mode.
q/ works for searches.
ge
This goes to the end of the previous word. There are other things, but I use this quite a bit and when it's not there, I become temporarily jarred trying to figure out if I'm mistyping.You're talking about command line editing, on the command line. And you're right, ge doesn't work there. vi mode at the command line is a small subset of vi.
The next time you want to use ge or any other full vim feature, try this instead:
- esc, to get into normal mode.
- the single character 'v' (no quotes), to open a full vi (or vim, or $EDITOR).
- the vim session will have your command line so far.
- edit with the full power of vim or whatever opened.
- :wq to execute the command.
- or empty the buffer and then :wq to not execute anything.I ask because I've had +clientserver give me hassle in the past. Sometimes it seems to just not work for no apparent reason.
Yes it's uncomfortable but that's most likely a result of a person's disfluency in vim itself.
If you are having problems with vi in bash its likely that you aren't using w W b B cw dw D a A regularly in vim either.
Also, ctrl-x-e
Unfortunately nothing changed (neither in bash nor python repl) after i installed it. I followed the installation steps 1-3 on Ubuntu 14.04. Does anyone know what i'm missing?
I use "It's all text" which is good, but it's still only a crutch.
[1] https://addons.mozilla.org/en-us/firefox/addon/vimperator/
[2] https://chrome.google.com/webstore/detail/vrome/godjoomfiimi...