summaryrefslogtreecommitdiff
path: root/.config/nvim
diff options
context:
space:
mode:
authorBenjamin Chausse <benjamin@chausse.xyz>2020-12-08 21:49:41 -0500
committerBenjamin Chausse <benjamin@chausse.xyz>2020-12-08 21:49:41 -0500
commit4dc06b2e8d8cfc5a363555a8ae7bc1f7aac2d7e9 (patch)
tree1678f31896b67867a2af3592d74d1c5c3a7bbacf /.config/nvim
parentd203ea69eb995b9a56c496aedb6bd9dd3130f9a2 (diff)
new vim functions and remove rss bloat
Diffstat (limited to '.config/nvim')
-rwxr-xr-x.config/nvim/init.vim32
1 files changed, 32 insertions, 0 deletions
diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim
index 61aab55..2dc3db4 100755
--- a/.config/nvim/init.vim
+++ b/.config/nvim/init.vim
@@ -22,6 +22,8 @@ Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
" Go Deoplete sources
Plug 'stamblerre/gocode', { 'rtp': 'vim', 'do': '~/.vim/plugged/gocode/vim/symlink.sh' }
Plug 'deoplete-plugins/deoplete-go', { 'do': 'make'}
+" Automated vim bulletpoints
+Plug 'dkarter/bullets.vim'
" Todoist with vim?
Plug 'romgrk/todoist.nvim', { 'do': ':TodoistInstall' }
" LaTeX deoplete
@@ -256,5 +258,35 @@ nmap <leader>gc :Gcommit<CR>
inoremap ;; <Esc>/<++><CR>"_c4l
inoremap << «
inoremap >> »
+" Spelling quickfixes
+function! QuickFixSpell(dir)
+ " -1 Means previous spelling err
+ if a:dir == -1
+ normal! ms[s1z=`s<cr>
+ " 1 Means next spelling err
+ elseif a:dir== 1
+ :normal! ms]s1z=`s<cr>
+ endif
+ execute 'delmark s'
+endfunction
+
+nnoremap <s :call QuickFixSpell(-1)<cr>
+nnoremap >s :call QuickFixSpell(1)<cr>
+
+" Markdown Heading underline
+function! UnderlineHeading(level)
+ if a:level == 1
+ normal! yypVr=
+ elseif a:level == 2
+ normal! yypVr-
+ else
+ normal! I###<space>
+ endif
+endfunction
+
+nnoremap <leader>u1 :call UnderlineHeading(1)<cr>
+nnoremap <leader>u2 :call UnderlineHeading(2)<cr>
+nnoremap <leader>u3 :call UnderlineHeading(3)<cr>
+
" #---Filetype Specific Settings---# "
set runtimepath^=~/.vim/bundle/todoist.nvim