Hacker News new | past | comments | ask | show | jobs | submit login
What Emacs Commands Do You Use Most and Find Most Useful? (reddit.com)
36 points by apgwoz on May 25, 2009 | hide | past | favorite | 9 comments



Keyboard macros are great. C-x ( to start recording, C-x ) to finish, C-x e to execute. You can also do Meta-999 C-x e, which will execute your macro 999 times (or until it reaches the end of the file). It's great for turning, say, a CSV file into a sed script.

Or into a list of insert statements if you're too lazy to read up on how to use sqlldr.


M-x todo-show for recoding what I'm doing :) I use the text commands quite equally. Really need to start using org-mode properly.


M-x goto-line which I bind to C-x :


M-g M-g runs goto-line as well ( on my default installation ).


C-x z (z z z z z z ...)

Repeats the last command. Awesome "combinatoriality"!


M-x indent-buffer


(defun iwb () "indent whole buffer" (interactive) (delete-trailing-whitespace) (indent-region (point-min) (point-max) nil) (untabify (point-min) (point-max)))


M-x indent-buffer


M-x align !!!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: