Emacs
Comment Region :
- M-x comment-region, (or in C++ mode, 'C-c C-c')
- C-u C-c C-c un-comment
In xemacs, both of these are available when you highlight a region and right
click.
Tip: 'C-u' is like "un-next-thing"
Rectangle Ops: (all begin with 'C-x r')
- 'C-x r d' to delete the current rectangle
- 'C-x r k' to kill the current rectangle
- 'C-x r y' to yank it
- 'C-x r r' which is copy rectangle to register. After you hit 'C-x r
r' it asks you for a register to copy the rectangle to. A register
is just any letter on the keyboard. To retrieve the contents of a particular
register use 'C-x g' then type the key for the register
Keyboard Macros:
- 'C-x (' to begin recording
- 'C-x )' to end recording
- 'C-x e' to execute the macro (eg. 'C-u 50 C-x e' to execute the macro
50 times
Example : incremental searching (plain or regexp) within a macro
to find the next place you need to munge and then use a combination of cursor
positioning, killing, yanking, copying to registers and whatnot to munge the
text however necessary. Then you just 'C-x e' to your heart's content.
Fill Mode:
- `ESC-x auto-fill-mode` sets autofill mode
- `C-x set-fill-prefix` set the fill prefix (enter in whatever on
earth you want to be the prefix for your lines)
- `ESC-q` will re-"soft newline" the current paragraph, inserting the
fill character as prefix.
Example: In the c(++) modes when editing multi-line comments
started with /* (i.e. just type the comment as all one paragraph, then ESC-q
will re-format, leading each line with the right number of tabs and a '*'
).
All above courtesy of Bill Baxter and Scott Larsen
XEmacs Toolbar/MenuBar Toggle (Scott Larsen, Max Smolens)
- (set-specifier menubar-visible-p (not (specifier-instance menubar-visible-p)))
- (set-specifier default-toolbar-visible-p (not (specifier-instance default-toolbar-visible-p)))
- M-x tool-bar-mode