4 ms·
Defaults: Agreed, though those of us who have been on vim for a long time obviously have a .vimrc we carry around. It'd be nice to have a better set of defaults
by gfodor 16y ago
Defaults: Agreed, though those of us who have been on vim for a long time obviously have a .vimrc we carry around. It'd be nice to have a better set of defaults.
Plugins: Vimballs already solve this problem largely.
Automatically in insert mode: Oh gosh no. The only case where you'd want to start in insert mode, I'd guess, is a new file. If you're opening an existing file, you're not going to start wanting to type at the beginning of it. Generally the first command in a file is a search or jump to line.
The author mentioned that he wanted a plugin that can quickly comment a line. There's more than a few ways to do this manually in vim that is quick. For example, to comment a block:
^<ctrl-v><n>jI# <ctrl-[>
where <n> is the number of lines to comment. You can also easily write a command in your vimrc to comment the current line in one keystroke.
- wwortiz 16y agoThanks for that tip I would just have Visual mode, select lines, I, and then #, Esc Esc I need like a vim tip a day or something to show me more of these tricks.
- Lewisham 16y agoI think it might be telling that the first I've heard of Vimballs is your comment, so I won't say much more about that :) It seems only Supertab Continued with it's odd ":%so" install thingy was a Vimball, but the author never called it that on his Vim.org/scripts page. Automatically in insert mode is what I expected to be the most divisive comment, and it proved so! Maybe this would be solved by my distribution suggestion: new users get Vim in insert mode, seasoned vets get Vim in normal mode on start-up. There isn't one setting that will please everyone, although I do have a suspicion that the normal mode at start-up turns off more people than might be expected. For the comment command deal, I found similar blog posts along that line. Again, I think it's the sort of command that isn't obvious to new users, and you need to be jiving with the Tao of Vim before it makes sense (I only have a half handle on it myself). I just wanted a keyboard command, like Textmate's Cmd+/ . NERD Commenter's key command is ,/, which makes me happy, and it works across multiple file types. My hope is that when I get better at Vim, I'll be able to come up with such commands myself, but I don't expect that sort of proficiency for months, if not years. I'm perhaps a slow learner ;)
- xtho 16y agoSince more and more plugins are available as git repositories, vimball becomes less important though.