diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index 6866411..d178ee3 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -56,6 +56,7 @@ Plug 'reedes/vim-textobj-sentence' " extends the capabilities of sentence detect Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' } " show a directory listing within vim Plug 'Xuyuanp/nerdtree-git-plugin', { 'on': 'NERDTreeToggle' } " show git status in nerdtree for files and dirs Plug 'Yggdroot/LeaderF', { 'on': ['Leaderf', 'LeaderfFile', 'LeaderfBuffer'], 'do': './install.sh' } " fuzzy matcher, apparently faster than fzf, ctrlp, unit, denite +Plug 'dyng/ctrlsf.vim' " Language Integration Plug 'sheerun/vim-polyglot' " syntax plugins for almost every language @@ -357,6 +358,20 @@ nnoremap E :NERDTreeFind nnoremap f :LeaderfFile nnoremap F :LeaderfBuffer +function! SearchWiki() + let l:curpath=getcwd() + :execute(":cd " . g:wiki_root) + let l:texttofind=input("Search in Notes: ") + :execute(":CtrlSF " . l:texttofind) + :CtrlSFFocus + :execute(":cd " . l:curpath) +endfunction + +" search in wiki with ctrlsf +nnoremap wf :execute(":call SearchWiki()") +nnoremap CtrlSFPrompt +vnoremap CtrlSFVwordPath + " Mostly dealing with Prose writing from here on out " Format current Paragraph (esp useful in prose writing) nnoremap q gqap