From 3828bf88f79ff525a483598ed3a7287861398828 Mon Sep 17 00:00:00 2001 From: xerus2000 <27jf@pm.me> Date: Thu, 26 Nov 2020 20:39:12 +0100 Subject: [PATCH] config/nvim: reduce formatoptions for txt --- .config/nvim/init/general.vim | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.config/nvim/init/general.vim b/.config/nvim/init/general.vim index 8cc6825..21a6e1f 100644 --- a/.config/nvim/init/general.vim +++ b/.config/nvim/init/general.vim @@ -29,6 +29,7 @@ highlight ColorColumn ctermbg=grey guibg=#888888 " search set incsearch hlsearch " Handier search, even though nvim seems to enable it by default set ignorecase smartcase " Only search case-sensitive when searching with uppercase +set inccommand=split " matching set showmatch " Highlight matching parenthesis set matchpairs+=<:> " More pairings for '%' @@ -44,7 +45,7 @@ set foldopen+=jump " Automatically open folds on jump syntax on filetype plugin on " comments -autocmd Filetype * setlocal formatoptions-=o | setlocal formatoptions+=qn1jr " Change comment behavior +autocmd Filetype * setlocal formatoptions-=o | setlocal formatoptions+=qn12jr " Change comment behavior autocmd Filetype json syntax match Comment +\/\/.\+$+ " Comment highlighting in JSON autocmd Filetype markdown let &comments = "b:*,b:-,b:+," . &comments " custom hardcoded types @@ -57,7 +58,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 FileType markdown setlocal wrap spell colorcolumn= " Spell checking & no guiding columns in markdown +autocmd BufEnter *.txt setlocal ts=4 sw=4 formatoptions+=t +autocmd FileType markdown setlocal wrap spell colorcolumn= " Spell checking & no guiding columns in markdown " Center on insert mode autocmd InsertEnter * norm zz