3 ms·
This is really interesting. I'm quite the opposite. I keep trying to make vim my main devtool but I just can't stay away from a fully fledged ide. At the same
by dastx 6y ago
This is really interesting.
I'm quite the opposite. I keep trying to make vim my main devtool but I just can't stay away from a fully fledged ide. At the same time, having heard from literally everyone that once you do get used to it, vim is way faster to do everything in.
What advice do you have for someone like me to proper get used it once and for all? Are there any good resources you used to learn all the vim shortcuts?
- beojan 6y agoThere are a number of vim plugins (like YouCompleteMe [https://ycm-core.github.io/YouCompleteMe/] https://ycm-core.github.io/YouCompleteMe/]) that can turn Vim into an IDE. If that isn't enough, you could try Emacs (yes, I know) with an evil-mode based distribution like DOOM Emacs [https://github.com/hlissner/doom-emacs https://github.com/hlissner/doom-emacs].
- williamdclt 6y agoSame as you. I've ended up accepting that whatever the features or the plugins, the UX constraints in terminal editors (1-character unit of space, colors, graphical plugins...) will always be a huge limitation. That's reason enough to convince me to use VSCode or Webstorm with a vim plugin
- alwillis 6y agoMacVim uses the Mac’s graphical goodness to make a pretty slick interface for Vim.
- alwillis 6y agoYou don’t learn Vim that way. Once you get the Vim grammar, you just flow. Verb-adverb-noun. This helped me back in the day: http://yannesposito.com/Scratch/en/blog/Learn-Vim-Progressively/ http://yannesposito.com/Scratch/en/blog/Learn-Vim-Progressiv...
- majewsky 6y agoMy advice would be to start with the bare minimum: Using [i] to enter insert mode, [ESC] to get back to command mode, arrow keys to move around in either mode. With this you can use vim like Notepad. Then observe yourself doing stuff and whenever you think "there must be a better way to do X", find out and learn how to do just that. (You would ideally have a cheatsheet on your desk for quick reference. If it's not on there, search the internet.) At this point, it also helps to know about the basic grammar of normal-mode commands: motions as subjects, commands as verbs. Full sentences are either only-motion, command-motion, count-command-motion or command-count-motion. So if you have already learned that "dw" deletes a word, you immediately know that "d2w" or "2dw" deletes two words. There's not much more to it. Just do your actual text editing and if you ever find yourself thinking "there must be a better way to do this", that's another learning opportunity. It's a lot like language learning, really. You can plow through 10,000 vocabulary words in your SRS if you want, but nothing beats actually using the language.
- hellofunk 6y agoinstall vimtutor on your system, or just open this in vim: https://github.com/TheNaoX/vimtutor/blob/master/vimtutor https://github.com/TheNaoX/vimtutor/blob/master/vimtutor It's a great start. Personally, I find most modern IDE features are overrated and not necessary for productivity. For example, context-aware autocompletion is not necessary -- simple autocompletion based on things you've recently typed or that are open already in another buffer covers at least 90% of autocompletions I need. For the rest, I just have to type it out myself once, and now it is remembered too. The same is true for browsing a file tree of your project, using syntax linters or reformatters, etc -- all of these are pretty straightfoward to setup in vim or emacs. It can get a little tricker when dealing with breakpoint debugging, though. But in those cases, I just open in another IDE anyway that has extensive profiling tools, which vim does not have. But that's maybe once a week at most.