From e9c883c2b197ab81a0ca19b7a0b218df6c96a7ce Mon Sep 17 00:00:00 2001 From: Julio Biason Date: Tue, 20 Oct 2020 16:11:38 -0300 Subject: [PATCH] Removing au-groups as I'm not actually using them --- nvim/init.vim | 105 ++++++++++++++++++++++---------------------------- 1 file changed, 47 insertions(+), 58 deletions(-) diff --git a/nvim/init.vim b/nvim/init.vim index fb9d9e2..99cef5a 100644 --- a/nvim/init.vim +++ b/nvim/init.vim @@ -62,84 +62,73 @@ nmap :SK " }}} " Polyglot {{{ -let g:polyglot_disabled = ["csv"] +" let g:polyglot_disabled = ["csv"] +let g:polyglot_disabled = ['sensible'] " }}} " }}} " Filetype specific configurations {{{ " Vim files {{{ -augroup vim - au FileType vim setlocal noexpandtab " use real tabs - au FileType vim setlocal tabstop=4 " display tabs as 4 spaces - au FileType vim setlocal shiftwidth=4 " Use 4 spaces when auto-indenting -augroup END +au FileType vim setlocal noexpandtab " use real tabs +au FileType vim setlocal tabstop=4 " display tabs as 4 spaces +au FileType vim setlocal shiftwidth=4 " Use 4 spaces when auto-indenting " }}} " Python {{{ -augroup python - au FileType python setlocal number " show line numbers - au FileType python setlocal expandtab " use spaces instead of tabs - au FileType python setlocal tabstop=4 " number of spaces to use for indentation - au FileType python setlocal shiftwidth=4 " number of spaces to use for auto-indentation - au FileType python setlocal softtabstop=4 " when deleting characters, consider 4 spaces as a tab - au FileType python setlocal textwidth=79 " max line size - au FileType python setlocal colorcolumn=80 " put a margin indicator - au FileType python au BufWritePre %s/\s\+$//e " When saving a Python file, remove tailing spaces - au FileType python nmap a :call JumpToAlternate() - - " Shortcut to add pylint disables - au FileType python iab lint # pylint: disable - au FileType python iab defmain def main():""""""if __name__ == '__main__':main() -augroup END +au FileType python setlocal number " show line numbers +au FileType python setlocal expandtab " use spaces instead of tabs +au FileType python setlocal tabstop=4 " number of spaces to use for indentation +au FileType python setlocal shiftwidth=4 " number of spaces to use for auto-indentation +au FileType python setlocal softtabstop=4 " when deleting characters, consider 4 spaces as a tab +au FileType python setlocal textwidth=79 " max line size +au FileType python setlocal colorcolumn=80 " put a margin indicator +au FileType python au BufWritePre %s/\s\+$//e " When saving a Python file, remove tailing spaces +au FileType python nmap a :call JumpToAlternate() + +" Shortcut to add pylint disables +au FileType python iab lint # pylint: disable +" au FileType python iab defmain def main():""""""if __name__ == '__main__':main() " }}} " CSV files {{{ -augroup csv - au FileType csv setlocal list " Display special characters, like tabs (for TSV files) -augroup END +au FileType csv setlocal list " Display special characters, like tabs (for TSV files) " }}} " Rust {{{ -" 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 + +let g:rustfmt_autosave = 1 " Apply `rustfmt` when saving the file. + +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 " }}} " Markdown {{{ -augroup markdown - au FileType markdown setlocal iskeyword+=: " this is kinda of a "hack" to make abbr accept ":" in them - " This is a long abbreviation, but: - " Most of it is simply text, with linebreaks (). - " There is one thing to take care, though: is NOT . - " will call the function (strftime), which will insert the current - " date. - au FileType markdown iab :header +++title = ""date = =strftime('%Y-%m-%d')[taxonomies]tags = [""]+++ - " 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 - au FileType markdown setlocal expandtab " use spaces instead of tabs -augroup END +au FileType markdown setlocal iskeyword+=: " this is kinda of a "hack" to make abbr accept ":" in them +" This is a long abbreviation, but: +" Most of it is simply text, with linebreaks (). +" There is one thing to take care, though: is NOT . +" will call the function (strftime), which will insert the current +" date. +au FileType markdown iab :header +++title = ""date = =strftime('%Y-%m-%d')[taxonomies]tags = [""]+++ +" 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 +au FileType markdown setlocal expandtab " use spaces instead of tabs " }}} " Shell {{{ -augroup shell - au FileType sh setlocal tabstop=4 " display tabs as 4 spaces - au FileType sh setlocal shiftwidth=4 " number of spaces to use for auto-indentation - au FileType sh setlocal softtabstop=4 " when deleting characters, consider 4 spaces as a tab -augroup END +au FileType sh setlocal tabstop=4 " display tabs as 4 spaces +au FileType sh setlocal shiftwidth=4 " number of spaces to use for auto-indentation +au FileType sh setlocal softtabstop=4 " when deleting characters, consider 4 spaces as a tab " }}} " }}}