Switched <leader>[ and <leader>]

This commit is contained in:
Talia 2017-11-16 11:19:42 +01:00
parent ece9647757
commit 28709c0cf9

34
vimrc
View file

@ -19,7 +19,7 @@ end
set nocompatible set nocompatible
"""""""""""""""" """"""""""""""""
set linespace=0 " set linespace=0
set scrolloff=6 set scrolloff=6
set history=50 " keep 50 lines of command line history set history=50 " keep 50 lines of command line history
set nonumber set nonumber
@ -247,8 +247,8 @@ noremap x "_x
noremap <leader>x x noremap <leader>x x
" --- Numbvers --- " --- Numbvers ---
nnoremap <leader>] <C-a> nnoremap <leader>] <C-x>
nnoremap <leader>[ <C-x> nnoremap <leader>[ <C-a>
" --- MOVEMENT --- " --- MOVEMENT ---
nnoremap j gj nnoremap j gj
@ -490,6 +490,16 @@ endif
" === FILETYPE SPECIFIC STUFF === " === FILETYPE SPECIFIC STUFF ===
" --- GENERIC STUFF ---
au BufNewFile,BufRead * :call <sid>init_generic_file()
function! s:init_generic_file()
call s:autoClose_AddPair("[", "]")
call s:autoClose_AddPair("(", ")")
call s:autoClose_AddPair("{", "}")
call s:autoClose_AddPair('"', '"')
endfunc
" Vimscript Stuff " Vimscript Stuff
au BufNewFile,BufRead *.vim,*vimrc :call <sid>init_vim_file() au BufNewFile,BufRead *.vim,*vimrc :call <sid>init_vim_file()
@ -532,18 +542,17 @@ function! s:init_ruby_file()
nnoremap <buffer> <leader># :call <SID>RubyComment(1)<CR> nnoremap <buffer> <leader># :call <SID>RubyComment(1)<CR>
vnoremap <buffer> <leader>~ :call <SID>RubyComment(0)<CR> vnoremap <buffer> <leader>~ :call <SID>RubyComment(0)<CR>
vnoremap <buffer> <leader># :call <SID>RubyComment(1)<CR> vnoremap <buffer> <leader># :call <SID>RubyComment(1)<CR>
call s:autoClose_AddPair("{", "}")
call s:autoClose_AddPair("(", ")")
call s:autoClose_AddPair("[", "]")
call s:autoClose_AddPair('"', '"')
endfunction endfunction
function! s:RubyComment(a) function! s:RubyComment(a)
if a:a==0 if a:a==0
silent! exec '.s/\m^\s*\zs#*//' " silent! exec '.s/\m^\s*\zs#*//'
silent! exec '.s/\v^(\s|#)*//'
normal ==
elseif a:a==1 elseif a:a==1
silent! exec '.s/\v^(\s*#)@!/#/' " silent! exec '.s/\v^(\s*#)@!/#/'
silent! exec '.s/\v^(\s|#)*/# /'
normal ==
end end
endfunction endfunction
@ -566,11 +575,6 @@ au BufNewFile,BufRead *.lua :call <sid>init_lua_file()
function! s:init_lua_file() function! s:init_lua_file()
command! -buffer Requires call setloclist(0, MatchingLinesDict("\\vrequire\\s*\\(?(([\"'])\\zs.{-}\\ze\\\\@1<!\\2|\\[(\\=*)\\[\\zs.{-}\\ze\\]\\3\\])\\)?")) command! -buffer Requires call setloclist(0, MatchingLinesDict("\\vrequire\\s*\\(?(([\"'])\\zs.{-}\\ze\\\\@1<!\\2|\\[(\\=*)\\[\\zs.{-}\\ze\\]\\3\\])\\)?"))
command! -buffer Functions call setloclist(0, MatchingLinesDict("^\\v(\\s*\\zs(local\\s*)?function\\s*[a-zA-Z0-9.:_]*\\(.*\\)(\\s*--.*|\\ze.*)|.*function\\(.*\\)(\\s*--.*|\\ze.*))$")) command! -buffer Functions call setloclist(0, MatchingLinesDict("^\\v(\\s*\\zs(local\\s*)?function\\s*[a-zA-Z0-9.:_]*\\(.*\\)(\\s*--.*|\\ze.*)|.*function\\(.*\\)(\\s*--.*|\\ze.*))$"))
call s:autoClose_AddPair("[", "]")
call s:autoClose_AddPair("(", ")")
call s:autoClose_AddPair("{", "}")
call s:autoClose_AddPair('"', '"')
endfunction! endfunction!
" --- HTML Stuff --- " --- HTML Stuff ---