Hacker News new | ask | show | jobs
by bhrgunatha 2983 days ago
I think you've assumed the wrong premise. At least for me. It's not the highly customised things, it's the accumulation of the small things that are either missing, inconvenient, slightly annoying or somewhat different to your needs.

Every package developer makes choices about how their package works (and built-in behaviour too), but sometimes that clashes with what you want, or is somehow inadequate.

It's those small conveniences that have a disproportionate impact.

I'm not saying you can't do similar in vim or there aren't other ways to achieve the same goal, I'm saying that over time, those minor improvements have a huge impact.

Here's 2 examples:

1) Splitting a window horizontally by default splits 50:50 but on a 16:9 monitor I usually want the new buffer (right) to be smaller than my current buffer (left). So I override the defaults.

2) I use paredit for lisp based languages, but (as far as I'm aware) there's no built in-command to copy (or paste) the s-expression surrounding the cursor's current position.

I often find myself wanting to do exactly that e.g. in a let or a cond form in Racket. So I wrote a couple of small functions to do just that, bound them to keyboard shortcuts and I've now made a minor extension that fits exactly what I want to do. Since lisp is based on s-expressions it turns out this extension to someone else's package is incredibly versatile and useful.... TO ME!

    (let [<CURSOR>(x (some-function with args)] 
I press my chosen key-combination and it becomes

    (let [(x (some-function with args)] 
         [<CURSOR>(x (some-function with args)] 
ready to edit the new s-expression
1 comments

In vim, when you're in visual selection mode, you can type `ib` (inner block) to select the innermost parenthesized block's interior or `ab` to include the parentheses. If you type these commands multiple times, the selection widens to the next, next, next ... enclosure.

There are other similar commands in the category, like a" for selecting the interior of a double-quoted literal and such.

They are documented under ":help visual-operators".