From 1ec805a894967a12ebde3feba26fdc8151935e80 Mon Sep 17 00:00:00 2001 From: Yigit Sever Date: Sun, 4 Apr 2021 16:30:21 +0300 Subject: vimrc: format & style changes --- .config/nvim/init.vim | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) (limited to '.config/nvim') diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index d077acc..c4f54b8 100755 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -249,6 +249,8 @@ let g:yoinkIncludeDeleteOperations = 1 " Tab stuff set autoindent + +" :h tabstop, 2. point " Use appropriate number of spaces to insert a set expandtab set shiftwidth=4 @@ -324,9 +326,12 @@ let g:moonflyUndercurls = 0 " Save file as sudo on files that require root permission cnoremap w!! execute 'silent! write !sudo tee % >/dev/null' edit! -" Replace ex mode with gq +" replace ex mode with gq map Q gq +" set formatprg to sentences, for prose +map \fp :set formatprg=~/.local/bin/sentences + " Replace all is aliased to S. nnoremap S :%s//g @@ -342,6 +347,9 @@ tnoremap l " call CreatePaper on word below cursor nnoremap np gewi[[/papers/Ea]]bb:call CreatePaper(expand('')) +" link paper +nnoremap lp gewi[[/papers/Ea]] + " call CreateReference on word below cursor nnoremap nr :call CreateReference(expand('')) @@ -359,7 +367,7 @@ nnoremap :NERDTreeToggle " Fix whole buffer via ALE nmap (ale_fix) -" these "Ctrl mappings" work well when Caps Lock is mapped to Ctrl +" vim-test bindings nmap t :TestNearest nmap t :TestFile nmap t :TestSuite @@ -367,7 +375,7 @@ nmap t :TestLast nmap t :TestVisit " Edit vimrc \ev -nnoremap ev :tabnew:e ~/.config/nvim/init.vim +nnoremap ev :tabnew:e ~/.config/nvim/init.vim " jump to buffer nnoremap b :ls:b @@ -384,14 +392,14 @@ nnoremap h nnoremap l " Disable highlight when is pressed -nnoremap :noh +nnoremap :noh " Space used to toggle folds, now it's x (because x is d) nnoremap "_x " checkmarks on vimwiki -nmap v VimwikiToggleListItem +nmap v VimwikiToggleListItem " add/increase header level -nmap a VimwikiAddHeaderLevel +nmap a VimwikiAddHeaderLevel " sneak using grave, s is for sandwich nmap ` Sneak_s @@ -419,7 +427,7 @@ xmap s (SubversiveSubstituteRange) nmap ss (SubversiveSubstituteWordRange) " subvert over range -nmap s (SubversiveSubvertRange) +nmap s (SubversiveSubvertRange) xmap s (SubversiveSubvertRange) nmap ss (SubversiveSubvertWordRange) @@ -429,8 +437,8 @@ nmap (YoinkPostPasteSwapForward) " change into pwd of current directory nnoremap cd :cd %:p:h:pwd -inoremap fn =expand("%:t:r") -nnoremap fn :put! =expand('%:t:r') +inoremap fn =expand("%:t:r") +nnoremap fn :put! =expand('%:t:r') " press \g and start writing prose map g :Goyo @@ -556,6 +564,8 @@ let g:beacon_shrink = 0 highlight Beacon guibg=red ctermbg=15 " }}} beacon " +" thesaurus_query {{{ " let g:tq_enabled_backends = ["mthesaur_txt"] let g:tq_truncation_on_relavance = 0 +" }}} thesaurus_query " -- cgit v1.2.3-70-g09d2