config/nvim: improve indentation utilities
This commit is contained in:
parent
dc5a56d26c
commit
4796a91295
|
@ -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
|
||||
|
||||
set spelllang=en_us,de_de
|
||||
autocmd BufEnter *.txt,*jrnl* setlocal 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 BufEnter *.txt,*jrnl* setlocal shiftwidth=0 tabstop=4 expandtab " formatoptions+=b textwidth=78
|
||||
autocmd FileType markdown setlocal wrap spell colorcolumn= shiftwidth=0 tabstop=4 expandtab " Spell checking & no guiding columns in markdown
|
||||
|
||||
" Center on entering insert mode
|
||||
autocmd InsertEnter * norm zz
|
||||
|
|
|
@ -57,5 +57,5 @@ map <leader>lw :setlocal colorcolumn=81 textwidth=80<CR>
|
|||
map <leader>ln :setlocal colorcolumn= textwidth=0 wrap<CR>
|
||||
|
||||
" Quickly switch indentation settings
|
||||
map <leader>t :setlocal tabstop=2 expandtab<CR>
|
||||
map <leader>T :setlocal tabstop=3 noexpandtab<CR>
|
||||
map <leader>t :setlocal shiftwidth=0 tabstop=2 expandtab<CR>
|
||||
map <leader>T :setlocal shiftwidth=0 tabstop=3 noexpandtab<CR>
|
||||
|
|
Loading…
Reference in New Issue