rpmcmurphy wrote:
> How does one search characters under cursor? Not '*' which is a whole
> word. I am looking for something like / and then repeated typing of
> some special character, say ~, which will add the next character from
> cursor position in the file. For example say the file contains "The
> quick brown fox jumped over the lazy dog." and the cursor is
> positioned at k at the end of "quick". I want to create a search for
> "k bro" without having to type the letters. I have seen emacs users do
> it and I thought I had found a way to do it once in vim but I can't
> remember how.
You might try this pair of mappings:
nnoremap <f4> :let @/=escape(getline('.')[col('.')-1],
'.~\\')<cr><right>
nnoremap <f5> :let @/.=escape(getline('.')[col('.')-1],
'.~\\')<cr><right>
You may have to tweak the set of characters that are escaped, but
it should allow you to hit <f4> to start, and then <f5> to keep
adding consecutive characters to the search pattern.
-tim
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---