1
0
mirror of https://github.com/amix/vimrc synced 2025-02-28 14:12:51 +08:00

update closing chars, Yank Ring, consolidate trailing whitespace functions

This commit is contained in:
Max Alcala 2016-05-23 14:52:32 -05:00
parent 63769c0c27
commit 2c2dda260c
4 changed files with 10 additions and 19 deletions

View File

@ -19,9 +19,3 @@ let g:syntastic_javascript_args = "-c ./.eslintrc"
map <leader>wc <C-W>c
map <leader>wn <C-W>n
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Autotrim trailing spaces on specific files
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
autocmd FileType javascript autocmd BufWritePre <buffer> :%s/\s\+$//e

View File

@ -308,6 +308,8 @@ endfunc
autocmd BufWrite *.py :call DeleteTrailingWS()
autocmd BufWrite *.coffee :call DeleteTrailingWS()
autocmd BufWrite *.rb :call DeleteTrailingWS()
autocmd BufWrite *.js :call DeleteTrailingWS()
autocmd BufWrite *.es6 :call DeleteTrailingWS()
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
@ -337,7 +339,7 @@ vnoremap <silent> <leader>r :call VisualSelection('replace', '')<CR>
map <leader>cc :botright cope<cr>
map <leader>co ggVGy:tabnew<cr>:set syntax=qf<cr>pgg
map <leader>n :cn<cr>
map <leader>p :cp<cr>
map <leader>p :YRShow<cr>
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
@ -368,9 +370,6 @@ map <leader>x :e ~/buffer.md<cr>
" Toggle paste mode on and off
map <leader>pp :setlocal paste!<cr>
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Helper functions
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

View File

@ -97,14 +97,12 @@ vnoremap $q <esc>`>a'<esc>`<i'<esc>
vnoremap $e <esc>`>a"<esc>`<i"<esc>
" Map auto complete of (, ", ', [
inoremap $1 ()<esc>i
inoremap $2 []<esc>i
inoremap $3 {}<esc>i
inoremap $4 {<esc>o}<esc>O
inoremap $q ''<esc>i
inoremap $e ""<esc>i
inoremap $t <><esc>i
inoremap ( ()<esc>i
inoremap [ []<esc>i
inoremap { {}<esc>i
inoremap { {<esc>o}<esc>O
inoremap ' ''<esc>i
inoremap " ""<esc>i
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => General abbreviations

View File

@ -167,5 +167,5 @@ autocmd FileType javascript :call SyntasticESlintChecker()
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Git gutter (Git diff)
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
let g:gitgutter_enabled=0
let g:gitgutter_enabled=1
nnoremap <silent> <leader>d :GitGutterToggle<cr>