Live data from Hacker News

Editors (Vim)

missing.csail.mit.edu

51–60 of 120 posts

Re: Editors (Vim)

#51

I'm by no means a high level expert of command line, but if I need to do a quick edit I just use nano, and if I need to get down and dirty I use VS Code. Is this abnormal? I know a lot of power users use Vim, but I've just never fallen in love with it.

This is unfortunately not uncommon. I feel like most of my coworkers at most companies Ive worked for don't use vim. One killer app of vim for me is macros. You can record a string of commands and map doing that to a letter. This makes certain mundane changes you have to do sometimes in software a breeze. For example, I had some code where someone was using string literals everywhere when they should have defined an enum. The convention we use for this kind of thing is to use UPPER_SNAKE_CASE and the strings were in camelCase. I was able to define two macros that let me improve this code in a few seconds. If I wasn't using vim I'd probably just leave that code as it was because it would have been so much effort.

Re: Editors (Vim)

#52
20 years ago I got a job and went from Windows to Unix. Tinkered with both emacs and vim, and for some reason had this craziness where I'd start new files in emacs and make small edits in vi/vim. I have dabbled with neovim and vim-modes in other editors, but I keep going back to a somewhat-customized vim with ~8 packages.

I'm not really an advanced vim user. I have to think and remember how to do column edits, and I never yank to registers. For some reason I want to make a concerted effort to learn emacs again but the idea of not having edit modes concerns me.

Re: Editors (Vim)

#54
post #38
post #7

Earlier quoted context omitted.

As a long time vim user, I’ve tried VSCode a few times and I cannot for the life of me figure out what all the hype is about. Can anyone who is proficient with it explain the philosophy behind it and what makes it so great? This is a sincere question, not a rhetorical one.

It's Emacs for Javascript people - a good thing since Emacs is moribund and most programmers are at least a little bit Javascript people. A highly programmable, cross-platform editor with zillions of extensions/modes that support all sorts of languages and environments. People complain about its resource requirements and performance, just like they did with Emacs. Vi(m) users are the natural enemy of VSCode, just lik…

I'm going to partially disagree.

> It's Emacs for Javascript people

I'll accept this premise.

> a good thing since Emacs is moribund

And here we part ways.

> and most programmers are at least a little bit Javascript people.

You might be living in a bubble.

> A highly programmable, cross-platform editor with zillions of extensions/modes that support all sorts of languages and environments.

Agreed; I think you're actually underselling how helpful it is that it's apparently a lot easier to get started with than emacs or the vi family. Power tools with a lower learning curve is a good thing.

> People complain about its resource requirements and performance, just like they did with Emacs.

And they're right to do so, especially with Moore's law wearing thin. Besides which, emacs (and n/vim, for that matter) are still around, and are just as functional in a much smaller resource footprint.

> Vi(m) users are the natural enemy of VSCode, just like they were the natural enemy of Emacs, continuing their long proud tradition of being wrong about everything.

LOL, that's... semi-fair, even if you're on the wrong side, of course;)

> I think that's roughly where it fits 'philosophically'.

I think it's fair to call VSCode "EMACS but with JS", but I think you're really glossing over the issues that it has in practice; maybe with a decade of maturation it'll be on par, but today I would argue that it is a resource hog, and still suffers from some poor design choices (such as letting extensions trample eachother, per the upthread discussion).

Re: Editors (Vim)

#55
post #48
post #38

Earlier quoted context omitted.

It's Emacs for Javascript people - a good thing since Emacs is moribund and most programmers are at least a little bit Javascript people. A highly programmable, cross-platform editor with zillions of extensions/modes that support all sorts of languages and environments. People complain about its resource requirements and performance, just like they did with Emacs. Vi(m) users are the natural enemy of VSCode, just lik…

> continuing their long proud tradition of being wrong about everything. Why do you think that Vim users were/are wrong about everything?

I don't! That's just a dumb joke. A thing that I semi-seriously think: modal editing is not some uniquely interesting or advantageous way to navigate and edit text. A thing that I mostly-seriously think: most more recent methods for editing and navigating code are a lot better vim-style modal text editing.

Re: Editors (Vim)

#56

I've been a happy vim user for many years, over a decade. But I was shocked at how this talk, published on YouTube in 2018 from a recorded lecture by an engineer at Yelp named Leeren Chang, basically made vim’s internal model “click” for me and made vim even more fun to use. I really feel the presenter did such a great job showcasing vim ideas — conceptually, visually, and by direct example — that, by the end, I down…

Heh, "how you access ex commands shipped with Unix since like the 90s"

Re: Editors (Vim)

#57
post #20

I respect Vim, I've seen it used with impressive speed, BUT I am so used to command-s to save, that I don't feel ready to :w enter all the time. VS Code is powerful, and learning the keyboard shortcuts for that are getting better every day (command-shift-p format-selection enter).

You can put something like this in your .vimrc: " save with ctrl+s nmap :w imap :w a Edit: I guess it should be: nmap :w imap :w a

You can also use

    imap  :w

in insert mode can be used to execute normal mode commands.

Re: Editors (Vim)

#58
post #41

I love vim but I always get a feeling that I'm only using 1% of its features. It is hard to memorize all the availanle keybindings, specially if it is something that you don't use often. Does anyone have suggestions of what worked to help learn mor Vim commands?

Once you understand the verbs and nouns of Vim, you don't need to memorize nearly as much.

[1] Learn vim For the Last Time: A Tutorial and Primer— https://danielmiessler.com/study/vim/

[2] The Vim Learning Curve is a Myth—https://thoughtbot.com/blog/the-vim-learning-curve-is-a-myth

[3] Vimcasts—http://vimcasts.org

Re: Editors (Vim)

#59
post #52

20 years ago I got a job and went from Windows to Unix. Tinkered with both emacs and vim, and for some reason had this craziness where I'd start new files in emacs and make small edits in vi/vim. I have dabbled with neovim and vim-modes in other editors, but I keep going back to a somewhat-customized vim with ~8 packages. I'm not really an advanced vim user. I have to think and remember how to do column edits, and I…

Evil mode in Emacs is almost perfect. My biggest complaint is that undo works differently than vim (if anyone knows how to fix that, I would be forever grateful!) I originally used Emacs for about 20 years and then switched to Vim for a variety of reasons. I love the editing model in Vim. But for the last few years I've been using Emacs with Evil and it's been the best of both worlds.

Re: Editors (Vim)

#60

I'm by no means a high level expert of command line, but if I need to do a quick edit I just use nano, and if I need to get down and dirty I use VS Code. Is this abnormal? I know a lot of power users use Vim, but I've just never fallen in love with it.

I've been using Vim since before it was Vim. I learned C on the 'ed' editor in the mid-80s, which was a predecessor to vi and Vim (and a subset of its command line UI). So Vim is always my go-to editor.

nano is fine for quick edits, but the more Vim you know, the better off you'll be in that situation. If you're not a devops/sysadmin person, or you don't spend a lot of time in command-line Unix, there's no shame in not knowing Vim. But it is universally better than nano.

Post reply on HN