config/nvim: improve indentation utilities

This commit is contained in:
xeruf 2022-01-10 11:52:47 +01:00
parent dc5a56d26c
commit 4796a91295
2 changed files with 4 additions and 4 deletions

View File

@ -56,8 +56,8 @@ autocmd BufNewFile *.sh,$HOME/.local/bin/* execute 'silent! 1s/.*/#!\/bin\/sh\r'
"autocmd BufNewFile * if !empty(&filetype) | execute 'silent! 1s/.*/#!\/usr\/bin\/' . &filetype . '\r\r'| :startinsert | endif "autocmd BufNewFile * if !empty(&filetype) | execute 'silent! 1s/.*/#!\/usr\/bin\/' . &filetype . '\r\r'| :startinsert | endif
set spelllang=en_us,de_de set spelllang=en_us,de_de
autocmd BufEnter *.txt,*jrnl* setlocal tabstop=4 expandtab " formatoptions+=b textwidth=78 autocmd BufEnter *.txt,*jrnl* setlocal shiftwidth=0 tabstop=4 expandtab " formatoptions+=b textwidth=78
autocmd FileType markdown setlocal wrap spell colorcolumn= tabstop=4 expandtab " Spell checking & no guiding columns in markdown autocmd FileType markdown setlocal wrap spell colorcolumn= shiftwidth=0 tabstop=4 expandtab " Spell checking & no guiding columns in markdown
" Center on entering insert mode " Center on entering insert mode
autocmd InsertEnter * norm zz autocmd InsertEnter * norm zz

View File

@ -57,5 +57,5 @@ map <leader>lw :setlocal colorcolumn=81 textwidth=80<CR>
map <leader>ln :setlocal colorcolumn= textwidth=0 wrap<CR> map <leader>ln :setlocal colorcolumn= textwidth=0 wrap<CR>
" Quickly switch indentation settings " Quickly switch indentation settings
map <leader>t :setlocal tabstop=2 expandtab<CR> map <leader>t :setlocal shiftwidth=0 tabstop=2 expandtab<CR>
map <leader>T :setlocal tabstop=3 noexpandtab<CR> map <leader>T :setlocal shiftwidth=0 tabstop=3 noexpandtab<CR>