Live data from Hacker News

Porn, Zen, and .vimrc

karolis.koncevicius.lt

11–20 of 131 posts

Re: Porn, Zen, and .vimrc

#11
I can't help remapping ; to : and vice-versa. Can't think of the last time I needed the default ; and sparing my pinky from having to hit shift every time I want to ;q is a game changer. Obviously, that's annoying to change in every vim install but I just have a very light .vimrc that I curl in every new box

Re: Porn, Zen, and .vimrc

#12
The only map that I would say is an absolute improvement over the default is

    map ; :
Using : is a waste of a keystroke (ie. shift) in an editor that I chose specifically to reduce chorded key combos.

Re: Porn, Zen, and .vimrc

#13
post #7

> This article describes my Vim journey, starting from heavy personal customization and ending with a renewed love for defaults this exact pattern is found in so many vi|m articles and is touted as a triumph of vim's default patterns, when it is really a failure of vim to support whole ranges of functionality. as a daily user of neovim, i know that vscode is a superior alternative and am waiting for a month off to tr…

I've always seen it as a trade-off based on what I'm using Vim a lot for. When I'm using Vim remotely on a hundred different systems I admin, then having a good grasp of of being comfortable using the defaults is extremely useful, and it feels painful to try to use something that's not enabled by default that is my preference. When I'm doing developing something more complex, I definitely appreciate more customization.

Vim (or at least some vi derivative) is semi-unique among many of the more complex tools we use in that it exists by default on just about every Unix host you connect to, so it has sort of a dual life in that respect. It's many people's go-to tool for local development, but it's also the default tool you can rely on for text editing remotely. Those use cases have somewhat separate pressures they place on how people use it.

Re: Porn, Zen, and .vimrc

#14
My journey started when someone just dropped their .vimrc and I tried it out... So I'll do the same: https://tinyurl.com/y4d7rx6f

Typically I clone that into my home directory. Then I link everything to it with:

ln -s ~/vim/.vimrc ~/.vimrc && ln -s ~/vim ~/.vim

The .vimrc is kind of documented, but a quick version is:

tt: select a file name to open into a new buffer

fr and fR: go forward or backward through buffers (open files)

fd: close buffer

f2: if the needed commands are installed, reformat code

There's a few other remappings, but those are the most frequent ones I use, hence making it easier.

completion works everywhere as well. There's a bunch of other stuff for navigating windows and tabs, but once I realized that "buffers" are actually the "vim way" of file navigation, I stopped using those short cuts.

Edit: Yes I realize this is probably what the article is complaining about, but oh well.

Re: Porn, Zen, and .vimrc

#16
If your .vimrc is minimal, you will have a pretty good time using systems that implement "vim like" text editing. Take Overleaf for example, no vimrc is available, but I'm quite happy with what I got, and sometimes I even forget I'm in the browser.

Re: Porn, Zen, and .vimrc

#17
post #7

> This article describes my Vim journey, starting from heavy personal customization and ending with a renewed love for defaults this exact pattern is found in so many vi|m articles and is touted as a triumph of vim's default patterns, when it is really a failure of vim to support whole ranges of functionality. as a daily user of neovim, i know that vscode is a superior alternative and am waiting for a month off to tr…

I also find that vim defaults are very lackluster, I could spend all day listing its faults:

- hjkl is not a reasonable default mapping for motion, for one it doesn't make it obvious that j is down and l is up since the keys are next to one another (which makes it a lot harder to memorise in the first place) but on top of that it wastes two very premium home row keys, h and l, for something that you really shouldn't end up using a whole lot (b, w, f, t, e and friends are usually much more efficient for moving on the current line).

- To make matters worse, the one key that's easiest to access on any keyboard, the space bar, is... just doing the same thing as l, it moves right. So now you have two of the best keys on the keyboard mapped redundantly to a relatively little used function.

- What about the enter/return key? It does the same thing as j, it moves down. Brilliant.

Those are just minor nitpicks of course, but I have a laundry list of those if anybody cares to hear them. It's littered with small inconsistencies and idiosyncrasies that stem from historical baggage and not actually trying to design an ergonomic editor.

That being said I don't get where you're coming from with VScode. Do you consider the editor part of VSCode to be better than Vim, or are you talking about Vim failing as an IDE?

It's important not to mix things up, VSCode is an IDE, Vim isn't. If you wanted an IDE and tried to get Vim to do that by adding 3MB of vimscript from various sources to make it work I can't blame you for giving up, it's probably going to end up being a mess.

Re: Porn, Zen, and .vimrc

#18
post #7

> This article describes my Vim journey, starting from heavy personal customization and ending with a renewed love for defaults this exact pattern is found in so many vi|m articles and is touted as a triumph of vim's default patterns, when it is really a failure of vim to support whole ranges of functionality. as a daily user of neovim, i know that vscode is a superior alternative and am waiting for a month off to tr…

It’s found on an matter really. People just get bored, obsessive and eventually "fatigued". No editor makes a boring job better, but some make it worse.

... I now realize you may just be trolling.

Re: Porn, Zen, and .vimrc

#19
Here is my only remapping: map Q

Whenever I use vim without my config I wind up hitting Q and entering ex mode and wishing I had my config.

I've used vim on and off for at least 6 years and have never installed a plugin. Vim is great for quick edits, arranging text in temporary files (control x + control e in the terminal, quit without saving), moving chunks of code around, running macros. Its also great to use the keybindings in your favorite electron IDE.

I'm just not a "plugins" person. I've been trying to set up a python environment in emacs for a while and it hasn't been fun. Its an iterative process of installing a few plugins, getting something buggy and slow to use, and eventually getting fed up and restarting from a minimal config file.

Emacs has been amazing for magit alone, I just wish I was good enough at it to use it for more things.

Vim? Its my barebones text mover that has keybindings in countless apps. That's all it needs to be.

Post reply on HN