|
|
@ -104,6 +104,15 @@ augroup END |
|
|
|
" Apply `rustfmt` when saving the file. Because this is related to the syntax |
|
|
|
" Apply `rustfmt` when saving the file. Because this is related to the syntax |
|
|
|
" file and not something on the buffer itself, we can set it globally. |
|
|
|
" file and not something on the buffer itself, we can set it globally. |
|
|
|
let g:rustfmt_autosave = 1 |
|
|
|
let g:rustfmt_autosave = 1 |
|
|
|
|
|
|
|
augroup rust |
|
|
|
|
|
|
|
au FileType rust setlocal number " show line numbers |
|
|
|
|
|
|
|
au FileType rust setlocal expandtab " use spaces instead of tabs |
|
|
|
|
|
|
|
au FileType rust setlocal tabstop=4 " number of spaces to use for indentation |
|
|
|
|
|
|
|
au FileType rust setlocal shiftwidth=4 " number of spaces to use for auto-indentation |
|
|
|
|
|
|
|
au FileType rust setlocal softtabstop=4 " when deleting characters, consider 4 spaces as a tab |
|
|
|
|
|
|
|
au FileType rust setlocal textwidth=79 " max line size |
|
|
|
|
|
|
|
au FileType rust setlocal colorcolumn=80 " put a margin indicator |
|
|
|
|
|
|
|
augroup END |
|
|
|
" }}} |
|
|
|
" }}} |
|
|
|
|
|
|
|
|
|
|
|
" Markdown {{{ |
|
|
|
" Markdown {{{ |
|
|
@ -118,6 +127,7 @@ augroup markdown |
|
|
|
" This abbreviation adds a modeline to set VIM to change the spell |
|
|
|
" This abbreviation adds a modeline to set VIM to change the spell |
|
|
|
" lang to portuguese. |
|
|
|
" lang to portuguese. |
|
|
|
au FileType markdown iab :pt <!--<CR>vim:spelllang=pt:<CR>--> |
|
|
|
au FileType markdown iab :pt <!--<CR>vim:spelllang=pt:<CR>--> |
|
|
|
|
|
|
|
au FileType markdown iab :date <C-R>=strftime('%Y-%m-%d') |
|
|
|
|
|
|
|
|
|
|
|
au FileType markdown setlocal spell " enable spell checking |
|
|
|
au FileType markdown setlocal spell " enable spell checking |
|
|
|
au FileType markdown setlocal textwidth=79 " max line size |
|
|
|
au FileType markdown setlocal textwidth=79 " max line size |
|
|
|