I always found modal editing most valuable when editing and navigating through large bodies of text. I'm not quite sure that it makes sense on the command line, where you're rarely dealing with more than a few lines of text, and seldom need to rearrange those particular lines.
Nevertheless, I switched to zsh on Sunday, and with it, vi keybindings. It's getting better, but it still doesn't feel quite right.
I use vim almost pathologically, but I gave up on set -o vi. Since there's no visual indicator of which mode you're in, it's easy to make confusing mistakes and not the right feedback. It just wasn't worth it.
I use vi mode in my shell all the time, and love it. It only took a day or so to get used to it. But then again, I am a die-hard vim user.
What I'd really like, though, would be a vim mode for the shell, not just a vi mode. Then I could use some of vim's more advanced features, which would make the mode even more useful.
I can only speak for myself. Give it a day or two, and it will quickly become as transparent as your editing sessions. Once you cut over, you can forget about chording and arrow keys. Just one key: <Esc>.
I found myself using Emacs keybinding for line wise operation and movement in both vim and shell. It is just verbose to switch between editing modes sometimes.
Comments
It's odd that his 2nd tip is "Learn Vim" and then goes on to describe all the bash/readline keystrokes in Emacs mode.
I always found modal editing most valuable when editing and navigating through large bodies of text. I'm not quite sure that it makes sense on the command line, where you're rarely dealing with more than a few lines of text, and seldom need to rearrange those particular lines.
Nevertheless, I switched to zsh on Sunday, and with it, vi keybindings. It's getting better, but it still doesn't feel quite right.
I agree. I'm a vim user and never took to emacs, but the non-modal "emacs" keybindings feel more natural on the command line.
Do you know anyone who actually does this? Even die-hard vi folks I know can't get used to modes on the command line.
I use vim almost pathologically, but I gave up on set -o vi. Since there's no visual indicator of which mode you're in, it's easy to make confusing mistakes and not the right feedback. It just wasn't worth it.
You can overcome the visual indicator (at least in zsh, not sure about bash): http://unix.stackexchange.com/questions/547/make-my-zsh-prom...
I'm a recent convert. I don't like using control sequences for anything but screen management.
Sorry - I accidentally downvoted you.
I use vi mode in my shell all the time, and love it. It only took a day or so to get used to it. But then again, I am a die-hard vim user.
What I'd really like, though, would be a vim mode for the shell, not just a vi mode. Then I could use some of vim's more advanced features, which would make the mode even more useful.
If you've set -o vi, then when you're editing a command line:
esc to get into command mode.
v (just the letter v) will open the current command line in a vi or vim session (depending on your default editor).
Now vim to your heart's content.
:wq will get you out of the vi/vim session, and execute whatever you did in your vi/vim session.
There's always Conque.
For about a year or two, I've had set -o vi in my .bashrc. It is just so much easier when you work in Vim more than half the time!
The modes still trip me up sometimes, but a quick <Esc> or <Ctrl+c> fixes that!
I always use set -o vi. It's in all my .bashrc files. Wish every CLI had it.
I can only speak for myself. Give it a day or two, and it will quickly become as transparent as your editing sessions. Once you cut over, you can forget about chording and arrow keys. Just one key: <Esc>.
I found myself using Emacs keybinding for line wise operation and movement in both vim and shell. It is just verbose to switch between editing modes sometimes.