From 28709c0cf9d61eda33a3169d3c57d726b8d8eb29 Mon Sep 17 00:00:00 2001 From: DarkWiiPlayer Date: Thu, 16 Nov 2017 11:19:42 +0100 Subject: [PATCH] Switched [ and ] --- vimrc | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/vimrc b/vimrc index c2c10e2..67afe19 100644 --- a/vimrc +++ b/vimrc @@ -19,7 +19,7 @@ end set nocompatible """""""""""""""" -set linespace=0 +" set linespace=0 set scrolloff=6 set history=50 " keep 50 lines of command line history set nonumber @@ -247,8 +247,8 @@ noremap x "_x noremap x x " --- Numbvers --- -nnoremap ] -nnoremap [ +nnoremap ] +nnoremap [ " --- MOVEMENT --- nnoremap j gj @@ -490,6 +490,16 @@ endif " === FILETYPE SPECIFIC STUFF === +" --- GENERIC STUFF --- +au BufNewFile,BufRead * :call 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 au BufNewFile,BufRead *.vim,*vimrc :call init_vim_file() @@ -532,18 +542,17 @@ function! s:init_ruby_file() nnoremap # :call RubyComment(1) vnoremap ~ :call RubyComment(0) vnoremap # :call RubyComment(1) - - call s:autoClose_AddPair("{", "}") - call s:autoClose_AddPair("(", ")") - call s:autoClose_AddPair("[", "]") - call s:autoClose_AddPair('"', '"') endfunction function! s:RubyComment(a) 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 - silent! exec '.s/\v^(\s*#)@!/#/' + " silent! exec '.s/\v^(\s*#)@!/#/' + silent! exec '.s/\v^(\s|#)*/# /' + normal == end endfunction @@ -566,11 +575,6 @@ au BufNewFile,BufRead *.lua :call init_lua_file() function! s:init_lua_file() command! -buffer Requires call setloclist(0, MatchingLinesDict("\\vrequire\\s*\\(?(([\"'])\\zs.{-}\\ze\\\\@1