Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I wonder how much kvetching could have been avoided simply by making Vim open up in insert mode.


The only time I might want vi in insert mode at startup is when I'm creating a new document. Every subsequent time I open the document I'll need to first navigate to somewhere else in the file before I begin typing. They made the right decision.


You can get this behavior if you launch Vim as `evim` or by setting the 'insertmode' option in your .vimrc. It's important to understand, though, that there are very good reasons why this is not the default.

This might be reasonable for the sort of user who only starts up Vim on rare occasions, say when editing a remote file via SSH, and doesn't care to grok the modal style. It would certainly reduce (though not eliminate) confusion for people who encounter Vim for the first time with no prior knowledge, see a strange screen with tildes running down the left side, and spend 20 minutes trying to figure out how to quit, only to give up and just kill the process manually. But crucially, it defeats the _entire purpose_ of using Vim for the non-casual user. `i` is the command that turns Vim into little more than MS Notepad with syntax highlighting; it strips away 95% of Vim's power. If you make insert mode your default, then there's really no reason to be using Vim at all.

Vim is the type of application that expends very little effort coddling new users and instead focuses on being as flexible and powerful as possible for the veteran. That means its reputation for being difficult to learn is not entirely undeserved, but the majority of users who do surmount the learning curve grow to appreciate Vim for its peculiar style, in spite of the initial difficulty it brings.

The other problem with the 'insertmode' option, of course, is that the sort of user who would want to do such a thing is the least likely sort to know that such an option exists or how to activate it.


In terms of usability yes! But how many people would then just stay in insert mode forever, without ever understanding the depth of vi?

Most programs are about getting results now. There usability is most important. But some programs (like vi) are about getting extremely, awesomely better results later on. These tools need the student/user to be in the valley of pain for a long time that they can actually reach this point of enlightment. I would argue that such kind of program also needs to get rid of users, who don't have the motivation or persistence to stay until a certain point of enlightment. Giving up on vi is good for the people who do. They probably wouldn't need this kind of power anyway. And those who desperately want and/or need it will eventually come to that point of understanding the other modes and commands of vi in the end.


I think that for a long time vim or gvim on cygwin used to do exactly that (I could be misremembering here). It's literally just an addition to the vimrc file, so I've personally set up a few people's installs to do that if they asked. (Along with other handy vimrc things.) But I really don't think it's any good. In order to save or quit you still have to return to command mode (unless you're using gvim all the time), and I edit more than I insert for non-new files (that there's a difference surprises people), so you're not really buying anything. Explain the command mode, some basic editing commands, how to get to insert mode and back (perhaps even adding an imap instead of using escape; I like 'jk' myself), and let people use it for it and not just a notepad substitute.


You use Vim more effectively when you stay out of insert mode as long as you can.


Vim is _horrible_ if you stay in insert mode for long periods. In particular, it messes up the undo/redo feature.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: