summaryrefslogtreecommitdiffstats
path: root/.config/nvim
diff options
context:
space:
mode:
authorYigit Sever2021-04-04 16:30:21 +0300
committerYigit Sever2021-04-04 16:34:03 +0300
commit1ec805a894967a12ebde3feba26fdc8151935e80 (patch)
treec77b6124a71a7fefd40e2538752e3fc5e94dbd5f /.config/nvim
parent492beee94b196ddb887088848cb28fb1d79d5697 (diff)
downloaddotfiles-1ec805a894967a12ebde3feba26fdc8151935e80.tar.gz
dotfiles-1ec805a894967a12ebde3feba26fdc8151935e80.tar.bz2
dotfiles-1ec805a894967a12ebde3feba26fdc8151935e80.zip
vimrc: format & style changes
Diffstat (limited to '.config/nvim')
-rwxr-xr-x.config/nvim/init.vim28
1 files changed, 19 insertions, 9 deletions
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
249 249
250" Tab stuff 250" Tab stuff
251set autoindent 251set autoindent
252
253" :h tabstop, 2. point
252" Use appropriate number of spaces to insert a <Tab> 254" Use appropriate number of spaces to insert a <Tab>
253set expandtab 255set expandtab
254set shiftwidth=4 256set shiftwidth=4
@@ -324,9 +326,12 @@ let g:moonflyUndercurls = 0
324" Save file as sudo on files that require root permission 326" Save file as sudo on files that require root permission
325cnoremap w!! execute 'silent! write !sudo tee % >/dev/null' <bar> edit! 327cnoremap w!! execute 'silent! write !sudo tee % >/dev/null' <bar> edit!
326 328
327" Replace ex mode with gq 329" replace ex mode with gq
328map Q gq 330map Q gq
329 331
332" set formatprg to sentences, for prose
333map \fp :set formatprg=~/.local/bin/sentences<CR>
334
330" Replace all is aliased to S. 335" Replace all is aliased to S.
331nnoremap S :%s//g<Left><Left> 336nnoremap S :%s//g<Left><Left>
332 337
@@ -342,6 +347,9 @@ tnoremap <C-l> <C-\><C-n><C-w>l
342" call CreatePaper on word below cursor 347" call CreatePaper on word below cursor
343nnoremap <leader>np gewi[[/papers/<ESC>Ea]]<ESC>bb:call CreatePaper(expand('<cword>'))<CR> 348nnoremap <leader>np gewi[[/papers/<ESC>Ea]]<ESC>bb:call CreatePaper(expand('<cword>'))<CR>
344 349
350" link paper
351nnoremap <leader>lp gewi[[/papers/<ESC>Ea]]<ESC>
352
345" call CreateReference on word below cursor 353" call CreateReference on word below cursor
346nnoremap <leader>nr :call CreateReference(expand('<cword>'))<CR> 354nnoremap <leader>nr :call CreateReference(expand('<cword>'))<CR>
347 355
@@ -359,7 +367,7 @@ nnoremap <silent> <F4> :NERDTreeToggle<CR>
359" Fix whole buffer via ALE 367" Fix whole buffer via ALE
360nmap <F9> <Plug>(ale_fix) 368nmap <F9> <Plug>(ale_fix)
361 369
362" these "Ctrl mappings" work well when Caps Lock is mapped to Ctrl 370" vim-test bindings
363nmap <silent> t<C-n> :TestNearest<CR> 371nmap <silent> t<C-n> :TestNearest<CR>
364nmap <silent> t<C-f> :TestFile<CR> 372nmap <silent> t<C-f> :TestFile<CR>
365nmap <silent> t<C-s> :TestSuite<CR> 373nmap <silent> t<C-s> :TestSuite<CR>
@@ -367,7 +375,7 @@ nmap <silent> t<C-l> :TestLast<CR>
367nmap <silent> t<C-g> :TestVisit<CR> 375nmap <silent> t<C-g> :TestVisit<CR>
368 376
369" Edit vimrc \ev 377" Edit vimrc \ev
370nnoremap <silent> <Leader>ev :tabnew<CR>:e ~/.config/nvim/init.vim<CR> 378nnoremap <silent> <leader>ev :tabnew<CR>:e ~/.config/nvim/init.vim<CR>
371" jump to buffer 379" jump to buffer
372nnoremap <leader>b :ls<cr>:b<space> 380nnoremap <leader>b :ls<cr>:b<space>
373 381
@@ -384,14 +392,14 @@ nnoremap <C-h> <C-w>h
384nnoremap <C-l> <C-w>l 392nnoremap <C-l> <C-w>l
385 393
386" Disable highlight when <leader><cr> is pressed 394" Disable highlight when <leader><cr> is pressed
387nnoremap <silent> <Leader><cr> :noh<cr> 395nnoremap <silent> <leader><cr> :noh<cr>
388" Space used to toggle folds, now it's x (because x is d) 396" Space used to toggle folds, now it's x (because x is d)
389nnoremap <space> "_x 397nnoremap <space> "_x
390 398
391" checkmarks on vimwiki 399" checkmarks on vimwiki
392nmap <Leader>v <Plug>VimwikiToggleListItem 400nmap <leader>v <Plug>VimwikiToggleListItem
393" add/increase header level 401" add/increase header level
394nmap <Leader>a <Plug>VimwikiAddHeaderLevel 402nmap <leader>a <Plug>VimwikiAddHeaderLevel
395 403
396" sneak using grave, s is for sandwich 404" sneak using grave, s is for sandwich
397nmap ` <Plug>Sneak_s 405nmap ` <Plug>Sneak_s
@@ -419,7 +427,7 @@ xmap <leader>s <plug>(SubversiveSubstituteRange)
419nmap <leader>ss <plug>(SubversiveSubstituteWordRange) 427nmap <leader>ss <plug>(SubversiveSubstituteWordRange)
420 428
421" subvert over range 429" subvert over range
422nmap <leader><Leader>s <plug>(SubversiveSubvertRange) 430nmap <leader><leader>s <plug>(SubversiveSubvertRange)
423xmap <leader><leader>s <plug>(SubversiveSubvertRange) 431xmap <leader><leader>s <plug>(SubversiveSubvertRange)
424nmap <leader><leader>ss <plug>(SubversiveSubvertWordRange) 432nmap <leader><leader>ss <plug>(SubversiveSubvertWordRange)
425 433
@@ -429,8 +437,8 @@ nmap <c-p> <plug>(YoinkPostPasteSwapForward)
429 437
430" change into pwd of current directory 438" change into pwd of current directory
431nnoremap <leader>cd :cd %:p:h<CR>:pwd<CR> 439nnoremap <leader>cd :cd %:p:h<CR>:pwd<CR>
432inoremap <silent> <Leader>fn <C-R>=expand("%:t:r")<CR> 440inoremap <silent> <leader>fn <C-R>=expand("%:t:r")<CR>
433nnoremap <silent> <Leader>fn :put! =expand('%:t:r')<CR> 441nnoremap <silent> <leader>fn :put! =expand('%:t:r')<CR>
434 442
435" press \g and start writing prose 443" press \g and start writing prose
436map <leader>g :Goyo<CR> 444map <leader>g :Goyo<CR>
@@ -556,6 +564,8 @@ let g:beacon_shrink = 0
556highlight Beacon guibg=red ctermbg=15 564highlight Beacon guibg=red ctermbg=15
557" }}} beacon " 565" }}} beacon "
558 566
567" thesaurus_query {{{ "
559let g:tq_enabled_backends = ["mthesaur_txt"] 568let g:tq_enabled_backends = ["mthesaur_txt"]
560let g:tq_truncation_on_relavance = 0 569let g:tq_truncation_on_relavance = 0
570" }}} thesaurus_query "
561 571