Live data from Hacker News

Vim Anti-Patterns

sanctum.geek.nz

131–140 of 249 posts

Re: Vim Anti-Patterns

#131

Earlier quoted context omitted.

Well after 5 years of using Vim, the muscle memory for more efficient operations never kicked in. I was either holding "h" and "l" to move around, or I was consciously thinking of the more efficient combined operations like "f.ce.com^[". And that conscious thinking was very distracting from the actual code I was editing.

I used vim for everyday use for almost ten years before I realized that navigating around with the keyboard would never be as good as clicking a mouse. All the mental overhead of trying to be efficient with vim, for me at least, ended up being a bit of a false oasis. I happily switched to Sublime for two years and then VS Code. I still use emacs with Clojure though.

Emacs is unbeatable for editing lisp code. Geiser, Quack, SLIME, and CIDR are all excellent.

Re: Vim Anti-Patterns

#132
post #104
post #103

"Hitting Escape is usually unnecessary; Ctrl+[ is a lot closer, and more comfortable." I agree with a lot of the things in this article, but wow, I could not possibly disagree with this quote more. Ctrl+[ is WAY more uncomfortable than using the Escape key. Granted, I have many years of vim usage that have made hitting Escape a habit, and that probably plays a big part in it, but Ctrl+[ is downright painful for me (a…

I suggest remapping Caps Lock to CTRL if you haven't remapped it already.

Yeah, I've seen that suggestion for many many years, but unlike evidently almost every other programmer in the known universe, I still use Caps Lock for its intended purpose (and yes, I know all of the ways I could avoid using it, but I still want to use it for that). I understand why people would like using Caps Lock for a CTRL key, as it reduces the stretch distance for many key combinations, but I don't find it enough of a problem to justify the change.

So, I basically don't mind CTRL right where it is. It doesn't bother me for the things I use it for.

For me, the two-handed combo of CTRL-[ is just a lot more work than the single-handed move of my ring finger to the ESC key. I don't have trouble getting my left hand back to the home row quickly after doing so either. Moving CTRL to Caps Lock would alleviate that some, perhaps, but I don't think it would be enough of an improvement to make me prefer CTRL-[ over Escape.

Re: Vim Anti-Patterns

#133
post #103

"Hitting Escape is usually unnecessary; Ctrl+[ is a lot closer, and more comfortable." I agree with a lot of the things in this article, but wow, I could not possibly disagree with this quote more. Ctrl+[ is WAY more uncomfortable than using the Escape key. Granted, I have many years of vim usage that have made hitting Escape a habit, and that probably plays a big part in it, but Ctrl+[ is downright painful for me (a…

I double tap j to get out of insert mode.

Re: Vim Anti-Patterns

#134

Earlier quoted context omitted.

Well after 5 years of using Vim, the muscle memory for more efficient operations never kicked in. I was either holding "h" and "l" to move around, or I was consciously thinking of the more efficient combined operations like "f.ce.com^[". And that conscious thinking was very distracting from the actual code I was editing.

I used vim for everyday use for almost ten years before I realized that navigating around with the keyboard would never be as good as clicking a mouse. All the mental overhead of trying to be efficient with vim, for me at least, ended up being a bit of a false oasis. I happily switched to Sublime for two years and then VS Code. I still use emacs with Clojure though.

Similar story here. I use IntelliJ for Java and Emacs for Clojure. We're porting our codebase from Clojure to Java at work, so soon it'll all be IntelliJ, which will be pretty sweet. I do kinda miss Paredit, but IntelliJ makes up for it with lots of other pretty sweet features.

Re: Vim Anti-Patterns

#135
post #50

Earlier quoted context omitted.

evil-mode vim keys in emacs.

I don't want vi modality. I find it more annoying than emacs yoga-esque bindings. I want more sane emacs bindings.

You can make them yourself, and I think there are some packages for that as well.

Re: Vim Anti-Patterns

#136

Earlier quoted context omitted.

I recall reading somewhere that Stallman's keyboard had the CTRL key where the (totally useless) caps-lock key is on modern keyboards, and that's why he used CTRL+ combinations throughout emacs.

The most perfect keyboard ever envisioned (whose name shall not be mentioned) has the CTRL key there. It has no dedicated caps-lock key at all.

No, the Model M had a capslock there. It's one of its great failings.

;-)

Re: Vim Anti-Patterns

#137
post #33

Earlier quoted context omitted.

> feel a bit of strain on the whole holding Ctrl+p others don't seem to like this, but i've found the following global key swaps effective swap ctrl->alt LCtrl::LAlt RCtrl::RAlt swap capslock->alt Capslock::Alt this enables you to hit "ctrl" with your thumb (next to the spacebar), and capslock becomes the new "alt". so no more reaching for that hard to reach LCtrl key with your pinky.

Nah, swap Ctrl with Capslock. Alt is by far less commonly used. I swapped alt with RShift for a while, but Alt is fine as Alt really.

right. Alt is less used - which is why I mapped it to capslock: i find LAlt easier to hit with my thumb than capslock with pinky

Re: Vim Anti-Patterns

#138

Earlier quoted context omitted.

Of course we do: You can jump by searching for line contents with C-s, you can do an operation a certain number of times with M- , and do an operation four times with C-u , which chains, so you can do an operation 16 times with C-u C-u . If you want to jump to a specific line number, you can use M-g M-g , or (because C-u also provides numerical arguments) C-u M-g M-g. Finally, many motion commands set the mark, so yo…

> "But you can also just use C-n, etc. and we won't judge you for it." This is probably the biggest selling point of the Emacs community. They're not going to try to guilt or shame you into using more efficient or more advanced commands. If C-n works for you, use it!

Of course. We can't judge you. Your configuration and setup is likely so different that unless we meet up in person, it's impossible to tell who is more efficient.

Re: Vim Anti-Patterns

#139
post #103

"Hitting Escape is usually unnecessary; Ctrl+[ is a lot closer, and more comfortable." I agree with a lot of the things in this article, but wow, I could not possibly disagree with this quote more. Ctrl+[ is WAY more uncomfortable than using the Escape key. Granted, I have many years of vim usage that have made hitting Escape a habit, and that probably plays a big part in it, but Ctrl+[ is downright painful for me (a…

ctrl+[ is closer but with an already over-used right pinky it is a bad idea. i much prefer jk as .

Re: Vim Anti-Patterns

#140

I never got into the habit of using { and }. I just use H M L (high/medium/low) to get approximately in the right part of the screen, then go line-by-line. You can also do 5H or 10L to get "5 lines from the top" or "10 lines from the bottom". I make pretty good use of vim features, but I like to mix some sloppiness with the precision. I don't often count things before typing commands, because that breaks the second-n…

I remap { and } so I they land on the first and last lines of a block of text between blank lines, rather than the blank lines themselves. I find this is usually what I want then I just move/ take action in a more targeted fashion with f, t, w or the vim-sneak plugin.
Post reply on HN