Live data from Hacker News

Porn, Zen, and .vimrc

karolis.koncevicius.lt

101–110 of 131 posts

Re: Porn, Zen, and .vimrc

#101

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

I wouldn't call VSCode an IDE. It is an editor with plugins that give it IDE features. If that's your goal, you can really customize vim to similar place.

VSCode is at the edge of an editor and an IDE though, or so is my feeling at least. I feel like the massive need for ease of use and speed clashes with the needs of power users (e.g. for Java EE or database developers), and that this push vs pull might to be the downfall of VSCode in the future (unless MS throws a pile of money and devs on the codebase).

Re: Porn, Zen, and .vimrc

#102
post #80
post #45

Earlier quoted context omitted.

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?

I also use a digitalocean droplet for my development, but I'm programming in Python, bash, JavaScript/HTML/CSS, PHP, MySQL. I wouldn't do this if I were using Java, Java without an IDE is painful.

Re: Porn, Zen, and .vimrc

#103

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,…

IMHO Vim's strength come from the ability to operate on any logical chunks of text in a unified manner. Being able to jump around text with the keyboard is hardly a big deal compare to that. For example, to delete the entire body of a function in C, you can type "da{", where "d" means delete and "a{" points to text surrounded by braces. To delete a single sentence, I can do "das", etc etc. Of course, you could do the same using the mouse by selecting text manually, but it's way more tedious than Vim commands.

Re: Porn, Zen, and .vimrc

#104

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,…

To me the interesting part is not having to do precise mouse movements.

With vim bindings it’s easier to do things like rewriting arguments in a function, without having to carefully select them with a cursor or using ctrl+shift+Right arrow the right amount of times.

The speed I find it’s only a plus when having to work with old/sluggish machines, because it breaks my flow way less, but that’s completely personal preference.

Re: Porn, Zen, and .vimrc

#105

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,…

Mouse takes far longer than a second for a selection. Switching between keyboard and mouse already takes longer than typing the usual vim-commands for a simple action.

And casual keyboard-commands just don't scale well. Moving cursor x chars means you must type the movement-key x times. With vi you just type the number x and the movement, and usually save big time.

Aditionally, vi has more knowledge about textual objects, which are all interchangable. So whether you move 3 chars, words, paragraphs, pages or functions, it's all the same, just with different letters.

Vi's command-language is highly composable and thus very dense, so it will alwys be faster than mouse and casual editor-commands. Of course as long as you habit them.

Re: Porn, Zen, and .vimrc

#106
post #83

Earlier quoted context omitted.

All it’s missing is ‘set expandtab’ ;-)

Noo I like tabs! Maybe you can explain to me, I genuinely do not get why people are religious about spaces instead of tabs. You have to backspace more times to get rid of an indent!

<< to get rid of an indent. People are religious about this because if you use a shiftwidth (or sts) different than your ts, you end up with a mixture of tabs and spaces. If you change your ts to something other than 8, then you end up with code that looks weird on everybody else's screen.

Re: Porn, Zen, and .vimrc

#107
post #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 k…

Have you tried using Doom Emacs? The process of installing everything you need for a particular language only involves uncommenting a line on your config and running "doom sync". It's really good.

Re: Porn, Zen, and .vimrc

#108
post #9
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…

This pattern is also seen in almost every enterprise application purchase I've seen over the last 10-15 years. The process is as follows: 1) RFP, RFQ then purchase your ideal enterprise application. 2) Start customizing it to meet your old way of working (and before you really understand it) while ignoring the fact that X's 10000 customers seem to do fine with the default configuration. 3) Complain that it won't real…

Oh yes. I'm going through exactly that with Jira right now. Not that I'm at all a fan of the thing, but when you look at what's there, you get at least a sense of how Atlassian thought it should be used.

Enter some individuals who think that they know better and have determination to force that Jira-shaped peg through their round hole, even if they have to use a jackhammer to do so. The result is the worst possible outcome, and every user gets to pay each day for it. m(

Re: Porn, Zen, and .vimrc

#109
post #93

Earlier quoted context omitted.

> "If you don't see the use of it, I certainly won't let you clear it away. Go away and think. Then, when you can come back and tell me that you do see the use of it, I may allow you to destroy it."

I can't stand this. If Chesterton thinks he has all the power, why doesn't the onus to know "the use of it" fall on him? He should be responsible for documenting the purpose and motivations behind the fence, if he thinks he's such a protector. Anyway, this stance seems to be what separates conservative from a liberal. Conservative want to protect something that exists but he has no knowledge of reason - such as peopl…

1. Wanting to remove the fence is a statement of "this fence does more harm than good" and if you say "there never was any reason for this fence to be built" it's very strong evidence that you did not spend sufficient time investigating the fence's benefits. Chesterton doesn't care about the protecting the fence, he cares that the person who wants to remove the fence thinks it through all the way first.

2. It's not hard to come up with reasons for slavery and racism to exist; that's all you need to do to satisfy Chesterton. I'll even go a step further and say that for societal issues if you don't have at least a basic understanding of the forces that caused them to exist (and cause them to continue to exist), then you will probably fail to change them anyways.

3. Fences take time to build. It's very rare that you get eccentric people putting fences up randomly (rare enough that discovering that to be the cause of a fence should be pretty easy because it would be so notable!)

4. Because of all of the above, I'm going to say that it's not really the difference between a conservative and a liberal, but it is part of the reason why younger people tend to be more liberal and older people tend to be more conservative. Understanding the lesson of unintended consequences puts pressure on the "conservative" side of the scale, and it can be an excuse for conservatism. However, Chesterton's fence is an important engineering principle that should be taken into account when making policy regardless of your political leanings.

Re: Porn, Zen, and .vimrc

#110

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,…

Mouse takes far longer than a second for a selection. Switching between keyboard and mouse already takes longer than typing the usual vim-commands for a simple action. And casual keyboard-commands just don't scale well. Moving cursor x chars means you must type the movement-key x times. With vi you just type the number x and the movement, and usually save big time. Aditionally, vi has more knowledge about textual obj…

I have exclusively used vim keys for years now, but even after that time I find some of this just doesn’t ring true. Anything in vi that involves counting some number is usually faster with normal keys or the mouse. For example moving down 20 lines is way faster with the mouse, you just click. With vi you have to count the lines in your head - better hope you don’t lose count half way because two lines blur together. With lines you can use line numbers and mental arithmetic, but not really for any other number+noun combo.

I recognise there are other better ways to move around but they too often have drawbacks, like moving somewhere with ‘/‘. You have to parse the line you want to move to for a unique string that’s close to where you’re going. Then you have to scan over all the text in between to make sure it doesn’t occur too much there.

Maybe I’m still just doing it wrong.

Post reply on HN