Live data from Hacker News

History and Effective Use of Vim

begriffs.com

131–140 of 226 posts

Re: History and Effective Use of Vim

#131
I don't limit my plugin usage on purpose. I will add a plugin if it adds a value I can make use of.

Disregarding color schemes here is my list:

* FZF

* COC (it provides a lot of QoL, functionality of modern editors with it's plugins using an easy seamless yarn add)

* Sandwich

Very few customizations. Mostly vanilla.

Regarding colors, I love to try new ones all the time and my current is scery followed by Gruvbox, and Dracula because they work in Terminal.app and iTerm. They also look nice / easy-on-the-eyes. My friend at work has a thing for Nord and another loves Monokai Pro, but apparently the author wants money for it...? Which seems... different.

Re: History and Effective Use of Vim

#132
post #66

Earlier quoted context omitted.

I use a bunch of plugins and I've never had trouble remembering the defaults in the odd case I'm unable to use my own config. I don't get why the top comment on all vim threads is always recommending using poor defaults your whole life so you can avoid learning to configure it or avoid a second of confusion when you're ssh'd somewhere. Maybe everyone else besides me spends all their time ssh'd into random servers.

Nah, I've seen people downloading their preferred configs right to the production server, because they, understandably, feel more comfy with that. But, it may not be for everyone. Where I work, we are in the process of reaching some compliance targets, and all this downloading unknown stuff from unknown servers is out the window. For the best, I think.

It's unfortunate that in this day and age we still have people who directly access and touch a production server at all, ever. There is zero need.

Re: History and Effective Use of Vim

#133
post #66

Earlier quoted context omitted.

I use a bunch of plugins and I've never had trouble remembering the defaults in the odd case I'm unable to use my own config. I don't get why the top comment on all vim threads is always recommending using poor defaults your whole life so you can avoid learning to configure it or avoid a second of confusion when you're ssh'd somewhere. Maybe everyone else besides me spends all their time ssh'd into random servers.

Nah, I've seen people downloading their preferred configs right to the production server, because they, understandably, feel more comfy with that. But, it may not be for everyone. Where I work, we are in the process of reaching some compliance targets, and all this downloading unknown stuff from unknown servers is out the window. For the best, I think.

People need to stop editing directly on servers. Vim's netrw can write out over scp, use your configured vim on your desktop to edit the files on the server.

Re: History and Effective Use of Vim

#134
post #41

I used vim for years, but then Sublime appeared.. although I miss the snappiness of vim, and wouldn't mind to come back. Specifically, I'd miss these nice features of Sublime: 1. Multiple cursors!! (and how easy is to use them) 2. Real-time preview of regex search 3. Package Manager (easy installation and discoverability of plugins) 4. Jump to file, jump to function, jump to css selector.. (ctrl+p, ctrl+r, using fuzz…

Sublime is really nice, I bought a license for V2. But after a lot of radio silence from the dev, I realized I never want to invest years building muscle memory and becoming dependent on specific plugins only to potentially have it disappear one day. Proprietary software is just not a good option for fundamental tools like a text editor.

Re: History and Effective Use of Vim

#135

Earlier quoted context omitted.

Nah, I've seen people downloading their preferred configs right to the production server, because they, understandably, feel more comfy with that. But, it may not be for everyone. Where I work, we are in the process of reaching some compliance targets, and all this downloading unknown stuff from unknown servers is out the window. For the best, I think.

It's unfortunate that in this day and age we still have people who directly access and touch a production server at all, ever. There is zero need.

This sounds nice until you have to debug a crazy error that only happens in production.

Re: History and Effective Use of Vim

#136
post #10

After years of a love/hate relationship with Vim (I love what it does, but have configuring it), I had an epiphany: by sticking with the defaults, whether they are my preferred choices or not, I can instantly understand how to use Vim in any environment. Once you get used to biting the bullet and hitting escape instead of jj, or ctrl+c, it just works, everywhere. If you abandon the urge to pimp out your Vim with a bi…

Just a quick note, you can use Ctrl +[ rather than Escape. Saves your fingers from constantly having to reach for that corner.

Am I the only person who actually finds Esc easier than C-[ or Caps Lock? Maybe it's just heavy muscle memory at this point, but I've been using Esc for years and every time I try to use anything else it just feels clunky.

Re: History and Effective Use of Vim

#137
post #134
post #41

I used vim for years, but then Sublime appeared.. although I miss the snappiness of vim, and wouldn't mind to come back. Specifically, I'd miss these nice features of Sublime: 1. Multiple cursors!! (and how easy is to use them) 2. Real-time preview of regex search 3. Package Manager (easy installation and discoverability of plugins) 4. Jump to file, jump to function, jump to css selector.. (ctrl+p, ctrl+r, using fuzz…

Sublime is really nice, I bought a license for V2. But after a lot of radio silence from the dev, I realized I never want to invest years building muscle memory and becoming dependent on specific plugins only to potentially have it disappear one day. Proprietary software is just not a good option for fundamental tools like a text editor.

I'd say the tradeoffs are different rather than it never being a 'good option'. For me, paying for & using IntelliJ idea for most of my serious work has in practice been an excellent option for many years. It suits me & my working style in a way no open-source editors do. For that I'm trading the possibility that Jetbrains might die, or change its platform in a way I can't live with. In truth this has already paid off for me, regardless of what happens in the future. If I had to stop using it tomorrow it would have been well worth it.

Re: History and Effective Use of Vim

#138

After years of a love/hate relationship with Vim (I love what it does, but have configuring it), I had an epiphany: by sticking with the defaults, whether they are my preferred choices or not, I can instantly understand how to use Vim in any environment. Once you get used to biting the bullet and hitting escape instead of jj, or ctrl+c, it just works, everywhere. If you abandon the urge to pimp out your Vim with a bi…

This is my philosophy with most software. I expect to get 80-90% of the way with zero configuration and then maybe for some advanced features I’ll touch the config and personalize some things.

The added benefit to becoming proficient with default configuration is that it is really easy to upgrade to a new computer and start from scratch.

And of course with vim, the benefit is the ubiquity when using ssh or docker or VMs which typically use the defaults.

Re: History and Effective Use of Vim

#139
post #21

Earlier quoted context omitted.

I've taken this approach halfway and only install plugins/config that I can easily do without. Things like git-gutter [0] and a line at the 80th column [1] are great, but I don't depend on them when I log into a remote machine. If I really want some features, I have them somewhat organized in my .vimrc [2]. It's a great compromise; I find that I haven't thought about major editor configuration in a couple of years. […

I would recommend ditching gitgutter for vim-signify: https://github.com/mhinz/vim-signify It is less buggy and doesn't refresh until you save, which I find to be less distracting.

I haven't had any problems with gitgutter so far, but I'll give it a look! I think gitgutter can also be configured to only update on save, though I actually like the live updating and have never had issues with it (IIRC I set it to wait a second before updating to keep it from constantly running git commands).

Re: History and Effective Use of Vim

#140
post #124

Earlier quoted context omitted.

I would recommend ditching gitgutter for vim-signify: https://github.com/mhinz/vim-signify It is less buggy and doesn't refresh until you save, which I find to be less distracting.

I've never really understood why you'd want a constant visual indication of changed lines all the time, especially with something bright/colourful on the side. The only time I find that useful is during reviews before committing. Otherwise it seems like a distraction. Vim is great for minimalism. Likewise I keep Nerdtree closed until I need it and it opens on the right. While VSCode, old Textmate, etc has it always v…

This is partly a matter of taste, and since I don't find it distracting at all, there's no downside for me. But as far as value added, I find it super convenient. I like that gitgutter gives a quick indication of what chunks I've been working on and lets me quickly navigate between them (without having to remember to mark them/hit ^O) by hitting ]c or [c (I think these are defaults, but I might have overridden them). I also like that it lets you effortlessly interactively stage changes (in case you have a good hunk you want to commit before trying something more experimental out) as well as previews that show you diffs of specific hunks as well as the ability to selectively undo hunks. It also is a great way to immediately verify that a file is unchanged without hitting ^Z and running `git diff FILE` for the file I was editing. It's also an easy confirmation that I didn't accidentally change or break something accidentally. Obviously I run a `git diff` and tests before a commit, but for me, nothing beats seeing my diffs in the full context of the file to confirm that, yes, those were all things I did on purpose.
Post reply on HN