Vim tricks
hillelwayne.com
Vim tricks
1–10 of 63 posts
Re: Vim tricks
#2Re: Vim tricks
#3That seems like a mouthful. I use : to run the last command and some more to run the ones before that.
Re: Vim tricks
#4Re: Vim tricks
#5Clickbait title conceals a decent article.
Re: Vim tricks
#6":, @: ": is the register storing the last executed command. You can write ":p to print it to the buffer. @: reruns the last command. That seems like a mouthful. I use : to run the last command and some more to run the ones before that.
Re: Vim tricks
#7":, @: ": is the register storing the last executed command. You can write ":p to print it to the buffer. @: reruns the last command. That seems like a mouthful. I use : to run the last command and some more to run the ones before that.
Re: Vim tricks
#8Unless I’m mistaken, this is the default undo behavior for emacs...What horror to only have vim’s forward and backward undo history! Said the emacser on the vimmer’s post.
Re: Vim tricks
#9In insert mode, is a contextual completion. So like the normal or you just do and you can keep hammering the to fill in multiple "words". You can also complete lines, file paths, dictionary words, thesaurus words, tags, spelling, etc. See `help ins-completion`. Seriously, I can't do without this command. needs to be in everyone's daily use.
Also in insert mode: deletes a word back. You'll commonly find this is a lot of editors and stuff where it doesn't close a window. Similar to , though I many times accidentally hit in my browser instead of because I use this so much (bad speller).
much easier than pressing Esc
0 much easier than pressing ^ (honestly I have anything that is $,%,^,&. They aren't easy to reach)
Honestly, vim has some of the best written documentation I've read. If you really want to master vim, just read the docs on commands you already use. I guarantee you'll find something you didn't know.
Re: Vim tricks
#10I’ve discovered q: when trying to quit vim in a hurry. You always keep finding new quirky things to do in vim but I guess the same hold true for other text editors like Emacs