diff --git a/vimrc b/vimrc index 384902e..3a8b0d8 100644 --- a/vimrc +++ b/vimrc @@ -469,7 +469,7 @@ function! s:snapshot() endfun command! Snapshot call snapshot() -command! -nargs=? Scratch enew | set buftype=nofile | set filetype= +command! -nargs=? Scratch enew | call init_generic_file() | set filetype= | set buftype=nofile command! Todo call matchadd('Todo', '^\s*\[ \?\].*$') | \ call matchadd('Comment', '^\s*\[x\].*$') | \ call matchadd('Comment', '^\s*\[-\].*$') | @@ -860,26 +860,18 @@ function! s:RubyComment(a) end endfunction -" augroup rbindent -" autocmd! -" au BufNewFile,BufRead *.rb :set noexpandtab | :retab! | -" -" au BufWritePre *.rb :let ts = &tabstop | set expandtab | set tabstop=2 | retab | let &tabstop=ts | :set noexpandtab -" -" au BufWritepost *.rb :silent! :undo | :exe "normal \" -" augroup END - " --- Lua Stuff --- " Matches all types of Lua string! " \v(["'])\zs.{-}\ze\\@1init_lua_file() +au FileType lua :call init_lua_file() function! s:init_lua_file() setl number command! -buffer Requires call setloclist(0, MatchingLinesDict("\\vrequire\\s*\\(?(([\"'])\\zs.{-}\\ze\\\\@1 let do local endfunction! " --- HTML Stuff ---