Lua auto-closing and setting local WD

This commit is contained in:
Talia 2017-11-07 16:58:55 +01:00
parent 511207ae3b
commit 5d8f195aee

7
vimrc
View file

@ -266,7 +266,8 @@ noremap <F3> :setl autowriteall!<CR>:setl autowriteall?<CR>
noremap <F4> :setl list!<CR>
nnoremap <C-e> ge
nnoremap <C-E> gE
com! Setwd :cd %:p:h
com! SetWD :cd %:p:h
com! SetLWD :lcd %:p:h
com! Removetrailingspaces let _s=@/ | %s/\v(\\@<!\s)+$//ge | let @/=_s
nnoremap <leader>t :Removetrailingspaces<CR>
nnoremap <C-d> :copy .<CR>
@ -532,6 +533,10 @@ au BufNewFile,BufRead *.lua :call <sid>init_lua_file()
function! s:init_lua_file()
command! -buffer Requires lex MatchingLines("^\\s*require\\>.*$")
call s:autoClose_AddPair("[", "]")
call s:autoClose_AddPair("(", ")")
call s:autoClose_AddPair("{", "}")
endfunction!
" --- HTML Stuff ---