On Apr 19, 4:16 am, epanda <[email protected]> wrote:
> Hi,
>
> I am writting a macro that aims to replace a word by and
> expand(myCounter.
>
> The macro search for the word before doing substitution.
>
> How can I visually change the under the cursor by expand(myCounter ?

If I understand what you're asking (and I'm not sure I do)...

nnoremap <F8> ciw<C-R>=myCounter<CR><Esc>

Example:
let myCounter = 42
Put cursor on `test' in following line:
Here's a little test.
Hit <F8> and the line changes to...
Here's a little 42.

Hope it helps...
Brett Stahlman

>
> Thank you
>
> --
> 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, visithttp://www.vim.org/maillist.php
>
> Subscription settings:http://groups.google.com/group/vim_use/subscribe?hl=en

-- 
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

Reply via email to