diff options
| author | Teddy Wing | 2014-11-05 12:18:29 -0500 | 
|---|---|---|
| committer | Teddy Wing | 2014-11-05 12:28:25 -0500 | 
| commit | c451c1496ebb6f313f43bf204a92c3dd9fd05bee (patch) | |
| tree | 7173be8eba7db9726ad37960ef8a26fd753e818e /vimrc | |
| parent | cb713087e2074f252776072d8684f93d00aa6dc8 (diff) | |
| download | dotvim-c451c1496ebb6f313f43bf204a92c3dd9fd05bee.tar.bz2 | |
vimrc: Add command mode mappings for word movement
Never being able to move by word in command mode would always get on my
nerves. In particular if I was trying compose a long command. Sure you
can bring up a command window but that's not what I think of first when
starting to writing a command.
Luckily `cmdline.txt` in vim help has the answer! Since Shift-Left/Right
doesn't work for me and I'm using Control-Left/Right to move between OS
X spaces (not even sure if the Control modifier version works for this
either), create bash/emacs-style mappings to move between words in
command mode.
I'm sorry I didn't find this earlier but it does feel good to have a big
annoyance solved.
Diffstat (limited to 'vimrc')
| -rw-r--r-- | vimrc | 8 | 
1 files changed, 8 insertions, 0 deletions
| @@ -254,6 +254,10 @@  "       * Add <leader>tq to close a window and go to the previous tab. Works   "         like <leader>td but doesn't delete the buffer.  " +"   2014.11.05: +"       * Add command mode mappings to allow movement forward and backward by  +"         word. OS X Terminal doesn't handle the Shift & Control mappings. +"  " Pathogen @@ -558,6 +562,10 @@ nnoremap <leader>hs $F<i<cr><esc>k0f>a<cr><tab><esc>  " Reload current file (reopen to see changed made outside of vim)  nnoremap <leader>r :edit!<cr> +" Allow word movement in command mode +cnoremap <Esc>b <S-Left> +cnoremap <Esc>f <S-Right> +  " Commands | 
