7 ms·
Imagine telling the students to use vim if they have never used it before. In theory, one only needs to know a few things to edit: - type vi <filename> to star
by tasty_freeze 6y ago
Imagine telling the students to use vim if they have never used it before. In theory, one only needs to know a few things to edit:
- type vi <filename> to start editing
- there are two modes: 'i' to start insert mode, <esc> to leave it for normal mode
- in insert mode, what you type is entered as you type
- in normal mode, use the cursor keys to move around
- in normal mode, type 'x' to delete the character under the cursor
- type :wq to save and quit
What are the odds a vim-virgin could complete a programming assignment without getting tripped up, despite the explicit directions to use just the features above?
- qwerty456127 6y ago> Imagine telling the students to use vim I can hardly imagine that. They would hate me for wasting their time they could use to learn something practical. To me Vim seems a crazy alien technology of particularly questionable usefulness (even for a keyboard-centric user), only suitable for fun and for looking cool. Unlike PyCharm or Visual Studio, Vim doesn't just have unintuitive features available to whoever chooses to invoke those, it is and can only be operated in a completely unintuitive way, impossible to learn without instruction. And I never needed any instruction on how to use, let alone exit PyCharm.
- nocman 6y ago> I can hardly imagine that. They would hate me for wasting their time they could use to learn something practical. To me Vim seems a crazy alien technology of particularly questionable usefulness (even for a keyboard-centric user) I know tons of developers and system administrators that use vim on a daily basis (that includes me). While I agree that I would not necessarily recommend it for a beginning student, it is entirely unfair to describe it as having "particularly questionable usefulness", and "only suitable for fun and for looking cool". I and many others use vim for real work, not for "looking cool". Yes, the learning curve is high, and it requires investing some time to learn. My experience is that the time I spent learning it was well worth the investment. It's not for everyone, but that doesn't mean that it not for anyone.
- qwerty456127 6y ago> it is entirely unfair to describe it as That's why I wrote "To me Vim seems...". Beyond the fact it's impossible to start using it right away without instruction, everything else is subjective and context-dependent. > My experience is that the time I spent learning it was well worth the investment. How? I tried. But I still can't see how its key shortctus are better than the common ones (i.e. how Esc,Shift+G (yes, I just googled it) is better than Ctrl+End) and how its power in applying bulk edits to many places at once can make me more productive (it would mean I write redundant code if it could). What other things does Vim have which other editors/ides don't? I also find coding without JetBrains-level smart code completion a waste of time.
- blackcats 6y agoVim lets you jump through text. Try G for bottom, gg for top, $ for end of line, 5j to jump 5 lines, 0 for start of line, w to jump word, b backwards etc. Once you know the shortcuts it’s very comfy and you can use them in any modern IDE like JetBrains and the terminal. Having one workflow everywhere (term, ssh, IDE) does it for me
- qwerty456127 6y ago> Vim lets you jump through text. Try G for bottom, gg for top, $ for end of line How is this better than Ctrl+End for bottom, Ctrl+Home for the top, End for end of line? I believe these keys have actually been put on the keyboards right for this and that's why their names are self-descriptive. > 5j to jump 5 lines I can't imagine a case when this would be of serious value. > w to jump word, b backwards etc. Ctrl+arrows. So, I still don't get it although I sincerely want to.
- alpaca128 6y agoThe real advantages of Vim start to become clear once you know the basics and start to understand in how many ways you can combine them efficiently. You can press 'dw' to delete the word right of the cursor. 'd/]' to delete everything from the cursor to the next closing bracket("delete and search next ]"). 'dip' to delete the whole paragraph around the cursor("delete in paragraph"). 'di{' to delete everything between the closest pair of curly brackets. And this doesn't just apply to deletion but most other operations. Vim lets you just combine delete/copy/replace/... commands with inputs that move your cursor, whether it's just the current line or a whole 100-line table column. And of course you can tell it to repeat those operations by entering a number beforehand, or just repeat the last operation by pressing '.'. Vim doesn't make you a 10x developer but it will make you think "oh man, was it really that cumbersome?" whenever you go back to a normal editor. Do you like always moving your hand to the mouse and back when you want to select text? Probably not. Vim makes that step completely unnecessary, among other things. Don't get me wrong, it's not for everyone and that's fine. But if it fits your way of doing things it's a super efficient and flexible tool that is only limited by the user. I've been using it for over 5 years and still learn new, clever ways of doing things quicker.
- eptcyka 6y agoVim pays me the bills.