Monday, November 30, 2009

Re: ctrl+J without adding a space

On Nov 30, 2009, at 2:17 PM, Dominique Pellé wrote:

> Peng Yu wrote:
>
>> I use ctrl+J to join two lines. However, there will always be a space
>> added between the two lines that are joined. I'm wondering how to
>> configure gvim not to add this extra space?
>
> See :help gJ

Thanks to this question and answer, my .vimrc just gained a new mapping:

map <D-j> gJ

(I'm on a Mac, so <D-j> is Command-j, which was previously unmapped.)

That said, "ctrl+J"? Isn't that just a newline? On my keyboard, shift-J
joins two lines, adding a space between them (and trimming any leading
space that may have been on the line below).

Dave

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

No comments: