From 4dc06b2e8d8cfc5a363555a8ae7bc1f7aac2d7e9 Mon Sep 17 00:00:00 2001 From: Benjamin Chausse Date: Tue, 8 Dec 2020 21:49:41 -0500 Subject: new vim functions and remove rss bloat --- .config/nvim/init.vim | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to '.config/nvim') 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 gc :Gcommit inoremap ;; /<++>"_c4l inoremap << « inoremap >> » +" Spelling quickfixes +function! QuickFixSpell(dir) + " -1 Means previous spelling err + if a:dir == -1 + normal! ms[s1z=`s + " 1 Means next spelling err + elseif a:dir== 1 + :normal! ms]s1z=`s + endif + execute 'delmark s' +endfunction + +nnoremap +nnoremap >s :call QuickFixSpell(1) + +" Markdown Heading underline +function! UnderlineHeading(level) + if a:level == 1 + normal! yypVr= + elseif a:level == 2 + normal! yypVr- + else + normal! I### + endif +endfunction + +nnoremap u1 :call UnderlineHeading(1) +nnoremap u2 :call UnderlineHeading(2) +nnoremap u3 :call UnderlineHeading(3) + " #---Filetype Specific Settings---# " set runtimepath^=~/.vim/bundle/todoist.nvim -- cgit v1.2.3