3 ms·
":, @: ": 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 mouthfu
by CalChris 7y ago
":, @:
": 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 :<up arrow> to run the last command and <up arrow> some more to run the ones before that.
- frutiger 7y agoYou can also use `:^F` to navigate your history in a horizontal split using regular motion/search keys.
- tartrate 7y agoAnd if you wanted to repeat that 10 times you would...?
- mises 7y agoPress up ten times. That's still what a lot of us do in terminal (particularly when we're on a machine without fancy shell history fuzzy-searching etc.). I guess I might press and hold at ten.
- grimgrin 7y agoYour machine probably has ^r for working through bash history But that aside, if you’re into arrow pressing, a few lines in your .inputrc can go a long ways Test this out sometime: # Incremental searching with Up and Down and Left and Right "\e[A": history-search-backward "\e[B": history-search-forward Now you can type “find” and press up/down arrow to just cycle through history that starts with find
- jonahx 7y agoUse vim-repeat: https://github.com/tpope/vim-repeat https://github.com/tpope/vim-repeat
- lithiumfrost 7y agoPersonally, I would do 9@@ after the first @: