vimrc: add augroup for filetype autocmds
This commit is contained in:
parent
9bea067fbe
commit
a85ccd7318
95
.vim/vimrc
95
.vim/vimrc
@ -610,67 +610,70 @@ augroup save_load_views
|
||||
au BufWinEnter *.* loadview
|
||||
augroup END
|
||||
|
||||
au FileType xml setlocal shiftwidth=4 tabstop=4
|
||||
au FileType html setlocal shiftwidth=4 tabstop=4
|
||||
augroup filetypes
|
||||
autocmd!
|
||||
au FileType xml setlocal shiftwidth=4 tabstop=4
|
||||
au FileType html setlocal shiftwidth=4 tabstop=4
|
||||
|
||||
au BufNewFile,BufRead *.js
|
||||
\ setlocal shiftwidth=4 tabstop=4 softtabstop=4 expandtab autoindent
|
||||
\ fileformat=unix filetype=js
|
||||
au BufNewFile,BufRead *.js
|
||||
\ setlocal shiftwidth=4 tabstop=4 softtabstop=4 expandtab autoindent
|
||||
\ fileformat=unix filetype=js
|
||||
|
||||
au BufNewFile,BufRead,BufEnter *.md
|
||||
\ setlocal textwidth=79 foldmethod=manual filetype=markdown
|
||||
\ fileformat=unix expandtab
|
||||
au BufNewFile,BufRead,BufEnter *.md
|
||||
\ setlocal textwidth=79 foldmethod=manual filetype=markdown
|
||||
\ fileformat=unix expandtab
|
||||
|
||||
au FileType sway setl textwidth=99
|
||||
\ tabstop=4 shiftwidth=4 softtabstop=4 noexpandtab autoindent
|
||||
au FileType sway setl textwidth=99
|
||||
\ tabstop=4 shiftwidth=4 softtabstop=4 noexpandtab autoindent
|
||||
|
||||
au FileType rust setl
|
||||
\ tabstop=8 shiftwidth=8 softtabstop=8 noexpandtab autoindent ff=unix
|
||||
au FileType rust setl
|
||||
\ tabstop=8 shiftwidth=8 softtabstop=8 noexpandtab autoindent ff=unix
|
||||
|
||||
au BufNewFile,BufRead *.py,*.pyw,*.pyx,?akefil*
|
||||
\ setlocal tabstop=4 shiftwidth=4 noexpandtab autoindent
|
||||
\ fileformat=unix
|
||||
au BufNewFile,BufRead *.py,*.pyw,*.pyx,?akefil*
|
||||
\ setlocal tabstop=4 shiftwidth=4 noexpandtab autoindent
|
||||
\ fileformat=unix
|
||||
|
||||
" Linux kernel style tabs - not for cpp
|
||||
" au BufNewFile,BufRead,BufEnter *.c,*.h,*.cpp
|
||||
au BufNewFile,BufRead,BufEnter *.c,*.h
|
||||
\ set tabstop=8 shiftwidth=8 softtabstop=8 noexpandtab autoindent
|
||||
\ textwidth=79 fileformat=unix omnifunc=lsp#complete
|
||||
" Linux kernel style tabs - not for cpp
|
||||
" au BufNewFile,BufRead,BufEnter *.c,*.h,*.cpp
|
||||
au BufNewFile,BufRead,BufEnter *.c,*.h
|
||||
\ set tabstop=8 shiftwidth=8 softtabstop=8 noexpandtab autoindent
|
||||
\ textwidth=79 fileformat=unix omnifunc=lsp#complete
|
||||
|
||||
au BufNewFile,BufRead,BufEnter *.cpp,*.h,*.hpp
|
||||
\ set tabstop=4 shiftwidth=4 softtabstop=4 noexpandtab autoindent
|
||||
\ textwidth=79 fileformat=unix omnifunc=lsp#complete ft=cpp
|
||||
" \ textwidth=79 fileformat=unix
|
||||
au FileType cpp
|
||||
\ set tabstop=4 shiftwidth=4 softtabstop=4 noexpandtab autoindent
|
||||
\ textwidth=79 fileformat=unix omnifunc=lsp#complete
|
||||
" \ textwidth=79 fileformat=unix
|
||||
au BufNewFile,BufRead,BufEnter *.cpp,*.h,*.hpp
|
||||
\ set tabstop=4 shiftwidth=4 softtabstop=4 noexpandtab autoindent
|
||||
\ textwidth=79 fileformat=unix omnifunc=lsp#complete ft=cpp
|
||||
" \ textwidth=79 fileformat=unix
|
||||
au FileType cpp
|
||||
\ set tabstop=4 shiftwidth=4 softtabstop=4 noexpandtab autoindent
|
||||
\ textwidth=79 fileformat=unix omnifunc=lsp#complete
|
||||
" \ textwidth=79 fileformat=unix
|
||||
|
||||
|
||||
au FileType tex setlocal tabstop=2
|
||||
au FileType tex setlocal tabstop=2
|
||||
|
||||
au BufNewFile,BufRead,BufEnter *.tex
|
||||
\ setlocal tabstop=2 shiftwidth=2 softtabstop=2 expandtab autoindent
|
||||
\ textwidth=79 fileformat=unix conceallevel=0
|
||||
au BufNewFile,BufRead,BufEnter *.tex
|
||||
\ setlocal tabstop=2 shiftwidth=2 softtabstop=2 expandtab autoindent
|
||||
\ textwidth=79 fileformat=unix conceallevel=0
|
||||
|
||||
au BufNewFile,BufRead,BufEnter *.bib
|
||||
\ setlocal ft=bib tabstop=2 shiftwidth=2 softtabstop=2 noexpandtab autoindent
|
||||
\ fileformat=unix conceallevel=0
|
||||
au BufNewFile,BufRead,BufEnter *.bib
|
||||
\ setlocal ft=bib tabstop=2 shiftwidth=2 softtabstop=2 noexpandtab autoindent
|
||||
\ fileformat=unix conceallevel=0
|
||||
|
||||
autocmd FileType yaml setlocal ts=2 sts=2 sw=2 expandtab indentkeys-=0#
|
||||
\ indentkeys-=<:> foldmethod=indent nofoldenable
|
||||
autocmd FileType yaml setlocal ts=2 sts=2 sw=2 expandtab indentkeys-=0#
|
||||
\ indentkeys-=<:> foldmethod=indent nofoldenable
|
||||
|
||||
au BufNewFile,BufRead,BufEnter *.cs
|
||||
\ setlocal ft=cs tabstop=4 shiftwidth=4 softtabstop=4 noexpandtab autoindent
|
||||
\ textwidth=79 fileformat=unix conceallevel=0
|
||||
au BufNewFile,BufRead,BufEnter *.cs
|
||||
\ setlocal ft=cs tabstop=4 shiftwidth=4 softtabstop=4 noexpandtab autoindent
|
||||
\ textwidth=79 fileformat=unix conceallevel=0
|
||||
|
||||
au BufNewFile,BufRead *.cshtml
|
||||
\ setlocal ft=csh tabstop=4 shiftwidth=4 softtabstop=4 noexpandtab autoindent
|
||||
\ textwidth=79 fileformat=unix conceallevel=0
|
||||
au BufNewFile,BufRead *.cshtml
|
||||
\ setlocal ft=csh tabstop=4 shiftwidth=4 softtabstop=4 noexpandtab autoindent
|
||||
\ textwidth=79 fileformat=unix conceallevel=0
|
||||
|
||||
" no autocomments, for example when entering insert mode above or below a
|
||||
" commented line
|
||||
autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o
|
||||
" no autocomments, for example when entering insert mode above or below a
|
||||
" commented line
|
||||
autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o
|
||||
augroup END
|
||||
|
||||
|
||||
augroup line_too_long
|
||||
|
Loading…
Reference in New Issue
Block a user