Live data from Hacker News

How Did Vim Become So Popular?

pragmaticpineapple.com

221–230 of 507 posts

Re: How Did Vim Become So Popular?

#221
post #99

Earlier quoted context omitted.

copy 10 lines from the current position into buffer q, go to the start of function jnk, copy 5 lines into buffer w, jump to line 10, paste contents of q, contents of w, and contents of q sequentially one after the other: "q10yy /jnk "w5yy 10G "qp "wp "qp now, go to the start of the document and indent the next 20 lines by 10 spaces: 0G .,+20s:^: : ok great, now find JUNK and replace 'a1' with 'A1' in the 15 lines tha…

Thank you for that example! Just thinking out loud how to do that in vscode for comparison: - I don’t think repeating actions a specific number of times makes sense in most use cases. Counting 10 lines would take longer than doing shift up/down n times (which would be exact with feedback) to select the desired lines. - Multiple Copy Paste buffers sounds interesting, I might look up a vscode extension for that. (Had a…

I have a plug-in installed in vim and vscode (and ilellij) that provide me with relative line numbers in addition to absolute line numbers. So, the current active line might display "353" in the gutters for the 353rd line. Both the line above and below are 1. The next lines above and below are 2. And so on.

There is never any "counting lines". If I need line's number, I can do a quick addition/substraction in my head or j/k $offset to see the other line's absolute number.

I can do line-based operations a lot faster than shift-tapping or click-dragging, with exact precision because my editor has been customized to provide the data I need. Eventually you get pretty good at estimating line numbers and character columns too.

Re: How Did Vim Become So Popular?

#222

Speaking personally, I've been a professional developer for almost decade and even in my relatively short career I've seen a lot of technologies come and go. I was reluctantly roped into it by my first boss, an enthusiastic Vim advocate. And since, almost nothing else (save for maybe git) beat learning vim from a return on investment perspective. From the default mac OS installation to some old Fedora box that has no…

100% concur with this. I learnt Vim many years ago and I genuinely don't know what I'd do without it. It's always just there when I ssh into a new server. And the JetBrains suite has an awesome vim mode meaning I can use most (but not all) vim shortcuts with an actual IDE. I don't think vim itself works well as an IDE substitute, and wouldn't use it for hardcore web dev for example - but for quickly editing random fi…

I’m always interested in this opinion.

What IDE features do you think vim is missing that aren’t available via LSP plugins?

Re: How Did Vim Become So Popular?

#224
post #217

Earlier quoted context omitted.

Definitely, even now as I use emacs, I'm a 100% evil. It's just so natural (once you get it), that I don't know how other bindings (like ctrl-[whatever]) are prevalent in most other software, it's not like they are more memorable or intuitive. Fun story: I was into Free/Libre software as a teen, when I learnt how to move around in vi(m) and in my first tech gig (as a sysadmin), I was interviewed by some greybeard who…

(Funnily enough ctrl-[ is one of my most used shortcuts in vim. It’s a convenient alternative to escape if you map caps-lock to ctrl)

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

Re: How Did Vim Become So Popular?

#225

Earlier quoted context omitted.

Definitely, even now as I use emacs, I'm a 100% evil. It's just so natural (once you get it), that I don't know how other bindings (like ctrl-[whatever]) are prevalent in most other software, it's not like they are more memorable or intuitive. Fun story: I was into Free/Libre software as a teen, when I learnt how to move around in vi(m) and in my first tech gig (as a sysadmin), I was interviewed by some greybeard who…

It's proof enough that you'll figure it out. Years of interviewing people for my own teams has shown me that understanding your tools (especially to the point of being opinionated about them) is probably the #1 indicator of success.

Where I work we use a lot of jetbrains IDE's and I've been a massive fan of Intellij, I absolutely love it when I can show someone something that makes their life easier.

Whether it's how to implement an external program properly using all the expansions or how to use bookmarks (how people can use an IDE for years and not find that is a good question).

I've always RTFM of whatever tool I'm using as the first step then I go look at the default keybindings to see what else there is.

The one that blows people away though is the custom exporters you can write for data views, oh you want that result set in a PHP array for a test set, yeah Copy as PHP has you.

Intellij is absurdly powerful without writing custom plugins (which is my next step I guess).

Re: How Did Vim Become So Popular?

#226
post #149

Earlier quoted context omitted.

I went one step further and swapped escape and caps lock keys on all my machines and haven't regretted it so far.

I cannot remember the last time I wanted to use CapsLock--more than 30 years ago, anyway. By far the most irritating thing about others' keyboards is they have not disabled it yet. Second most is that Ctrl isn't there instead.

How do you TYPE_A_CONSTANT for the first time, or an ENUM_VALUE (perhaps somewhere you don't have autocomplete)?

I keep a caps lock on my programmable keyboard for this (Fn+K).

I also like SQL to be formatted with capital letters for keywords.

Re: How Did Vim Become So Popular?

#227
post #217

Earlier quoted context omitted.

Definitely, even now as I use emacs, I'm a 100% evil. It's just so natural (once you get it), that I don't know how other bindings (like ctrl-[whatever]) are prevalent in most other software, it's not like they are more memorable or intuitive. Fun story: I was into Free/Libre software as a teen, when I learnt how to move around in vi(m) and in my first tech gig (as a sysadmin), I was interviewed by some greybeard who…

(Funnily enough ctrl-[ is one of my most used shortcuts in vim. It’s a convenient alternative to escape if you map caps-lock to ctrl)

Even better: map held Caps to Ctrl and a tap of Caps to Esc

Re: How Did Vim Become So Popular?

#228

Does anyone have a good video comparing vim speed coding vs vscode using built in editor features? I’ve been using vscode for years and the YouTube videos that demo vim features are shallow (like how to enter a blank line - really?). I can do the same thing I have seen in vim videos without memorizing a bunch of strange key bindings all while being able to edit code instantly without changing modes. I would love to s…

There's too many little things to mention, they do all add up to be quite significant in the course of programming. Here's a tiny sample of some stuff I use constantly: Move cursor forward word at a time: w ignoring punctuation: W reverse: b B Move cursor to next occurrence of character Z: fZ reverse: FZ Delete forward to next occurrence of character Z: dfZ reverse: dFZ Change forward to next occurrence of character…

Honestly, I can do almost all of these things with any standard editor as well, with standard shortcuts.

The ones I can't do directly, I can do via Search/Replace functionality that is also standard in most modern editors.

Your example about refactoring a function by using text editing capabilities is actually pretty bad unless you mean Vim can actually parse your programming language and perform the refactoring over all your code-base (not just a single file), like any IDE will do.

This list you gave me just convinced me I don't need Vim.

Re: How Did Vim Become So Popular?

#229
post #228

Earlier quoted context omitted.

There's too many little things to mention, they do all add up to be quite significant in the course of programming. Here's a tiny sample of some stuff I use constantly: Move cursor forward word at a time: w ignoring punctuation: W reverse: b B Move cursor to next occurrence of character Z: fZ reverse: FZ Delete forward to next occurrence of character Z: dfZ reverse: dFZ Change forward to next occurrence of character…

Honestly, I can do almost all of these things with any standard editor as well, with standard shortcuts. The ones I can't do directly, I can do via Search/Replace functionality that is also standard in most modern editors. Your example about refactoring a function by using text editing capabilities is actually pretty bad unless you mean Vim can actually parse your programming language and perform the refactoring over…

> Honestly, I can do almost all of these things with any standard editor as well, with standard shortcuts.

WTF is a standard editor and standard shortcuts? Would that be ISO or ANSI?

Re: How Did Vim Become So Popular?

#230
post #217

Earlier quoted context omitted.

Definitely, even now as I use emacs, I'm a 100% evil. It's just so natural (once you get it), that I don't know how other bindings (like ctrl-[whatever]) are prevalent in most other software, it's not like they are more memorable or intuitive. Fun story: I was into Free/Libre software as a teen, when I learnt how to move around in vi(m) and in my first tech gig (as a sysadmin), I was interviewed by some greybeard who…

(Funnily enough ctrl-[ is one of my most used shortcuts in vim. It’s a convenient alternative to escape if you map caps-lock to ctrl)

Omg that is such a game changer for me. way more ergonimic than hitting esc
Post reply on HN