Move function out of maps.vim to vimrc

Does not directly create a mapping and should stay somewhere else than
the mapping file.
This commit is contained in:
Marty Oehme 2019-11-21 14:05:44 +01:00
parent 99df4a278c
commit a054b717d2
2 changed files with 9 additions and 17 deletions

View file

@ -517,6 +517,15 @@ call matchadd('ColorColumn', '\%81v', 100)
" the directories it is supposed to
au BufNewFile,BufRead /dev/shm/gopass.* setlocal noswapfile nobackup noundofile
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
" }}}
" KEYBINDINGS {{{
" ================================================================================

View file

@ -152,23 +152,6 @@ let g:nv_fzf_binds = [
\ ]
" Markdown & Pandoc compilation group
" the commented out command can be used if vim-rmarkdown plugin is not
" installed (it is a bit more brittle)
" autocmd FileType rmd noremap <F10> :!echo<space>"require(rmarkdown);<space>render('<c-r>%')"<space>\|<space>R<space>--vanilla<enter>
" Compile with rmarkdown
" autocmd FileType markdown,rmarkdown noremap <leader>c :RMarkdown pdf<cr>
" autocmd FileType markdown,rmarkdown noremap <leader>C :RMarkdown! pdf<cr>
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, in fullscreen window
nnoremap <leader>wf :execute(":call SearchWiki()")<cr>