1. Randy Stauner
  2. vimrc


Randy Stauner  committed 19d8a30

Improve insert-single-character mapping

  • Participants
  • Parent commits 224e7fb
  • Branches master

Comments (0)

Files changed (1)

File vimrc

View file
  • Ignore whitespace
 " Hit <C-a> in insert mode after a bad paste (thanks absolon) {{{
 inoremap <silent> <C-a> <ESC>u:set paste<CR>.:set nopaste<CR>gi
 " }}}
-" spacebar (in command mode) inserts a single character before the cursor
-nmap <Space> i <Esc>r
 " up and down move by virtual line
 nmap <Up>   gk
 nmap <Down> gj
 nnoremap ` '
 " }}}
-" {{{
+" borrow ideas from sartak, modify slightly {{{
+" ctrl-space to insert a single character before the cursor
+nnoremap <C-@> i <Esc>:echo "put character:"<CR>r
 " center screen and auto-open folds when searching
 if 0 " i like the idea but in practice it's too jumpy for me