3 ms·
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
by stefco_ 7y ago
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.
[0] https://github.com/airblade/vim-gitgutter https://github.com/airblade/vim-gitgutter
[1] set colorcolumn=80 textwidth=79
[2] https://github.com/stefco/dotfiles/blob/master/linkfiles/.vimrc https://github.com/stefco/dotfiles/blob/master/linkfiles/.vi...
[edit] Just want to add that I 100% agree that erring towards vanilla vim is a great idea; I used to use emacs and switched to vim precisely because the starting point fit my use style far better than vanilla emacs.
- aaron_m04 7y agoI would recommend ditching gitgutter for vim-signify: https://github.com/mhinz/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.
- dmix 7y agoI'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 visible and on the left side.
- ibly31 7y agoOnes that take up space are kind of annoying, I agree. I like IntelliJ's solution: mark with green, or yellow for additions and changes. It's a 1px line next to the line number, and also it's in the "minimap" type of view so you can jump right to where your changes are in a large file.
- stefco_ 7y agoThis 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.
- dmix 7y agoI wasn't aware of the ability to jump between changes via shortcuts. That seems useful.
- stefco_ 7y agoI 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).