Showing posts with label repeat. Show all posts
Showing posts with label repeat. Show all posts
Friday, October 30, 2009
Repeat Last Substitution
If you want to repeat your last substitution on the current line hit the "&" character from normal mode.
Friday, September 5, 2008
Repeat Last Command Line
To repeat the last command-line given in ex mode, you can simply enter a count followed by "@:".
Wednesday, April 30, 2008
Repeat Last Macro
There are times I want to repeat a macro just a few times. I know you can do count@{0-9a-z":*} but sometimes I don't feel like counting. You can use @@ to repeat the last macro, and it's an easy command to type very quickly, so it fits the bill.
Monday, April 14, 2008
History
Most people know you can use the Unix history command to see what's been done on the command-line recently.
travis@travis-desktop:/home/travis% history
9985 ls
9986 grep -ri pidgin
9987 grep -ri pidgin *
9988 cd ..
9989 ls
9990 cd .gnome2
9991 grep -ri pidgin *
9992 cd ..
9993 cd .purple
9994 ls
9995 vim prefs.xml
What some people don't know, is you can execute anything in the history list very easily. Just use !number where number is the item number on the left-hand side of the history output.
!9995 would execute `vim prefs.xml'.
travis@travis-desktop:/home/travis% history
9985 ls
9986 grep -ri pidgin
9987 grep -ri pidgin *
9988 cd ..
9989 ls
9990 cd .gnome2
9991 grep -ri pidgin *
9992 cd ..
9993 cd .purple
9994 ls
9995 vim prefs.xml
What some people don't know, is you can execute anything in the history list very easily. Just use !number where number is the item number on the left-hand side of the history output.
!9995 would execute `vim prefs.xml'.
Subscribe to:
Posts (Atom)