Sunday, October 30, 2022

Re: How to incude '/' in search(find) string on the fly

It looks like this is giving me what I want:
```

:nnoremap / :call SlashEscape()<CR>/
:function SlashEscape()
:    cnoremap <CR> <C-\>eescape(getcmdline(), '/')<CR><CR>:cunmap <lt>CR><CR>
:endfunction

:nnoremap ? :call QuestionEscape()<CR>?
:function QuestionEscape()
:    cnoremap <CR> <C-\>eescape(getcmdline(), '?')<CR><CR>:cunmap <lt>CR><CR>
:endfunction
```
posted here:
https://github.com/vim/vim/issues/11460

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/38b347c1-6fc2-45c2-b873-3b6eb8a0b9e3n%40googlegroups.com.

No comments:

Post a Comment