A colleague of mine was talking up the virtues of Vim (we're a Windows shop), so in response I decided to learn all the keyboard commands of Visual Studio - there are eight-hundred and thirteen. I'm a perverse bastard.
I'm still working at it, but ye gods has using the keyboard made me faster. In Visual Studio. Run the test suite? BAM. Switch to Team window and commit? BAM. Switch tool windows? BAM taptaptap (don't ask).
Ironically, I have sort of convinced myself that my co-worker probably has a point.
A big difference between Vim and your 813 hotkeys is that Vim has a structure to the key bindings. Where you have to memorize individual hotkeys for each command in VS, Vim commands are simple languages. So when you learn a new action or scope, you can combine that with everything else you already know.
E.g. I know how to indent the entire file. Cool. Then I learn about the block scope, so I immediately know how to indent the block. Then I learn how to format text to be confined within the set text width. Now I immediately know how to format the entire file and a text block. Then I learn about the "from cursor to character X" scope and now I can perform all known actions on this scope as well.
Note that the scopes are not like selections. They are controlled by keyboard input, even though in Vim, selections are just another action as well and now that I know the key for that, I know how to select any of the scopes I already know.
For VS and other IDE's and editors, each permutation of these scopes and actions would require its own hotkey, or it can only work with a selection and for that you have to spam ctrl+arrow/pg{up,down}/{home,end}, which to a Vim user are clunky and imprecise.
This is of course just scratching the surface of all the power of Vim that are accessible through a few key presses..
A big difference between Vim and your 813 hotkeys is that Vim has a structure to the key bindings
No, I agree. That was my first thought when looking at them all. It'll take quite a while to memorize the ones I need (which isn't really all 813). To be fair, that also makes it funnier.
For VS and other IDE's and editors, each permutation of these scopes and actions would require its own hotkey, or it can only work with a selection and for that you have to spam ctrl+arrow/pg{up,down}/{home,end}
I don't know what other editors you're using, but mine lets me select a block, the entire file, or every occurance of a word with a single keystroke.
What about "from the cursor to the {first,last} occurrence of character X", or within/around/surrounding the pair of quotes, parenthesis, html tag, brackets, sentence, function argument, block, paragraph .. ?
within/around the surrounding pair of parens, HTML tag, brackets, function arg (mostly), block (indentation-delineated or brackets-delineated), and paragraph are all a single keystroke.
To the first/last occurance of X it doesn't do, and is the one thing from VIM that I've seriously missed.
Then again, it does have VIM mode, so I could just set it to behave exactly like VIM.
That's the vim way of doing this though. It's really hard to compare things.
For example, going to the end of the line is super important for most editors, but in vim it's the overly clunky $. Why is it like this? Because going to the end of the line in vim just isn't very important, there's so many other ways of doing things. E.g. o to get a new line below the current one, or yy to copy the entire line.
Marks are insanely useful. How many times have you ever wanted to do something in one function that involves checking something from another? (Hint: all the time). Just do ma to set a as a mark right here and then go off and check the other function. Then do `a to return. The advantage is that in large files you often forget exactly where the original spot was when hunting down what you need to know, which wastes time.
This is why I don't really care about vim. The message here isn't that vim is some sacred greatest editor ever, but that forcing yourself to fully learn your tools will produce better results than just getting good enough.
From another discussion, this learning-your-tools things includes things like word, it is a powerful document editor that some people think "just works", but then they run into all sorts of difficulties with formatting. But if you actually take the time learn what the internal model of a document is and work to that strength it is surprisingly good.
things like word, it is a powerful document editor that some people think "just works", but then they run into all sorts of difficulties with formatting. But if you actually take the time learn what the internal model of a document is and work to that strength it is surprisingly good.
Actually no. Yes, you can try and avoid many of the pitfalls of “naive” usage of Word, but even after you know it inside out it's not surprisingly good. Its internal model is fundamentally broken. Its editing capabilities are pitiful. Its formatting capabilities don't even match up with CSS2. A large part of this is that it tries to be too many things from a word processor to a desktop publishing application, failing miserably at all of them.
Wow, that's pretty incredible, I would have never expected VS to have so many shortcuts. Saving this for reference in case I'm ever using VS again, even if though I'll probably learn way less than the full 813.
147
u/Darkmoth Sep 24 '15
A colleague of mine was talking up the virtues of Vim (we're a Windows shop), so in response I decided to learn all the keyboard commands of Visual Studio - there are eight-hundred and thirteen. I'm a perverse bastard.
I'm still working at it, but ye gods has using the keyboard made me faster. In Visual Studio. Run the test suite? BAM. Switch to Team window and commit? BAM. Switch tool windows? BAM taptaptap (don't ask).
Ironically, I have sort of convinced myself that my co-worker probably has a point.