Created
October 12, 2012 20:59
-
-
Save gdevanla/3881485 to your computer and use it in GitHub Desktop.
Emacs Gems
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Repeating commands | |
This package defines a command that repeats the preceding command, whatever that was, including its arguments, whatever they were. This command is connected to the key C-x z. To repeat the previous command once, type C-x z. To repeat it a second time immediately after, type just z. By typing z again and again, you can repeat the command over and over. | |
http://stackoverflow.com/questions/6156286/emacs-lisp-call-function-with-prefix-argument-programmatically | |
Repeat Yank command | |
C-a C-k C-x ( C-y C-j C-x ) C-u 9 C-x e | |
Explanation:- | |
C-a : Go to start of line | |
C-k : Kill line | |
C-x ( : Start recording keyboard macro | |
C-y : Yank killed line | |
C-j : Move to next line | |
C-x ) : Stop recording keyboard macro | |
C-u 9 : Repeat 9 times | |
C-x e : Execute keyboard macro | |
To delete all whitespaces until next non-whitepspace | |
M-^ runs the command delete-indentation, which is an interactive compiled Lisp function in `simple.el'. | |
It is bound to M-^. | |
(delete-indentation &optional arg) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment