Wednesday, May 4, 2016

Re: Is any way to save only from normal mode "out of box"?

On 2016-05-04 08:50, Roman wrote:
> 1) We have ZZ (like :x), and ZQ (like :q!), but if I need just to
> save buffer without quit from it? Or I have only ability switch to
> Cmdline mode with ":" and type "w"? I need "out of box" solution
> from normal mode or from insert mode.
>
> 2) How to jump with very minimal keystrokes from insert mode to
> Cmdline mode?

It depends on what you intend to do afterwards, and how frequently
you want to do it. For what I think you're describing, I often use
control-o, colon, w, enter. That temporarily switches to normal
mode (":help i_CTRL-O"), lets you type the ":w" to save, then returns
you to where you were before you issued the command.

If it's something you want to do frequently, you can create a mapping
to do it for you:

:inoremap <f4> <c-o>:w<cr>

though I do this rarely enough (I spend almost all my time in Normal
mode, only going into Insert mode briefly to type text) that I don't
find it worth the trouble.

-tim


--
--
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

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: