From 4ceace0c2f53ca7d1bbc9906e20a27ca5a2db347 Mon Sep 17 00:00:00 2001 From: Julio Biason Date: Tue, 8 Sep 2020 13:48:22 -0300 Subject: [PATCH] Per file-type configuration --- nvim/init.vim | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/nvim/init.vim b/nvim/init.vim index c04479b..3b7b499 100644 --- a/nvim/init.vim +++ b/nvim/init.vim @@ -6,3 +6,29 @@ let g:rehash256 = 1 " Mappings {{{ nnoremap - :Ex " }}} + +" Settings for all files {{{ +set cursorline " highlight the line in which the cursor is +set foldmethod=marker " folding will use markers +set nowrap " instead of wrapping the text to the next line, scroll left and right +" }}} + +" 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 +" }}} + +" 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 +augroup END +" }}}