Added vimwiki tag search keybinding

This commit is contained in:
Warwick 2022-03-18 16:35:36 +00:00
parent 8e1dd25ab9
commit 59c93de8aa
2 changed files with 13 additions and 13 deletions

View file

@ -118,15 +118,15 @@ endif
" GLSL
autocmd! BufNewFile,BufRead *.vs,*.fs,*.glsl,*.frag,*.vert set ft=glsl
" dotoo
"set hidden
"let g:dotoo#agenda#files = ['~/Dropbox/org/*.org']
"let g:dotoo#capture#refile = expand('~/Dropbox/org/refile.org')
"autocmd! BufNewFile,BufRead *.org set filetype=dotoo
"augroup dotoo
" autocmd!
" autocmd BufNewFile,BufRead *.org *.dotoo set hidden
" autocmd FileType dotoo,org,tex,text setlocal textwidth=80
" autocmd FileType dotoo,org,tex,text setlocal spell spelllang=en_gb
"
"augroup END
" Vimwiki
" A little function to insert user input functionality into remaps
function! TagSearch()
call inputsave()
let replacement = input('Enter Tag: ')
call inputrestore()
execute ':VimwikiSearchTags '.replacement
execute ':lopen'
endfunction
nmap <Leader>w? :echon " wts search-tags"<CR>
autocmd FileType vimwiki nmap <Leader>wts :call TagSearch()<CR>

2
vimrc
View file

@ -102,7 +102,7 @@ set wrap linebreak nolist
"Leader mapping
let mapleader = "\<Space>"
nnoremap <Leader>? :echon " n :Lex \n l? lsp help (if implemented in buffer)"<CR>
nnoremap <Leader>? :echon " n :Lex \n l? lsp help (if implemented in buffer)\n w? vimWiki help"<CR>
nnoremap <Leader>n :Lex<CR>
" Load Plugins
so ~/.vim/plugins.vim