Vim: bringing the cursor to 1st char in current line (command mode).
Just in case someone can reply a silly question, I've quite forgotten the vi/vim command to bring the cursor to the 1st char in the current line. I do remember that for bringing it to EOL is '$'. And the help is so big I made up my mind to consul LQ firstly. Regards.
|
The vim command cheat sheet says the command you seek is O (uppercase letter o).
|
There must be some misunderstanding. I'm pressing ESC twice (just in case), then capital o, and, as a result, vim enters insert mode. Perhaps you speak about vi, and vi behaves unllike vim in this point.
|
Quote:
the MAN for vim clears up any of the o O 0 confusion: -o[N] Open N windows stacked. When N is omitted, open one window for each file. -O[N] Open N windows side by side. When N is omitted, open one window for each file. Whilst zero is not mentioned, clearly upper case O is not character zero of the current line. This may help more: http://vimdoc.sourceforge.net/htmldo....html#help.txt |
To get to the first character of the current line its capital L.
'o' and 'O' are for creating new line below and above the current line. Just checked om my pc (vim 7.3) :). |
Quote:
The uppercase letter O begins a new line above the current line and enters the insertmode. Markus EDIT: SilverBack was faster than me ;) |
The classic command is ^ . The Home key also works here.
The L command here moves to the first character of the last line, same as G. There is almost certainly a difference between L and G. Any ideas? |
Quote:
L moves to the first column in the last line of the current screen. Markus |
Quote:
|
Quote:
|
Quote:
|
Quote:
Plus, why lowercase at all? In the old days of fortran, letters were all capitals, since this contributed readability for the data entry. |
Quote:
Code:
1| Of course 1 can be replaced by any column number. |
Quote:
|
I didn't know that, although I had found long texts in uppercase are awkward to read. But for short variable names, uppercase may be easier to read.
|
All times are GMT -5. The time now is 07:40 PM. |