Skip to content
Snippets Groups Projects
Commit 8d4ca36f authored by Chris Coley's avatar Chris Coley
Browse files

Extract most of the FileType specific settings to plugin files

Also deleted some FileType specific settings that aren't needed anymore.
parent eee694cf
Branches
No related tags found
No related merge requests found
autocmd BufRead,BufNewFile *.dot setlocal filetype=dot
autocmd BufRead,BufNewFile *.gv setlocal filetype=dot
setlocal noexpandtab
" Set the modeline to use a single line comment
let b:ml_commentstring = '// %s'
" Add whitespace to the modeline commentstring
let b:ml_commentstring = '<!-- %s -->'
" Set the modeline to use a single line comment
let b:ml_commentstring = '// %s'
" Set the modeline to use a single line comment
let b:ml_commentstring = '// %s'
" Set the modeline to use a single line comment
let b:ml_commentstring = '-- %s'
" Set the modeline to use a single line comment
let b:ml_commentstring = '// %s'
" Set the modeline to use a single line comment
let b:ml_commentstring = '-- %s'
" Set the modeline to use a single line comment
let b:ml_commentstring = '" %s'
setlocal shiftwidth=2
setlocal tabstop=2
setlocal softtabstop=2
......@@ -17,7 +17,6 @@ set backspace=2 " Make Backspace work like you expect
set formatoptions+=ro " Automatically insert the comment character when you
" hit <Enter> (r) or o/O (o) in a comment block
set showbreak=└\ " Prefix wrapped continuation lines with '└ '
set commentstring=#\ %s " The default comment style for line comments
let mapleader='\' " The <leader> key for key maps
syntax enable " Syntax highlighting
filetype plugin on " Enable the filetype plugin
......@@ -75,10 +74,6 @@ function! ToggleColorColumn()
endfunction
" Associate extensions to filetypes
autocmd BufRead,BufNewFile *.gv setlocal filetype=dot
" Set the terminal title to reflect the open file. Even works with Vim tabs.
autocmd BufEnter * let &titlestring = expand("%:t") . " - %{$USER}@" . hostname() | setlocal title
autocmd VimLeave * let &titleold = $USER . "@" . hostname() | setlocal title
......@@ -99,19 +94,7 @@ endfunction
" Filetype specific settings
autocmd FileType diff setlocal noet
autocmd FileType dot setlocal commentstring=//\ %s
autocmd FileType dns setlocal commentstring=;\ %s
autocmd FileType gitconfig setlocal commentstring=;\ %s
autocmd FileType go setlocal commentstring=//\ %s
autocmd FileType html setlocal commentstring=<!--\ %s\ -->
autocmd FileType less setlocal commentstring=/*\ %s\ */
autocmd FileType php setlocal commentstring=//\ %s
autocmd FileType plsql setlocal commentstring=--\ %s
autocmd FileType sass setlocal commentstring=//\ %s
autocmd FileType sql setlocal commentstring=--\ %s
autocmd FileType vim setlocal commentstring=\"\ %s
autocmd FileType yaml,ansible setlocal tabstop=2 shiftwidth=2 softtabstop=2
" Map numpad keys in insert and command-line mode
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment