I am currently using the following mapping to search for knows tags:
nnoremap <expr> <Leader>t "<ESC>:tselect /" . input("") . "<ESC>"
I also use this mapping to grep all files below the closest tags
file:
noremap <expr> <Leader>g "<ESC>:vimgrep /"
\ . escape(input('/'), '/')
\ . "/ "
\ . fnamemodify(findfile('tags', ';'), ':p:h')
\ . "/**<CR>:cope<CR>"
- Is there an easy way to get
:tselect
results to show up in thequickfix
menu, so that I can browse and preview the buffers that contain the matches? - For
:vimgrep
, how can I show just the menu, rather than automatically opening matches? - Is there a way to open the selected result from the menu in a new split, or replace the current buffer based on user input?
NOTE: I am trying to learn more about Vim, so I prefer to not just install plugins.
nnoremap <leader>t :tselect
? You can tab-complete:tselect
that way.