On 05/01/09 03:31, Aman Jain wrote:
> Is there a quicker way to insert a blank line, than by doing 'o'->ESC
>
> Thanks
> Aman Jain
To insert an empty line and remain in Normal mode, without going to
Insert mode and back:
below current line:
:put =''
above current line:
:.-1put =''
elsewhere: add a line number
e.g., above first line
:0put =''
after last line
:$put =''
You can map this to a key:
:map <F5> :put =''<CR>
:map <S-F5> :.-1put =''<CR>
:cmap <F5> put =''<CR>
:cmap <S-F5> -1put =''<CR>
then use F5 in normal mode to open a line below current line; Shift-F5
to open it above current line; or hit : (colon) then a line number (or
anything which is valid as a line number within a |range| e.g. a
pattern, a mark, $ for "last line", etc.) then hit F5 to open an empty
line after that line. Same with Shift-F5 for "before that line".
Best regards,
Tony.
--
The man who sets out to carry a cat by its tail learns something that
will always be useful and which never will grow dim or doubtful.
-- Mark Twain.
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---