15 days ago · Tech · 0 comments

I’ve been using vim for more than 10 years. Here are a list of things I usually forget from time to time that are extremely useful. You can use gi in normal mode to start inserting in the last position you inserted even if you have moved through the buffer. To emulate the power of multiple cursors we can make use of the cgn text object: Search a word with / or * Use cgn to change the word Use dot repeat to keep going or use gn so skip a word Fuzzy find files with :find *. This works on other directories as well, not only the root :find ../../../**/woah Use :b whatever to switch to an open buffer in vim with a whatever substring in the file name. Tags navigation is awesome: Go to next tag: C-] Find ambiguous tag: gC-] Go back: C-t We don’t necessarily need completion plugins. Instead here are some commands for more powerful completion: Simple completion with: C-n or C-p Restrict to current file: C-x C-n or C-x C-p Complete only file names: C-x C-f Restrict to tags only: C-x C-] Use…

No comments yet. Log in to reply on the Fediverse. Comments will appear here.