On 2006-11-15, Chuck Mason <[EMAIL PROTECTED]> wrote: > 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?
Because In The Beginning was Vi, and Vi viewed Files as consisting of sequences of Lines, each Line being a sequence of zero or more ASCII Characters ending in a Newline. Editing was done by manipulating lines and the characters _within_ lines; the terminating newline was never manipulated directly--the user didn't even have to know how lines were separated. You could split one line into two lines by typing Return or Enter in insert mode or replace mode, but the only way to join two lines into one line was to use the join command (:join or J). This behavior was common in editors at the time. The model of treating a file as a single sequence of characters is more recent. Vim has added features to allow users to manipulate files in that manner if they choose, but these features have had to use the limited set of keys that were available after vi had defined most of them. So, the reason for the J command was the necessity having such a command in a line-oriented editor, not to save key strokes. There was no need for a special command to split lines: typing Return or Enter already did that. (By that reasoning, one could argue that o and O are superfluous as well. I don't have a good answer for that, other than that inserting lines may have been considered by the designer of vi to be more common that splitting lines.) HTH, Gary -- Gary Johnson | Agilent Technologies [EMAIL PROTECTED] | Wireless Division | Spokane, Washington, USA