Tuesday, November 22, 2011

Re: Using Vim's :help feature to find keyboard shortcuts

On Tue, Nov 22, 2011 at 6:20 PM, Dotan Cohen <dotancohen@gmail.com> wrote:
> I am trying to find a keyboard shortcut in VIM for inserting a new
> line below the cursor and moving to it, from Insert mode. Basically
> this would be <ESC>o so it would be easy to map, but I suspect that
> this handy shortcut must already exist (it does exist in IDEs such as
> Eclipse and Visual Studio).
>
> Assuming that it might be some modifier key (shift, ctrl, alt) and
> either Enter or O itself, I tried various combinations of ":help
> ctrl-enter". This, in addition to experimentation and googling. The
> VIM help system tells me that it has no entry for ctrl-enter, and even
> though I found via google that Ctrl-o,o does what I want, the help
> text for Ctrl-o makes no mention of what this shortcut does in Insert
> mode. That, or I am using it wrong. Am I using the help wrong? Should
> the help text describe what the shortcut does in Insert mode too?
>
> Thanks.
>
>

Hi

To find out what something does in insert mode, prepend it with i_
ie:
:help i_CTRL-O

(On another note, it sounds like you are spending too much time in
insert mode, remember: insert mode is just for entering text, and when
you are done press <esc>. The "vim"-way of doing what you want to do,
is to do as you already described it, just press o. Because normally,
you should be in "normal" mode and not insert mode)

Best regards

--
Albin Olsson, IT Consultant and Classic Connoisseur
www.albinolsson.se | albin.olsson@gmail.com
+46 707 831 830

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: