Does anyone know how to change vim's default mode? Its default mode is command mode, but could I change it to insert mode?
相关问题
- How to get the return code of a shell script in lu
- Is shmid returned by shmget() unique across proces
- how to get running process information in java?
- Invoking Mirth Connect CLI with Powershell script
- Error building gcc 4.8.3 from source: libstdc++.so
Just add the following line to your vimrc:
Vim's default mode will be changed to Insert mode. Just press Esc to enter Command mode.
You can try the 'insertmode' option (add
set insertmode
to your .vimrc file), although I recommend that you learn the standard vi operation, because not all vi-like editors support this mode of work.cheers, mitch
If you really want an editor that starts out in insert mode, perhaps vim is not the editor for you.
Most editors that aren't based on vi behave the way you want. Emacs is very powerful, but it may be too complicated for your needs. Nano (
man nano
forinfo nano
for more information) might be a good choice. There are other possibilities.vim really isn't designed to be used that way. As others have said, there are ways to force it to start up in insert mode. (I've been using vi-style editors for decades, and I didn't even know about
:set insertmode
until now.) But it's awkward to use.My advice: either (1) use an editor that behaves the way you want, or (2) spend some time learning to use vim in its default configuration, and see if you can get used to it.
One big advantage of vim's separation of insert and command modes is that the command mode can use letters as commands; modeless editors generally have to use control keys or function keys to execute commands.
You can use
or
That launch vi and put it insert mode. You can do an alias to that if it's really usefull (I still understand why you want that anyway). You can also look at this tip.
"Cream" is a project that aims to make Vim easier to use. By default everything you do in Cream is in insert mode, I believe:
http://en.wikipedia.org/wiki/Cream_%28software%29