Live data from Hacker News

Ten Years of Vim

matthias-endler.de

1–10 of 123 posts

Re: Ten Years of Vim

#2
All of the points in the "Some things I wish I could do better" section are the reason I use a regular memorization free-ish IDE.

Out of the box the things I want to do are easy (multiple files, manipulating structure of blocks of text, searching and manipulating information across my project simultaneously) and the things that aren't are rare (Add a dollar sign at the beginning of the next 13 lines).

I know how to use vim solely because it's necessary to edit files in a terminal.

Re: Ten Years of Vim

#4
Regarding tabs: I bound F2 to previous tab, F3 to next tab and F4 to new tab. Besides highlighting the current line, I think this is my most important customisation.

Re: Ten Years of Vim

#6
post #4

Regarding tabs: I bound F2 to previous tab, F3 to next tab and F4 to new tab. Besides highlighting the current line, I think this is my most important customisation.

Oh that's cool! Think I might do that, too. Thanks.

Re: Ten Years of Vim

#7
The point in the article is that the Vim keyboard bindings are most useful. Most editors have an option or plugin for that. That's what I use mainly. For instance I use Visual Studio + Resharper + VsVim ( + AceJump + RelativeLineNumbers) as my main development enviroment. I also use webstorm configured in a similar fashion. Visual Studio and R# understands the code and how to manipulate code far better than anything in the Vim world does, but I use it in combo with Vim keyboard bindings and it becomes incredibly quick to do things.

I don't actually use Vim itself very much ( I still use it for various things, but its not my main editor ). Its nicest attribute is for quick editing tasks it loads quick and can load very large files.

Re: Ten Years of Vim

#8
post #4

Regarding tabs: I bound F2 to previous tab, F3 to next tab and F4 to new tab. Besides highlighting the current line, I think this is my most important customisation.

Isn't `gt` and `gT` faster? You don't have to move your hands!

Re: Ten Years of Vim

#9
I know you said that you like maintaining a super minimal .vimrc, but fwiw there's a couple of plugins that really helped me with the workflow issues you mentioned struggling with:

> Jumping around in longer texts: I know the basics, like searching (/), jumping to a matching bracket (%) or jumping to specific lines (for line 10, type 10G), but I still could use symbols more often for navigation.

vim-sneak is real nice for this, and has turned into one of my most-used movement commands https://github.com/justinmk/vim-sneak

> Using visual mode for moving text around: Sometimes it can be quite complicated to type the right combination of letters to cut (delete) the text I want to move around. That's where visual mode (v) shines. It highlights the selected text. I should use it more often.

vim-move was a game changer for me https://github.com/matze/vim-move

> Tabs: I know how tabs work, but all the typing feels clunky. That's why I never extensively used them. Instead, I mostly use multiple terminal tabs or an IDE with Vim bindings for bigger projects.

This is worth a read: https://joshldavis.com/2014/04/05/vim-tab-madness-buffers-vs.... Buffers + vim fzf is a really nice workflow https://github.com/junegunn/fzf.vim

Re: Ten Years of Vim

#10
After using vim for a few years now, I noticed how I changed from thinking about text as characters to thinking about text as lines, which lets me create much cleaner code (independently from pretty printers).

When I selected code via mouse in the past, I selected it from character to character. In vim I tend to think line-wise so I can yank, paste, delete code per line which makes sense in many scenarios.

Post reply on HN