On 10/02/11 5:59 PM, Christian Brabandt wrote:
On Thu, February 10, 2011 12:43 am, Ben Schmidt wrote:
I seem to remember there is an option to make J behave like an
operator, rather than taking immediate effect, or there being another
command that is an operator for joining lines. A quick check of the
help doesn't reveal it to me. Can someone point me to it, if it
exists?

Are you confusing this with 'tildeop'?

That seems likely, Christian! Thanks for the reminder about that.

For the record, my .vimrc now has

nnoremap J :set operatorfunc=Joinoperator<CR>g@
nnoremap gJ :set operatorfunc=GJoinoperator<CR>g@
onoremap J j
func! Joinoperator(submode)
        '[,']join
endfunc
func! GJoinoperator(submode)
        '[,']join!
endfunc

so I can do JJ to join just two lines, but also use J with a motion.

Ben.



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