Merge branch 'master' of https://github.com/DarkWiiPlayer/darkrc
This commit is contained in:
commit
4a022485c9
1 changed files with 10 additions and 3 deletions
13
vimrc
13
vimrc
|
@ -108,8 +108,10 @@ endfunc
|
|||
function! s:autoClose_HelperClose(open, close)
|
||||
if getline(".")[col(".")-1] ==# a:close
|
||||
return "\<Right>"
|
||||
elseif match(getline("."+1), "\M^\s*".escape(a:close, "\\"))
|
||||
return "\<Down>\<Home>\<C-o>f".a:close."\<Right>"
|
||||
elseif getline(line(".")+1)
|
||||
if match(getline(line(".")+1), "\M^\s*".escape(a:close, "\\"))
|
||||
return "\<Down>\<Home>\<C-o>f".a:close."\<Right>"
|
||||
end
|
||||
else
|
||||
return a:close
|
||||
end
|
||||
|
@ -528,10 +530,15 @@ endfunction
|
|||
" augroup END
|
||||
|
||||
" --- Lua Stuff ---
|
||||
|
||||
" Matches all types of Lua string!
|
||||
" \v(["'])\zs.{-}\ze\\@1<!\2|\[(\=*)\[\zs.{-}\ze\]\3\]
|
||||
|
||||
au BufNewFile,BufRead *.lua :call <sid>init_lua_file()
|
||||
|
||||
function! s:init_lua_file()
|
||||
command! -buffer Requires lex MatchingLines("^\\s*require\\>.*$")
|
||||
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.*))$"))
|
||||
|
||||
call s:autoClose_AddPair("[", "]")
|
||||
call s:autoClose_AddPair("(", ")")
|
||||
|
|
Loading…
Reference in a new issue