diff --git a/nvim/init.vim b/nvim/init.vim index 06e49a0..fb9d9e2 100644 --- a/nvim/init.vim +++ b/nvim/init.vim @@ -104,6 +104,15 @@ augroup END " 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. 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 {{{ @@ -118,6 +127,7 @@ augroup markdown " This abbreviation adds a modeline to set VIM to change the spell " lang to portuguese. au FileType markdown iab :pt + au FileType markdown iab :date =strftime('%Y-%m-%d') au FileType markdown setlocal spell " enable spell checking au FileType markdown setlocal textwidth=79 " max line size