0

I'm trying to remap <leader>t to search for a specific string [ ] to save time running /\[ \] every time I search for it.

Things I've tried :nnoremap <leader>t /\[ \]<CR> but it doesn't work. Any help would be appreciated.

3
  • I works for me using Vim 9.0. Your mapping is define for normal mode. Do you confirm that you are using it in normal mode and not in insert mode? Do you have other mapping that starts with <leader>t? What is the output of the Vim command verbose map <leader>t? Dec 16, 2022 at 17:50
  • "It doesn't work" is meaningless. What do you do? What do you expect to happen? What happens instead? Etc.
    – romainl
    Dec 16, 2022 at 19:22
  • I suspect :nnoremap <leader>t /\\[ \\]<CR> might work
    – D. Ben Knoble
    Dec 16, 2022 at 23:09

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.