Live data from Hacker News

How Did Vim Become So Popular?

pragmaticpineapple.com

471–480 of 507 posts

Re: How Did Vim Become So Popular?

#471
post #224

Earlier quoted context omitted.

You may be using vim wrong. Good for you if you like it that way

Politely, I'd consider rephrasing this in the future. Not everyone springs forth into the world with a 5kloc .vimrc. Everyone is incrementally learning from someone else at their own pace.

I'll do. Thank you. I did not realise I was mean because english is not my native language

Re: How Did Vim Become So Popular?

#472
post #284

Earlier quoted context omitted.

I have mainly used vim for development and I can navigate my codebase just as seamlessly with ctags-generated indexes. I'd agree on vim being of limited utility when it comes to automated refactoring (it's a text editor after all), but beyond changing the names or extracting functions what can an IDE do for you in this respect?

My build tool spat out a 700MB compile_commands.json file, which the C++ language server turned into 25k files. None of the language server implementations were able to process even a go to file on the code. it takes about 15 minutes for Visual Studio (well, visual assist) to generate the index for the project, and then the navigation is instant. I've tried a few times over the last few years with various language se…

You can use ctags/cscope to handle that, FWIW languages like C and C++ have a massive toolset built around Vim, so even for the most obscure use case, I'm pretty sure there will be a way.

Re: How Did Vim Become So Popular?

#473

Earlier quoted context omitted.

I dream of the day when Excel will have a vim mode... My life will finally be complete.

Perhaps you should give sc-im a go. It's no excel but a good enough spreadsheet with vim like keybindings. https://github.com/andmarti1424/sc-im

Thank you!

Re: How Did Vim Become So Popular?

#474

Earlier quoted context omitted.

This just sounds like a nightmare to me. I can't stand it when I have a terminal program with an unseeable list of files/panes that have to be opaquely navigated through. I very much want to be one of those vim/emacs ninjas but I just don't see how this is more ergonomic than Jetbrains where any file - not just 'open' ones - is readily available with all sorts of search methods with a single shortcut. And then I can…

> I just don't see how this is more ergonomic than Jetbrains where any file - not just 'open' ones - is readily available with all sorts of search methods with a single shortcut. I would guess the difference is that I use a separate terminal window for all of that stuff. I have my desktop split into three main workspaces. The first has my terminal, the second my browser, the third my editor. I have two more workspace…

> It may not be for you, but it's far from a nightmare in my experience.

Right, everyone has their preferences. As was said in another comment, merely paying attention to and adapting one's personal tooling is a huge differentiator between software developers, regardless of which particular tools those might be. Your setup has a lot of conceptual similarities to mine. I use terminals heavily, but ultimately I personally like a GUI as the 'root' of my working space. I'd rather start from a place where I can navigate everything visually/spatially and then add shortcuts on top of that to automate the most repetitive/tedious paths that naturally occur in that environment.

Re: How Did Vim Become So Popular?

#475
post #459
post #441

Earlier quoted context omitted.

I use the vim plugin inside of VSCode and it's perfect for me. I would never go back to just VIM, or just an IDE. but my best use case for vim modes is stuff like: [c]hange [i]nside ["], where wherever your cursor inside inside of a "string", you can just press ci" and can immediately start typing a new string to fill it. And then this same thing can be changed to ci{ to change everything in {} to change a function,…

Actually I never wondered if there were shortcuts for those, so your response prompted me to check the keymap of m PyCharm. There definetly are many extended ones, but doesn't seem to cover all of that and are not as composeable. > But know that I've learned it, i genuinely don't think about it, and every time I'm not in VIM and have to move my mouse and click on a character I feel like I lose my train of thought of…

> I believe that, so please believe me when I tell you that I just have navigation with the mouse and other shortcuts internalised for many things.

Definitely! I just want to provide an actual reason for why VIM is great as people who are very into it are the worst at telling you why it's good.

It's usually, "well if you spend 3 months tinkering with configurations and plugins, you can basically have most of the features an IDE has out-of-the-box!" which misses the entire damn point of vim.

Also it's great because if you're ever ssh'ing into servers, you can be confident that you can be close to as productive editing files there as you are in your IDE, which I find very re-assuring. But as it is right now, I don't see a reason why anyone should switch to vim unless they enjoy the act of learning it and want to get some of the cool composability features, which are just fun to use and learn

Re: How Did Vim Become So Popular?

#476
post #209

Earlier quoted context omitted.

I use both QuteBrowser and Firefox with Vim Vixen, one of the thing that make me reluctant to switch completely are mostly addons, Multi-Container, cookies auto delete, ublock origin, Privacy Badger, ... I can't browse the Internet without those, and the built-in adblocker of QB is unfortunately not that performant. Also, you can't use the keyboard everywhere (thanks to the modern web) Random example off the top of m…

