Live data from Hacker News

Porn, Zen, and .vimrc

karolis.koncevicius.lt

71–80 of 131 posts

Re: Porn, Zen, and .vimrc

#71

  The simple truth was that, no matter how
  much energy I invested in my custom configuration, the
  people who built and designed Vim knew it a lot
  better than me.
That would make sense if the defaults we were talking about had been carefully selected five or ten years ago or shown any signs of evolution since they were first laid down in 1975. If I was editing code in the languages they used in environments like theirs using underlying tools that performed like their tools in a codebase the size of `ex`'s, I'd certainly trust the defaults. But I'm not doing any of those things.

Today, I work in a codebase whose human-readable source alone might be larger than any installed digital storage system that existed when vi's shortcuts were chosen. By necessity I navigate it with semantically-aware indexing and information-retrieval tools that would have been miraculous back then. My edits are guided by static analysis and effected with automated refactoring and code generation tools.

My configuration doesn't suit my environment as well as vi's defaults suited their environment. It does, however, suit my environment better than vi's defaults do.

And let's not even get into emacs configurations. :P

Re: Porn, Zen, and .vimrc

#73

Bro I don't mean to make you the shining example of what I'm talking about but can we please try to be succinct with write-ups? The whole first half of the article could've been summarized with a single sentence: "As is typical with newbie vim enthusiasm, I spent many hours producing a 1000+ line vimrc over a long time that I eventually realized complicates my word editing process more than it helps." I mean come on.…

An article doesn't have to be a summerization. This is more of a personal story, albeit on a technical issue.

And I'm pretty sure it's not just "noobs" that focus that much on customization, but of course their attempt will more likely be unproductive.

Re: Porn, Zen, and .vimrc

#74
post #41
post #27

I wonder, what is the preferred way to install configuration files such as .vimrc, .bashrc etc. across all the machines a user logs into?

i just keep a repo of public configs and curl them to any new machines and have a simple script to symlink the various configs to their expected locations

There's a standard tool for that:

https://www.gnu.org/software/stow/

Re: Porn, Zen, and .vimrc

#75

Bro I don't mean to make you the shining example of what I'm talking about but can we please try to be succinct with write-ups? The whole first half of the article could've been summarized with a single sentence: "As is typical with newbie vim enthusiasm, I spent many hours producing a 1000+ line vimrc over a long time that I eventually realized complicates my word editing process more than it helps." I mean come on.…

Thanks for the honest feedback, but I think everything you want summarized is in the summary at the top:

> Vim is a highly customizable text editor geared towards writing code. But open-ended configuration possibilities often lure users into wasting time while chasing after perceived minute gains in productivity. This article describes my Vim journey, starting from heavy personal customization and ending with a renewed love for defaults.

One can read it, take the message, and move on.

However if another reader wants details, it's hard to know upfront what kinds of details he/she will care about. Hence, based on the premises in the summary, the article expands on: 1) the ways in which Vim can be over-configured; 2) some examples demonstrating the possibilities of changing default behaviour; 3) the benefits of scaling configuration down; 4) Summary and additional notes.

You might only care about one or few of those. However this, I feel, is where you would have to selectively skip some sections, based on your own judgement.

Re: Porn, Zen, and .vimrc

#76

I personally find vin to be a good tool for editing text without leaving the terminal. But when I’m writing a lot of code, I’ve found the vim ide concept to be far more trouble than its worth. Modern IDEs like VSCode + Vim bindings is my preferred platform

One thing I never understood is why Vim bindings are a big gain when you have a mouse. I see a single edit, it takes me all of one second to click for a large jump, even less for cursor key combos in case of a small jump. For mass edits there is find/replace and find+multi cursor. 80% of my time in the editor I spend thinking about the code anyways - I have zero interest to optimize deciseconds of my time, or worse,…

The gain is less frustration.

If you don't mind moving back and forth between mouse and keyboard, or smashing ctrl-arrow to move, then it's fine.

Re: Porn, Zen, and .vimrc

#77

I personally find vin to be a good tool for editing text without leaving the terminal. But when I’m writing a lot of code, I’ve found the vim ide concept to be far more trouble than its worth. Modern IDEs like VSCode + Vim bindings is my preferred platform

