Tuesday, February 4, 2014

Custom in search cmd line

Hello,

I would like this two maps to work:
cno <Plug>SearchCmdWin :call setline(line('.'), '\v' . getline(line('.')))<cr>
cno <expr> <c-f> getcmdtype() == '/' ? '<c-f><Plug>SearchCmdWin' : '<c-f>'

i.e. in the search command line I would like <c-f> to open the command
line window and change the current line by inserting \v. The second map
is not called, or maybe it is done to early and so the first line is not
changed.

Another approach would be to use autocommands via WinEnter, but I don't
know how to recognize that the current buffer is the command line window
associated to the search command /.

Any ideas?

Best regards,
Marcin Szamotulski

--
--
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.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment