This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
emacs:emacs [2008/12/02 14:33] – decianm | emacs:emacs [2009/05/08 11:45] (current) – decianm | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Emacs ====== | ====== Emacs ====== | ||
+ | ===== Good to know ===== | ||
+ | ==== Cutting out a rectangle ==== | ||
+ | To cut out a rectangle in emacs, mark the region in question with your mouse (upper left to lower right). Then press < | ||
+ | ctrl-x r k | ||
+ | </ | ||
+ | Paste the rectangular region with | ||
+ | < | ||
+ | ctrl-x r y | ||
+ | </ | ||
+ | ==== Search for a string ==== | ||
+ | If you want to search for a string, type | ||
+ | < | ||
+ | ctrl-s | ||
+ | </ | ||
+ | If you want to search the same string as before, press: | ||
+ | < | ||
+ | ctrl-s ctrl-s | ||
+ | </ | ||
+ | |||
===== Configuring Emacs===== | ===== Configuring Emacs===== | ||
==== Mousewheel on lxplus ==== | ==== Mousewheel on lxplus ==== | ||
Line 64: | Line 83: | ||
) | ) | ||
</ | </ | ||
- | After emacs has started, type '' | + | After emacs has started, type '' |
+ | |||
+ | ==== Adding goto-line ==== | ||
+ | A useful little command when coding with emacs is **goto-line**. To assign it a shortcut, add in your '' | ||
+ | < | ||
+ | ;; == goto line == | ||
+ | (define-key global-map " | ||
+ | </ | ||
+ | Goto-line then is executed with '' | ||
+ | |||
+ | ==== Changing the font permanently ==== | ||
+ | To permanently change the font in emacs, do the following: | ||
+ | * Type '' | ||
+ | * Start emacs and go to the *scratch* buffer. Type: '' | ||
+ | * Open your .emacs file and add the following line: | ||
+ | < | ||
+ | (set-default-font "the font you want to choose" | ||
+ | </ | ||
+ | for example | ||
+ | < | ||
+ | (set-default-font " | ||
+ | </ | ||
+ | * Close emacs and restart it. Your default font should now be set to the font you chose. |