diff options
| author | Mitch Riedstra <mitch@riedstra.us> | 2018-02-21 01:01:29 -0500 |
|---|---|---|
| committer | Mitch Riedstra <mitch@riedstra.us> | 2018-02-21 01:01:29 -0500 |
| commit | 5d40569e5c1ca453df1bf7b0547f3f69e3e684d7 (patch) | |
| tree | 0658eeaef820299519a2dcd0666278727fc83676 /vim/filetypes.vim | |
| parent | 261aaa8cf687be76e67fe5423f59450365769889 (diff) | |
| download | vim-cfg-5d40569e5c1ca453df1bf7b0547f3f69e3e684d7.tar.gz vim-cfg-5d40569e5c1ca453df1bf7b0547f3f69e3e684d7.tar.xz | |
Add a makefile to rework init.vim. Commit update init.vm TODO: remove in the future and run make in setup
Diffstat (limited to 'vim/filetypes.vim')
| -rw-r--r-- | vim/filetypes.vim | 98 |
1 files changed, 98 insertions, 0 deletions
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 |
