Hacker News Comments on
Why I use VIM
VictorTaelin
·
Youtube
·
70
HN points
·
0
HN comments
- This course is unranked · view top recommended courses
Hacker News Stories and Comments
All the comments and stories posted to Hacker News that reference this video.⬐ hasenjAfter years of using vim, I switched to visual studio code because it feels like a plain text editor but has all the features of IDEs that matter to me: intellisence.⬐ Eridrus⬐ grogenautDo people just not use debuggers?There's piles of marginally useful stuff in IDEs, but I don't understand how this entire thread hasn't mentioned debuggers or continuous type checking.
I know you can setup vim to do a lot, but this comes out of the box in IDEs.
⬐ falcolas⬐ fgonzagIf you're using Vim, there's a good chance you're doing it in a terminal. In which case you have all of the debugging tools you could ever need right inside the same terminal.That's why I (and many others, I'm sure) don't mind that I don't have a debugger built into vim - it's just in another tab.
As for constant type checking, it too is available via plugins.
Vim mode in VS Code kinda sucks though. Not nearly as good as the ones found in IntelliJ IDEA or Visual Studio. Once it gets better I'll probably switch to VS Code for my standard text editor though.⬐ chillee⬐ arjieSpeaking as somebody who's contributed to the extension, what issues did you have with it? I think it's pretty good, personally (although definitely not as good as VSVim).⬐ fgonzagRight off the cuff, I can't get the :s command to work properly. Find ('/') command is sometimes funky too. Other things I've noticed is the buffer system (copy and paste) doesn't work correctly much of the time.Other than that, I seem to remember having problems with some movement commands (screen forward I think), though that was probably due to the keybindings more than the extension itself.
I've scripted and dabbled in VIMs code before, your comment just motivitated me to actually submit bugs to the tracker and to try and fix them self!
⬐ chilleeAt least for me, :%s/foo/bar seems to work fine, as does the find command.I think that registers should mostly work pretty well too ("ayy and then "ap work fine for me).
I don't know if this is what you're talking about, but we have some ctrl+d/ctrl+u bugs that have to wait for upstream changes :/ https://github.com/VSCodeVim/Vim/issues/1348
I saw that you said you'll submit bugs to the tracker, so I'll see those then :)
We've been pretty active about adding features/fixing bugs:
Depends on the language. With neovim, neoplete, and vim-go, Golang is quite pleasant on vim.⬐ nlawalkerIn my years of pretty much working only in Visual Studio/C#, I've occasionally poked around in vim for a few things and always immediately turned back. It was just weird. I didn't see the benefit of giving up all of the features and familiarity.Recently, I've found occasion to work in other languages, and after dabbling in vim for a little while, I switched to VS Code. After gaining a little bit of enlightenment about what a comfortable developer workflow looks and feels like outside of the C# ecosystem, I've had three key insights:
- I actually appreciate the transparency and flexibility of delegating so many tasks to command line tools that can be run via scripts and task runners. Thing still aren't quite as discoverable as they are in VS, but I have enough general dev experience that I know what to Google for.
- I still don't care for vim. Maybe someday, when I want to invest time in becoming a keyboard Jedi.
- Most importantly: it turns out the only feature I really, really missed leaving Visual Studio was IntelliSense. Not just semi-intelligent word completion, but real IntelliSense, with inline documentation, snippets and parameter info. I don't know why anyone who has ever taken advantage of it would go without it if given the option - it is a bicycle for the programmer's mind at every skill level, from early discovery of a language's syntax and standard libraries to extreme proficiency.
⬐ WillPostForFoodWhen you brought up the bicycle metaphor, the first thing that came to mind was training wheels. Training wheels aren't bad when you start, but training wheels quickly get in the way of really mastering riding a bike.⬐ hasenjThat sounds like an excuse for not doing proper intellisence in a text editor.Intellisence never gets in the way in my experience. Rather the lack of it gets in the way.
⬐ nlawalkerI've heard this before, and I've also seen IntelliSense labelled as a crutch. I don't understand this - how does IntelliSense prevent mastery of a language? Does it make a difference if someone's mastery of a language involves them using IntelliSense?It'd be great if he actually explained any of that. One of the problems I've had with vim and emacs is the average user is so far into it they forget all of the base stuff that new users have issues with, so most guides skip all of that. It's gotten better with both of them with the package managers. However because they're so flexible I find that most users customize the key bindings in one way or another. And so when they show off how to do things it doesn't translate as all of the keys are different and I not only have to map the new feature of the new editor I have to also go through a key translation map. It is a very high barrier to entry. Same thing goes with all of the plugins people install. Emacs and vim are so far from stock on most people's machines it's impossible for me to learn by following.I took a emacs class at a very good tech conference and I was 1 minute late and missed the key bindings changes the instructor had made as the first step. I was unable to follow anything for the next 30 minutes and walked out and got my money back. (This is much more an issue with the instructor than the editor).
I do like both of them and try and learn them every few years but I also try and be flexible across as many editors as I can be so I can help as many of my junior engineers out as possible. But jumping on someone's vim or emacs is like switching to dvorak. It's also pretty toxic for pairing unless everyone has agreed on setup.
⬐ teddyhAnd if you learn Emacs instead, you can skip the VIM stage completely.⬐ pmoriarty⬐ sshineIt's better to learn both, to have more tools in your toolbox and use the right tool for the job. Both emacs and vim have their strengths and weaknesses, and it's great to have the option to use either when you need it.⬐ podikiOr you can use things like evil [1] to have your vi-style modal editing and eat your Emacs cake too.⬐ pmoriartyThat's mostly what I use, but there are still times that I use vim because even emacs with evil doesn't do what I need (or do it easily, or as well).I used vi/vim for 15 years, and still do when changing configuration locally and remotely, before learning emacs for university work. At work I use Visual Studio, and for personal scribbling I use Sublime Text. I never understood the editor wars.⬐ flogic⬐ helthanatosOn one hand, I get editor wars. On the other, it's rather silly. In order to evolve, editors require a certain amount of mind share for their plugins ecosystem. That said once you have a Turing complete language to extend the editor, they're all basically the same in terms of capability.⬐ LightMachineThose wars are actually quite healthy and productive for the whole, because they make people defend their sides and thus develop their best arguments. They're a great source of information. You just have to be careful not to get emotional and/or degrade to name-calling.⬐ Torwaldeditor wars are like snowball fights. it only hurts if you take the wrong things too serious.Considering I go between Visual Studio, Visual Studio Code, and Android Studio, I'm pretty sure I'm not going to be using VIM or Emacs. Just a Windows centric person.⬐ c0achmcguirk⬐ JackMorganFunny, I use Visual Studio and Visual Studio Code a lot. The first extensions I install are VsVim for Visual Studio and Vim in Code.After being productive in Vim, I can't go back to using the arrow keys and the mouse. It feels like I lost a hand.
⬐ joshjjeAdmittedly im not a hardcore vim/nix user, but I am pretty proficient in nix and CLIs in general. Are you saying you dont use the arrow keys? :D⬐ c0achmcguirk⬐ reckoner2Ha! Sometimes. But getting around in the editor is so easy with the Vim keys that the arrow keys seem archaic.But I still push the arrow keys from time to time, you know, to make sure they still work.
⬐ joshjjeLol, it was half joke im sure you gathered. There isnt really much of a possible shortcut to doing "move the cursor 1 character to the left".⬐ dozzieBut there are shortcuts for things like moving cursor to next indentation block or to closing or opening brace.⬐ pritambaralThe optimization isn't in "move the cursor 1 character to the left", it's in "move the cursor 1 character to the left without moving your arm".I use Visual Studio and I don't see that changing. Do you think it's worthwhile for me to learn to use Vim? Does using VsVim give you the same capabilities as regular Vim? And does using it take away any Visual Studio Capabilities?One of my favorite features of Vim is the built-in history of copy/pastes with history registers. You can learn about them here: https://github.com/steveshogren/10-minute-vim-exercises/blob...⬐ diegoprzlI would say that an important number never go back from the keybindings/modal editing. I use them everywhere I can, from Chromium to Emacs.⬐ IE6I use IDEs when it makes sense but do often times find myself wishing their text editor behaved like VIM.⬐ beached_whale⬐ TorwaldThere are plugins for many to add a vim mode. At least for Intelij based ones(Pycharm, IntelliJ, Clion) and Visual Studio⬐ mavdiThey are normally very buggy and lack the ability to install vim extensions.⬐ virmundi⬐ jcrbenDo you need those extensions in an IDE? I have little experience with VIM, but from watching VIM evangelists, I find they load it with extensions that make into an IDE. Sure the keyboard shortcuts could be helpful, but a lot of extensions are the IDE.⬐ beached_whaleI used the vim extension for Clion oftenhttps://github.com/lunixbochs/ActualVim gives you neovim inside Sublime Text, altho I haven't tried it.I couldn't stand IdeaVim, the one for the Jetbrains IntelliJ platform - felt very buggy. Such as when you open a modal and it remains in Normal mode so you can't enter text.
Currently using https://github.com/VSCodeVim/Vim when using VSCode which is better but still got some rough edges.
Despite a fair bit of use and study - mostly using neovim - I feel that I haven't got as much from vim as I'd expected or hoped. Switching from Normal to Insert mode - even when you get good at the one-time Normal mode commands - doesn't always elegant.
There's all sorts of configurations and plugins that try to plug the gaps, but it's such a huge effort to assemble them all. For example, just installed https://github.com/terryma/vim-multiple-cursors today to attempt get the elegant multiple selection of modern text editors.
⬐ chilleeI've been contributing to VSCodeVim quite a bit recently, so I'd love to hear if you have any suggestions for us to improve on.I agree with the video: it feels amazing. That's what it is about. I can only speak as an ex-Emacs user, never used VIM, but I guess with vi-style editors the feeling is even more intense.I think this is a real valueable thing, this feeling. I wouldn't have to justify using one of those editors with any of the usual reasonings that get pulled by the adherents of these editors. The feeling and it's side effects are awesome enough.
Only reason I use another editor which doesn't suck instead is that I value "macness" even more.
⬐ kstenerudI used vi for years when I needed to edit things or write code on remote machines. And every time I was able to work locally, I'd use an IDE and breathe a sigh of relief.It all depends on your style of development, and mine most definitely is NOT conducive to vi (or emacs).
⬐ throwaway7645Not a power user, but I've used vim for a few years in linux and really like it. It blows my mind how inefficient it is to just open a file in windows, edit it, and save it just using CMD without downloading gvim.⬐ mynameishere⬐ jstewartmobileYeah, notepad isn't good, but it fits your specifications.notepad [filename] type stuff ctrl+s
⬐ throwaway7645The word of what I said technically, but not the spirit. Yes, I've done that before, but it stinks. Notepad is just far too limited for anything outside the absolute basics. Heck, I'd be happy if Windows even had Nano included. I know Win10 has some kind of native bash support, but most of my company still runs Win7 locally and will for some time.My biggest complaint about Vim is that I can't use the same navigational keybindings in every other program I deal with.I'll be surfing the web, type gg, then pause for a second after that doesn't work.
⬐ pritambaral⬐ ArkaadFirefox has VimFX, and it's awesome.⬐ camel_Snakehttps://chrome.google.com/webstore/detail/vimium/dbepggeogba...What I use.
⬐ mercerThere's also cVim. I don't know if either one is better, but mostly I can't believe I've been able to browse without vim keybindings for so long!What about the learning curve, though?⬐ johncoltrane⬐ podikiIt's a power tool—like Photoshop, Blender, Cubase, etc.—so yeah, expecting a flat learning curve is not very realistic.⬐ j605I would say don't install plugins when you start using vim. Only install them if you cannot find something in the docs to do it easily. I found that it makes for a good learning experience after I uninstalled all the random plugins I had.As far as learning curve, do vimtutor but use the arrow keys. They don't use arrow keys because the computer didn't have one then. It doesn't make sense not to use it now.
While I don't want to start a debate over VIM versus Emacs (I think they can both be used very effectively once learned), I can't help but share a video [1] on Emacs that made me go "wow!" (The video is somewhat similar, but uses multiple-cursors to do editing all at once, while also recording a macro to repeat it.) I think the real point for Vim or Emacs is that a powerful text editor, combined with the ability to extend it, is an extremely powerful tool.⬐ hackuserThat video is great. The multiple cursors GUI is a brilliant way to visualize a repetitive operation (i.e., one that often would be recorded and executed by macro). I was going to ask if anyone else implements it, but I thought I'd search first. Does anyone know more about it? Its origins? More functionality?* Vim
https://github.com/terryma/vim-multiple-cursors
* Atom (I'm not sure if it's the same functionality)
https://atom.io/packages/multi-cursor
https://www.lynda.com/Web-Development-tutorials/Selections-m...
* Sublime
https://stackoverflow.com/questions/14963775/multiple-cursor...
EDIT: Well it seems like Sublime has had this feature since at least 2012. I suppose I should have considered text editors besides Vim, and I might have known sooner. I'll leave this post in case there are others as narrow-minded as I am ...
⬐ chillee⬐ LightMachineSublime Text was actually the text editor that innovated this functionality. If you look at the github for the vim plugin, they clearly say "True Sublime Text style multiple selections for Vim".Although I've stopped using sublime text since, sublime text really drove forward the gui text editor market.
⬐ johncoltraneNo. JEdit had that feature long before Sublime Text.⬐ chilleeYou seem to be right. I always though Sublime Text introduced it (lots of people seem to believe this: https://medium.com/@schtoeffel/you-don-t-need-more-than-one-...), but sublime text introduced multiple cursors with its release date in 2008, while JEdit appears to have had multiple cursors at least since 2003?Thanks for sharing your experience! EMACs is another masterpiece on its own merits and I'm all for diversity. Also, hijacking the top comment on my own post to say the obvious: people, this is just my opinion! I'm not saying you shouldn't use and love your IDEs because I like VIM! Love you all. Peace!