> and the built-in adblocker of QB is unfortunately not that performant With "performant", I assume you mean "how well it works", not "how fast it works"? FWIW a better adblocker is in progress: https://github.com/qutebrowser/qutebrowser/pull/5317 > Also, you can't use the keyboard everywhere (thanks to the modern web) Random example off the top of my head: https://questions.wizardzines.com/event-loops.html Yay... Yo…

[deleted]

Re: How Did Vim Become So Popular?

#477
post #209

Earlier quoted context omitted.

If you like vimium, you may also like qutebrowser. It's built with keyboard bindings from the ground up, and is keyboard-first. I can browse most sites without taking my hands off the home row.

I use both QuteBrowser and Firefox with Vim Vixen, one of the thing that make me reluctant to switch completely are mostly addons, Multi-Container, cookies auto delete, ublock origin, Privacy Badger, ... I can't browse the Internet without those, and the built-in adblocker of QB is unfortunately not that performant. Also, you can't use the keyboard everywhere (thanks to the modern web) Random example off the top of m…

The way I use qb is I've switched javascript.enabled to false, and occasionally session-enable it for some sites (by default, this is done by typing tsh)

I have also written off a portion of the web as not being worth mytime, however.

Re: How Did Vim Become So Popular?

#478

Earlier quoted context omitted.

> there are many things that are not ideal I’ve never used vim, mind sharing what it’s weaknesses are?

Code browsing and inspection is somewhat hampered by the fact its CLI. I use ctags and macros to move around code but its not always perfect. But then again there are many things I dislike in modern IDEs, I don't think there is a ideal solution, just like there is no one language to solve all problems.

I've been a Windows admin before but now on an app support team running almost all Windows systems as an analyst but came from a poly sci degree. My Linux experience is homelab and a few work connected systems over time like a Ubuntu Server box that managed IP cameras on site. My experience with coding is mostly Windows automation via PowerShell and its built into Windows IDE as I need a dev role here to get like Visual studio. Even then it would be overkill for what I'm writing like temp cleanup, file transfer, monitoring, etc with my recent success was a script that checks every day for a set of reports we should have received and ingested overnight and lists what is missing then emails that info to myself and another team member. Super helpful to double check the business has the reports they need at the start of the day and get us a head start troubleshooting.

With that in mind, I've used VIM for probably under 10 hours total, mostly for editing config files within headless Linux installs. For example, setting a static IP in Raspbian so I could SSH in once I put the pi somewhere it was online but not physically accessible. VIM is really neat for stuff like that. I'd love to have more reason to learn the interface but barring a weekly use I'd quickly lose familiarity and am focusing on javascript functionality as one of our apps can run js scripts.

So for quickly editing files with a known structure like setting an IP address in Linux or updating code you understand, I can totally see how VIM is amazing. Lightwight, almost always there already so standardized, quick to navigate when familiar, and more. As a fairly novice level coder I'll stick to an IDE with scroll ability and a mouse/etc for coding, even for a slight update to something I wrote the previous day. I'm just not confident in getting it right the first time and know how to test or trial/error a command in an IDE much easier than CLI. If I was trained and focused on coding I bet I'd be way better at that stuff too.

Re: How Did Vim Become So Popular?

#479
In the early days, there was no such thing as an editor. Punch cards were used for every separate line of code. And along came editors. I had no familiarity with mainframe editors, but DEC systems had EDT/TPU (and another macro scripting thing I forget the name of). Enter 1980s with UNIX. This gave us ed/ex/vi/emacs. I entered the workforce in 1985, and had to edit files on a 1MB memory 68010 system. Emacs was such a memory hog that it would not run on said UNIX system. Fast-forward 15ish years: I have watched seasoned developers spend 2x-3x the time to perform simple editing actions in emacs than it takes to do in vi. Personally, I now have muscle memory for vi/vim, but if I need to edit a binary file, emacs or a hexeditor is the only way to go. IDEs add another level of context & capabilities to editors, as they typically understand the syntax of the language in question and often offer hints.

Re: How Did Vim Become So Popular?

#480
post #453

Earlier quoted context omitted.

All of that is of course theoretically possible with LSP or other vim extensions. It's just that nobody did it. Another thing is the level of integration. There are many tools which offer static analysis, duplicate detection etc. But it's completely different level of usability when you see this info immediately as you type.

People already use LSP in vim/neovim. Realtime feedback as you type is a thing in vim. Here is an example for typescript users. https://thoughtbot.com/blog/modern-typescript-and-react-deve... Again this does require you to configure things and that may not be what you want to spend your time doing but it's perfectly possible. Also I'll add that I'm not arguing that vim is better than any other particular IDE or edito…

Yeah, I know that you can use LSP in vim. But LSP for most languages is a far cry from what you can get in "real" IDEs.

It's always "LSP could be just as good" or "support for that can be easily added" - but it's just not happening - nobody does the work to make that just as good.

Post reply on HN