10
2
While typing I realize that I need to move to the beginning of the line. Usually I use <Esc>
and I
. But I am wondering if there is another way to move to the beginning of the line in the insert mode.
10
2
While typing I realize that I need to move to the beginning of the line. Usually I use <Esc>
and I
. But I am wondering if there is another way to move to the beginning of the line in the insert mode.
15
You can use Ctrl-o which switches to normal mode for one command. This allows you to do movements, such as:
7
I will remap some shortcut keys in my vimrc, most of them are cursor moving under the Insert mode.
For example, I will use the Emacs-Like (as same as in Linux Terminal) shortcut:
map <C-a> <ESC>^
imap <C-a> <ESC>I
map <C-e> <ESC>$
imap <C-e> <ESC>A
inoremap <M-f> <ESC><Space>Wi
inoremap <M-b> <Esc>Bi
inoremap <M-d> <ESC>cW
That means:
Of cause, vim has default shortcut key for Delete a word (forward) [Insert Mode], that is Ctrl+w
0
The Home key works in Vim while in insert mode.
What platform? Mac Linux Windows
GUI or terminal? – broomdodger – 2014-01-25T05:18:17.620
Just to be said, it would certainly be preferable to stick with
<Esc>
then move, insert, replace or whatever. That way your changes will be registred in the undo tree. – Yannick – 2014-01-27T07:34:21.437