I had a discussion with a friend today about how to "split lines effectively" in gvim. The trick below came up and he mentioned "yeah but I want something that will work in default gvim without having to create a binding or macro." I'm curious why gvim doesn't have a single keystroke that does a line split since it would make sense given the ability to join lines (J). Currently (as stated below) the only way I know how to split a line is i<CR><Esc>
In gvim you can do i<Del><Esc> or 0i<BS> to join lines. So the need for (J) is superfluous. Why is there no antithesis to J for splitting lines? Thanks! Chuck -----Original Message----- From: Peter Hodge [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 13, 2006 8:11 PM To: Meino Christian Cramer; vim@vim.org Subject: Re: Two """problems""" Hello, --- Meino Christian Cramer <[EMAIL PROTECTED]> wrote: > > 1.) Splitting line into two from normal mode. > My current "concept" (hu...great word...;) to split a line into > two is (starting and ending in normal mode, which is wanted): > > i Ctrl-j <esc> > > Are there any shorter ways to split a line, may be without the > detour around insert mode ? I found the following mapping helpful: nmap <TAB> i#<ESC>r Basically that lets you hit <TAB> in normal mode and insert a single character. With that mapping in place, you could use <TAB><ENTER> to insert a linebreak quickly. regards, Peter ____________________________________________________ On Yahoo!7 Answers: 25 million answers and counting. Learn something new today http://www.yahoo7.com.au/answers