Move vim autocommands into ftdetect or ftplugin
This commit is contained in:
parent
3b1d816705
commit
277de97a36
2
after/ftdetect/markdown.vim
Normal file
2
after/ftdetect/markdown.vim
Normal file
@ -0,0 +1,2 @@
|
||||
" Force *.md to markdown filetype
|
||||
au BufNewFile,BufReadPost *.md set filetype=markdown
|
2
after/ftdetect/opencl.vim
Normal file
2
after/ftdetect/opencl.vim
Normal file
@ -0,0 +1,2 @@
|
||||
" Force *.cl to OpenCL C filetype
|
||||
au BufNewFile,BufReadPost *.cl set filetype=opencl
|
2
after/ftdetect/python.vim
Normal file
2
after/ftdetect/python.vim
Normal file
@ -0,0 +1,2 @@
|
||||
" Python convention is to use 4 space tabs.
|
||||
setlocal tabstop=4 shiftwidth=4 softtabstop=4
|
2
after/ftdetect/tablegen.vim
Normal file
2
after/ftdetect/tablegen.vim
Normal file
@ -0,0 +1,2 @@
|
||||
" Force *.td to tablegen filetype
|
||||
au BufNewFile,BufReadPost *.td set filetype=tablegen
|
@ -1,2 +1,4 @@
|
||||
" Set 'comments' to format dashed lists in comments.
|
||||
setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:///,://
|
||||
" Stop automatic new lines which typing long single liners
|
||||
setlocal textwidth=0
|
||||
|
14
after/ftplugin/cmake.vim
Normal file
14
after/ftplugin/cmake.vim
Normal file
@ -0,0 +1,14 @@
|
||||
" TODO Create fold markers based on cmake syntax, eg.
|
||||
"
|
||||
" if() <- open
|
||||
" endif() <- close
|
||||
"
|
||||
" foreach() <- open
|
||||
" endforeach() <- close
|
||||
"
|
||||
" and so on for all other begin end style command pairs.
|
||||
"
|
||||
" Then change the setting.
|
||||
"
|
||||
" setlocal foldmethod=syntax
|
||||
setlocal foldmethod=indent
|
3
after/ftplugin/gitcommit.vim
Normal file
3
after/ftplugin/gitcommit.vim
Normal file
@ -0,0 +1,3 @@
|
||||
if !has("win32") || has("gui_running")
|
||||
setlocal spell
|
||||
endif
|
4
after/ftplugin/help.vim
Normal file
4
after/ftplugin/help.vim
Normal file
@ -0,0 +1,4 @@
|
||||
" Disable spell checking which is enabled for text files
|
||||
setlocal nospell
|
||||
" Show help in the rightmost vertical split
|
||||
wincmd L
|
2
after/ftplugin/html.vim
Normal file
2
after/ftplugin/html.vim
Normal file
@ -0,0 +1,2 @@
|
||||
" Set text and tab width for certain file types
|
||||
setlocal textwidth=80
|
6
after/ftplugin/markdown.vim
Normal file
6
after/ftplugin/markdown.vim
Normal file
@ -0,0 +1,6 @@
|
||||
if !has("win32") || has("gui_running")
|
||||
setlocal spell
|
||||
endif
|
||||
setlocal textwidth=80
|
||||
" Use tabwidth of 4 to be markdown complient
|
||||
setlocal tabstop=4 shiftwidth=4 softtabstop=4
|
5
after/ftplugin/snippets.vim
Normal file
5
after/ftplugin/snippets.vim
Normal file
@ -0,0 +1,5 @@
|
||||
" Disable expansion of tabs in snippet files as snippets must correctly insert
|
||||
" the current filetypes tab settings.
|
||||
setlocal noexpandtab
|
||||
" Set tab width to 4 spaces as UltiSnips supports inline python.
|
||||
setlocal tabstop=4 shiftwidth=4 softtabstop=4
|
4
after/ftplugin/text.vim
Normal file
4
after/ftplugin/text.vim
Normal file
@ -0,0 +1,4 @@
|
||||
if !has("win32") || has("gui_running")
|
||||
setlocal spell
|
||||
endif
|
||||
setlocal textwidth=80
|
1
after/ftplugin/vim.vim
Normal file
1
after/ftplugin/vim.vim
Normal file
@ -0,0 +1 @@
|
||||
setlocal foldmethod=marker
|
1
after/ftplugin/zsh.vim
Normal file
1
after/ftplugin/zsh.vim
Normal file
@ -0,0 +1 @@
|
||||
setlocal foldmethod=marker
|
Loading…
x
Reference in New Issue
Block a user