One thing I never understood is why Vim bindings are a big gain when you have a mouse. I see a single edit, it takes me all of one second to click for a large jump, even less for cursor key combos in case of a small jump. For mass edits there is find/replace and find+multi cursor. 80% of my time in the editor I spend thinking about the code anyways - I have zero interest to optimize deciseconds of my time, or worse,…

> I have zero interest to optimize deciseconds of my time, or worse, optimize my perceived productivity vs. my actual productivity (e.g. forcing myself away from the mouse by ways of pattern matching that increases both mental overhead and time required).

I think you just said it. Its not interesting/nor a priority for you to optimize things to that level. Those using vim properly and trying to move away from the mouse consider it better for efficiency and ergonomics (debatable).

Its not that you fail to understand. Its more so that you don't care that much.

Re: Porn, Zen, and .vimrc

#78
post #77

Earlier quoted context omitted.

One thing I never understood is why Vim bindings are a big gain when you have a mouse. I see a single edit, it takes me all of one second to click for a large jump, even less for cursor key combos in case of a small jump. For mass edits there is find/replace and find+multi cursor. 80% of my time in the editor I spend thinking about the code anyways - I have zero interest to optimize deciseconds of my time, or worse,…

> I have zero interest to optimize deciseconds of my time, or worse, optimize my perceived productivity vs. my actual productivity (e.g. forcing myself away from the mouse by ways of pattern matching that increases both mental overhead and time required). I think you just said it. Its not interesting/nor a priority for you to optimize things to that level. Those using vim properly and trying to move away from the mou…

I'd think the ergonomics argument is just wrong wrt. repetitive stress. Isn't more variation in movement pretty much always better in that regard?

Re: Porn, Zen, and .vimrc

#79

I personally find vin to be a good tool for editing text without leaving the terminal. But when I’m writing a lot of code, I’ve found the vim ide concept to be far more trouble than its worth. Modern IDEs like VSCode + Vim bindings is my preferred platform

One thing I never understood is why Vim bindings are a big gain when you have a mouse. I see a single edit, it takes me all of one second to click for a large jump, even less for cursor key combos in case of a small jump. For mass edits there is find/replace and find+multi cursor. 80% of my time in the editor I spend thinking about the code anyways - I have zero interest to optimize deciseconds of my time, or worse,…

Vim bindings operate on commands that can automate many of the daily work you do in a text editor besides inputting text and search & replace. Deleting or copying text inside delimiters or by lines, changing words in place, recording and replaying macros, etc. are all possible with a few keystrokes. Since commands are generic and composable, once you learn the few basic ones you'll be able to come up with combinations of your own that make you more productive over using a mouse and a traditional graphical IDE. If you've ever seen a Vim master at work you'll notice how quickly they manipulate text on screen. It looks almost magical, which certainly makes it difficult to follow for anyone else watching, but to them it's the most efficient use of their time and brain power, since the binding-to-command mapping has become muscle memory. Using a foreign IDE would cripple their productivity.

While it's true that most programming is spent thinking about the problem rather than manipulating text, the benefit of modal editing and Vim bindings is not only in the saved time, but also in removing the barrier from thinking about how you want to change the code to actually changing it. That leaves you more time to think about the problem, but also doesn't interrupt "the flow" by having to think about moving and positioning a mouse cursor in a GUI, which is always a more mentally draining action than typing a few keystrokes.

Re: Porn, Zen, and .vimrc

#80
post #45
post #23

Earlier quoted context omitted.

Same. My normal set up is having a shell window with 4 tabs: 1. Text editing 2. Command Line 3. Program logs 4. Code console Flipping through them is a breeze, and I never have to leave Terminal. The displays are always simple, straight forward, and focused. No distractions. I'm able to just get in the zone with the code and forget anything else exists.

If you can move your tabs to tmux, you will greatly improve your situation. It's easy. Then you can, for instance, make your development machine a dedicated cloud server, like digital Ocean etc. This is what I do and it's very nice to be able to use any hardware I want, including cheap underpowered stuff, since it's just a window to my real machine.

What language(s) do you develop in though. I found this was fine for certain languages, but others such as C#, swift or perhaps Java really suit having a fat IDE. Or perhaps its me?
Post reply on HN