better brace/quote/etc completion

This commit is contained in:
ManjaroOne666 2018-02-11 15:28:21 +00:00
parent e9da1b87e6
commit d3cef7cce7
1 changed files with 21 additions and 17 deletions

30
vimrc
View File

@ -139,9 +139,9 @@ set foldcolumn=1
let g:mapleader = "\<space>" let g:mapleader = "\<space>"
" replace current word with last yanked/deleted text " replace current word with last yanked/deleted text
nnoremap <leader>pp "_diwP nnoremap <leader>rr "_diwP
" replace current word with last yanked text " replace current word with last yanked text
nnoremap <leader>py diw"0P nnoremap <leader>ry diw"0P
" jk acts as escape in insert " jk acts as escape in insert
inoremap jk <esc> inoremap jk <esc>
@ -192,23 +192,29 @@ nnoremap <leader>td :grep! -R '// *TODO' .<CR>:botright cwindow<CR>:echo len(get
" brace/quotes completion " brace/quotes completion
inoremap {{ {}<left> inoremap {{ {}<left>
inoremap {{{ {<CR>}<esc>O inoremap <leader>{<CR> {<CR>}<esc>O
inoremap {{{; {<CR>};<esc>O inoremap <leader>{; {<CR>};<esc>O
inoremap }} {{}}<Left><Left> inoremap <leader>{{ {{}}<Left><Left>
inoremap (( ()<Left> inoremap (( ()<Left>
inoremap ((; ();<Left><Left> inoremap <leader>(; ();<Left><Left>
inoremap "" ""<Left>
inoremap ""; "";<Left><Left>
inoremap '' ''<Left>
inoremap ''; '';<Left><Left>
inoremap [[ []<Left> inoremap [[ []<Left>
inoremap [[[ [<CR>]<esc>O inoremap <leader>[<CR> [<CR>]<esc>O
inoremap <leader>"" ""<Left>
inoremap <leader>"; "";<Left><Left>
inoremap <leader>'' ''<Left>
inoremap <leader>'; '';<Left><Left>
inoremap ;; ;<esc> inoremap ;; ;<esc>
nnoremap <leader>nn :set invrelativenumber<CR> nnoremap <leader>nn :set invrelativenumber<CR>
nnoremap <leader>hl :nohlsearch<CR> nnoremap <leader>hl :nohlsearch<CR>
" devdocs mapping
nnoremap <leader>dd :DD<CR>
" abbreviations " abbreviations
iabbrev adn and iabbrev adn and
iabbrev waht what 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 . ' ' . expand('<cword>') . "'" : len(split(<q-args>, ' ')) == 1 ?
\ s:stub . &ft . ' ' . <q-args> . "'" : s:stub . <q-args> . "'") \ s:stub . &ft . ' ' . <q-args> . "'" : s:stub . <q-args> . "'")
nnoremap <leader>dd :DD<CR>
" ze end " ze end