Live data from Hacker News

Why I Still Use Vim

medium.com

21–30 of 209 posts

Re: Why I Still Use Vim

#21
post #16
post #6

These kinds of comparisons always seemed a bit silly to me. It's like complaining that opening a 6MB file in windows took over 3GB on my system! (ignoring that most of that is the OS getting ready to do other things, and enabling the OS to do things other than opening and reading a 6MB file). Yes, Atom isn't the most resource friendly editor out there, and nobody is claiming it is. But it is one of the more capable e…

Except that sublime does all of that, supports plugins written in python, and doesn't screen tear, and leaves me some RAM for other things

Sublime has frustratingly bad CJK support which someone from those countries would have fixed by now if it were open source.

I got a plugin to get the IME working on Ubuntu but it could be so, so much easier.

Re: Why I Still Use Vim

#22
On a whim, and looking for a middle ground in native GUI editors, I fired up Textastic on my Mac (it's the most lightweight editor I have that does syntax highlighting and simple autocomplete), downloaded that text.xml file and opened it. Activity Monitor reported 29MB upon startup and 146MB RAM use with the file loaded, and moving to and from the end of the file is instantaneous (on a 7-year-old 2010 Mac Mini).

Startup time is 1 seconds without a file (from typing "tt" in a terminal) and 2 when doing "tt test.xml".

Search and replace for "thing" on every line was brutal, though. 5m32s, although I can't blame the editor - sampling the process, I see it doing a loop featuring CFStringCheckAndReplace, which is part of Core Foundation and likely not used to be subject to this kind of abuse - i.e., Textastic does not seem to use a custom internal buffer optimised for editing operations - it leverages what the OS already has.

vim on this Mac is about as fast as described in the article, which is also why I generally stick to it. :)

(edit: typos)

Re: Why I Still Use Vim

#23
post #14

> I’ve primarily stuck with [vim] because it’s an extensible editor that doesn’t hog all the resources and kill my machines. Exactly, BUT ... Vim has a non-mainstream shortcut interface, which I've always thought is an unfortunate caveat. So over the years I've actually managed to massage Vim into behaving like a 'normal' editor. It fits into a plugin if you're interested: https://github.com/tombh/novim-mode

But then what's... the point? That vim has a rich and expressive language for text navigation and manipulation is the only thing that sets it apart from more modern competitors.

Re: Why I Still Use Vim

#24
post #15
post #6

These kinds of comparisons always seemed a bit silly to me. It's like complaining that opening a 6MB file in windows took over 3GB on my system! (ignoring that most of that is the OS getting ready to do other things, and enabling the OS to do things other than opening and reading a 6MB file). Yes, Atom isn't the most resource friendly editor out there, and nobody is claiming it is. But it is one of the more capable e…

>which many of it's target demographic use So true, I almost posted a joke as a comment, only to delete it before actually commmiting a crime. >Vim won't show me 4 panes with ES2016 in one... I'm pretty sure most of this is doable though (not a Vim user)

It can do all but the third. Vim's understandably limited to displaying fixed size characters and so can't render webpages.

Hoover projects like Oni, Nyaovim or gonvim (All built on neovim) have the potential to change this (If they haven't already).

Re: Why I Still Use Vim

#25
post #16
post #6

These kinds of comparisons always seemed a bit silly to me. It's like complaining that opening a 6MB file in windows took over 3GB on my system! (ignoring that most of that is the OS getting ready to do other things, and enabling the OS to do things other than opening and reading a 6MB file). Yes, Atom isn't the most resource friendly editor out there, and nobody is claiming it is. But it is one of the more capable e…

Except that sublime does all of that, supports plugins written in python, and doesn't screen tear, and leaves me some RAM for other things

But Sublime doesn't do all of that. It does some things better, and others worse (and still others not at all).

I couldn't write a plugin for Sublime to embed a web browser. I couldn't write a plugin for Sublime to display images inline by fetching their URL if found in the source.

Those kinds of features might not be important to you, and that's fine, but they are indispensable for me.

Re: Why I Still Use Vim

#26

I actually care more about power usage than anything else these days. If it takes 1GB of memory to do that then so be it; that's cool (literally) /EDIT this comment refers to the general case not Atom in particular

Aren't Electron apps such as Atom known to have a significant impact on battery life/power usage?

Re: Why I Still Use Vim

#27
post #18
post #6

These kinds of comparisons always seemed a bit silly to me. It's like complaining that opening a 6MB file in windows took over 3GB on my system! (ignoring that most of that is the OS getting ready to do other things, and enabling the OS to do things other than opening and reading a 6MB file). Yes, Atom isn't the most resource friendly editor out there, and nobody is claiming it is. But it is one of the more capable e…

That'd be a fair comment if atom was using 12Mb, but 3GB???

It's ~850MB, and it's only at that level when using it outside it's intended purpose.

Atom was not designed to open 6MB XML files. If that makes it worthless for you, that's okay, but for some of us it doesn't matter. I'm never going to open a 6MB XML file, I might open a 1MB JS file, but that is extremely rare.

Earlier in the article, it shows that opening a 60 byte file only used 250MB, and that's more than reasonable to me.

Re: Why I Still Use Vim

#28
I really wish developers stop using the JS editors and switch to platform specific editors. It's 2017 and all platforms have great native text editors, like Notepad++, GEdit, and if you need cross-platform, Sublime text.

I don't see the point I using these electron based editors which waste tons of CPU cycles, and provide nothing of value.

Re: Why I Still Use Vim

#29
post #24
post #15

Earlier quoted context omitted.

>which many of it's target demographic use So true, I almost posted a joke as a comment, only to delete it before actually commmiting a crime. >Vim won't show me 4 panes with ES2016 in one... I'm pretty sure most of this is doable though (not a Vim user)

It can do all but the third. Vim's understandably limited to displaying fixed size characters and so can't render webpages. Hoover projects like Oni, Nyaovim or gonvim (All built on neovim) have the potential to change this (If they haven't already).

Neovim's UIs, yeah, plus you can (I guess) have a plugin that will open you a browser of choice in a separate tab or windowr, or pane or whatever with autoreload. This was done many times different ways before.

PS (this part was ment for a deleted comment):

I do agree that Atom's\Code's approach is friendlier of course. Still not an excuse for this kind of memory consumption, really. First and foremost this is a text editor. Making and assumption that the said text can't be more that a few Mb is stange.

I can open IDEA which is heavy Java IDE filled with so much functionality Atom can only dream of, and still - it won't eat more than 2-3Gb on a worst day.

Re: Why I Still Use Vim

#30
Little bit off topic but if you are afraid of opening large files on Mac OS, try Hex Fiend. It will open for example a 6GB database dump in mili-seconds (no joke) and it will let you search anything in it without you waiting.

I just tested the memory usage with that 6GB dump file and it only requires 21MB to open that file.

I discovered this program while checking who is behind my favorite shell (Fish Shell) :)

http://ridiculousfish.com/

Post reply on HN