better brace/quote/etc completion
This commit is contained in:
parent
e9da1b87e6
commit
d3cef7cce7
38
vimrc
38
vimrc
|
@ -139,9 +139,9 @@ set foldcolumn=1
|
|||
let g:mapleader = "\<space>"
|
||||
|
||||
" replace current word with last yanked/deleted text
|
||||
nnoremap <leader>pp "_diwP
|
||||
nnoremap <leader>rr "_diwP
|
||||
" replace current word with last yanked text
|
||||
nnoremap <leader>py diw"0P
|
||||
nnoremap <leader>ry diw"0P
|
||||
|
||||
" jk acts as escape in insert
|
||||
inoremap jk <esc>
|
||||
|
@ -191,24 +191,30 @@ vnoremap <leader>gr y:grep! -R <C-r>" .
|
|||
nnoremap <leader>td :grep! -R '// *TODO' .<CR>:botright cwindow<CR>:echo len(getqflist()) 'TODOs'<CR>
|
||||
|
||||
" brace/quotes completion
|
||||
inoremap {{ {}<left>
|
||||
inoremap {{{ {<CR>}<esc>O
|
||||
inoremap {{{; {<CR>};<esc>O
|
||||
inoremap }} {{}}<Left><Left>
|
||||
inoremap (( ()<Left>
|
||||
inoremap ((; ();<Left><Left>
|
||||
inoremap "" ""<Left>
|
||||
inoremap ""; "";<Left><Left>
|
||||
inoremap '' ''<Left>
|
||||
inoremap ''; '';<Left><Left>
|
||||
inoremap [[ []<Left>
|
||||
inoremap [[[ [<CR>]<esc>O
|
||||
inoremap {{ {}<left>
|
||||
inoremap <leader>{<CR> {<CR>}<esc>O
|
||||
inoremap <leader>{; {<CR>};<esc>O
|
||||
inoremap <leader>{{ {{}}<Left><Left>
|
||||
|
||||
inoremap ;; ;<esc>
|
||||
inoremap (( ()<Left>
|
||||
inoremap <leader>(; ();<Left><Left>
|
||||
|
||||
inoremap [[ []<Left>
|
||||
inoremap <leader>[<CR> [<CR>]<esc>O
|
||||
|
||||
inoremap <leader>"" ""<Left>
|
||||
inoremap <leader>"; "";<Left><Left>
|
||||
inoremap <leader>'' ''<Left>
|
||||
inoremap <leader>'; '';<Left><Left>
|
||||
|
||||
inoremap ;; ;<esc>
|
||||
|
||||
nnoremap <leader>nn :set invrelativenumber<CR>
|
||||
nnoremap <leader>hl :nohlsearch<CR>
|
||||
|
||||
" devdocs mapping
|
||||
nnoremap <leader>dd :DD<CR>
|
||||
|
||||
" abbreviations
|
||||
iabbrev adn and
|
||||
iabbrev waht what
|
||||
|
@ -540,7 +546,5 @@ command! -nargs=* DD silent! call system(len(split(<q-args>, ' ')) == 0 ?
|
|||
\ s:stub . &ft . ' ' . expand('<cword>') . "'" : len(split(<q-args>, ' ')) == 1 ?
|
||||
\ s:stub . &ft . ' ' . <q-args> . "'" : s:stub . <q-args> . "'")
|
||||
|
||||
nnoremap <leader>dd :DD<CR>
|
||||
|
||||
|
||||
" ze end
|
||||
|
|
Loading…
Reference in New Issue