Wednesday, May 27, 2015

Re: Operator Mapping newbie question....

On Wednesday, May 27, 2015 at 9:44:17 AM UTC-7, Sonny Chee wrote:
> Hey Guys,
>
> I have the following operator mapping in my .vimrc that I think should allow me to execute an operation on the contents of the next parentheses. Howeveer, when (in normal mode) I do d<leader>p nothing (visible) happens... the cursor doesn't move and nothing gets deleted. I'm not sure how to diagnose this... any help would be appreciated.
>
>
> onoremap <leader>p <c-u>normal! f(v%<cr>


I was premature in my posting. I figured out the issue. I forgot to prefix the <c-u> with a semicolon. So the following in my .vimrc works.

onoremap <leader>p :<c-u>normal! f(v%<cr>

--
--
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/d/optout.

No comments: