From 5d40569e5c1ca453df1bf7b0547f3f69e3e684d7 Mon Sep 17 00:00:00 2001 From: Mitch Riedstra Date: Wed, 21 Feb 2018 01:01:29 -0500 Subject: Add a makefile to rework init.vim. Commit update init.vm TODO: remove in the future and run make in setup --- vim/filetypes.vim | 98 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 vim/filetypes.vim (limited to 'vim/filetypes.vim') diff --git a/vim/filetypes.vim b/vim/filetypes.vim new file mode 100644 index 0000000..b14b47e --- /dev/null +++ b/vim/filetypes.vim @@ -0,0 +1,98 @@ +autocmd Filetype python call SetPythonOptions() +autocmd Filetype htmldjango call SethtmldjangoOptions() +autocmd Filetype json call SetJsonOptions() +autocmd Filetype javascript call SetjavascriptOptions() +autocmd Filetype php call SetPHPOptions() +autocmd Filetype html call SetHTMLOptions() +autocmd Filetype sh call SetShellOptions() +autocmd Filetype go call SetGoOptions() +autocmd Filetype yaml call SetYamlOptions() +autocmd Filetype markdown call SetMarkdownOptions() + +function SetMarkdownOptions() + set spell + set tabstop=4 + set shiftwidth=4 + set expandtab + AcpDisable +endfunction +function SetPythonOptions() + set tabstop=4 + set shiftwidth=4 + set expandtab + filetype indent on + set smartindent +endfunction +function SetjavascriptOptions() + set tabstop=2 + set shiftwidth=2 + set expandtab + filetype indent on + set smartindent +endfunction +function SetJsonOptions() + set tabstop=3 + set shiftwidth=3 + set expandtab + filetype indent on + set smartindent +endfunction +function SethtmldjangoOptions() + set tabstop=2 + set shiftwidth=2 + set expandtab + filetype indent on + set smartindent +endfunction +function SetPHPOptions() + set colorcolumn=120 + set tabstop=4 + set shiftwidth=4 + set expandtab + filetype indent on + set smartindent +endfunction +function SetHTMLOptions() + set colorcolumn=120 + set tabstop=2 + set shiftwidth=2 + set expandtab + filetype indent on + set smartindent +endfunction +function SetShellOptions() + set tabstop=4 + set shiftwidth=4 + set noexpandtab + filetype indent on + set smartindent +endfunction +function SetGoOptions() + " colorscheme acme + " syntax off + " colorscheme 256_noir + AcpDisable + set nolist + set noic + set nolist +endfunction +function SetYamlOptions() + " set listchars=tab:▸\ ,eol:¬,trail:•,space:· + set listchars=tab:▸\ ,eol:¬,trail:• + set expandtab + set noic +endfunction + +" This is specifically for Salt's state files 'sls' +autocmd BufNewFile,BufRead *.sls set filetype=yaml + + +function! PhpSyntaxOverride() + hi! def link phpDocTags phpDefine + hi! def link phpDocParam phpType +endfunction + +augroup phpSyntaxOverride + autocmd! + autocmd FileType php call PhpSyntaxOverride() +augroup END -- cgit v1.2.3