How do I start vim in insert mode?

You can start vim like this:

vim -c 'startinsert' FILENAME

If you want, you can edit the .bashrc file (if you are using bash) and add this line:

alias vim="vim -c 'startinsert'"


You can use vim +star, which is even shorter. NB: star is short for :help :start.

If you want this behavior by default, the best option is to add the line

autocmd BufRead,BufNewFile * start

into your ~/.vimrc. Also take a look at :h 'insertmode', which outlines a special option made for this kind of functionality. However, it can make it difficult to get out of insert mode which is crucial for growing in your vim ninja skills.

Tags:

Vim