Beruflich Dokumente
Kultur Dokumente
http://xahlee.org/emacs/emacs_esoteric.html
Emacs Tutorial
YOUR AD HERE
k .
To nd the command name of a keybinding, call command describe-key Ctrl + h To nd the keybinding of a command, call describe-function Ctrl + h inline documentation of the command.
f .
If you forgot the name of a command, call apropos-command Ctrl + h commands of a given string.
a ,
In any mode, if you want to see its inline documentation, call describe-mode Ctrl + h
Editing Related
Interactive Search
Q:
Q:
Grep Lines
Q:
Q:
Q:
1 of 4
http://xahlee.org/emacs/emacs_esoteric.html
For example: Type Ctrl + u , then 2 , then Alt + x sort-eld. This will sort the line by the 2nd column, and the elds are compared as strings. Emacs Tutorial
Other
Q:
Q:
Q:
I have a set of dierent texts i want to paste frequently. Is there a way to use like multiple clipboards?
A: Yes. Select the region, then Alt + x copy-to-register, give it a name such as 1. To paste it, type Alt + x insert-register. You can create elisp code so that typing F7 will automatically copy to register 1, and F8 will automatically paste from register 1. So, F7 and F8 becomes another copy and paste without changing emacs's kill-ring. Here's the code:
(defun copy-to-register-1 (p1 p2) "Copy text selection to register named 1." (interactive "r") (copy-to-register ?1 p1 p2 ) ) (defun insert-register-content-1 () "Insert register named 1's content." (interactive) (insert-register ?1) ) (global-set-key (kbd "<f7>") 'copy-to-register-1) (global-set-key (kbd "<f8>") 'insert-register-content-1)
If your text is frequently needed long term, such as a XML template or signature, you can dene a function and bind it to a key, so that it inserts the string when you press a button. Here's a example:
(defun insert-my-sig () "Insert my signature." (interactive) (insert "-Jane http://example.org/")) (global-set-key (kbd "<f8>") 'insert-my-sig)
Misc
2 of 4
http://xahlee.org/emacs/emacs_esoteric.html
Q:
Emacs Tutorial
A: To start a second shell, give it a empty argument, like this: Ctrl + u Alt + x shell. In emacs, many commands take a empty argument for a slightly changed behavior.
How to refresh a opened le to its current saved state? For example, other people have edited the le thru a network.
A: Call revert-buer. If someone modied the le, typically emacs will auto detect it, and when you type something, emacs will automatically ask you what to do.
Q:
Q:
Q:
Is there a way for emacs to interpret the le as hex-decimal? (i.e. byte-code editor)
A: To open the le as hex, call hexl-nd-le. If the le is already opened, call hexl-mode.
Display
Q: How to set the background color so that all new frames will have that color? (not set-background-color)
A: Alt + x customize-variable
Enter
default-frame-alist
v
Enter
If you want to code elisp manually, see Ctrl + h example you can put in your emacs init le:
(setq default-frame-alist '((tool-bar-lines . 0) (menu-bar-lines . 1) (background-color . "cornsilk")))
default-frame-alist. Here's a
3 of 4
http://xahlee.org/emacs/emacs_esoteric.html
Emacs Tutorial
The default keyboard shortcut for execute-extended-command is Alt + x . You can dene Alt + a , which makes it on the home row. (See ErgoEmacs Keybinding)
You like: Tips on Long Term Emacs Productivity Emacs Lisp Basics How to Dene Keyboard Shortcuts in Emacs
Post as
Showing 0 comments
Sort by
Popular now
Subscribe by email
Subscribe by RSS
Subscribe
Search
4 of 4