home *** CD-ROM | disk | FTP | other *** search
/ System Booster / System Booster.iso / Texteditors / Origami / bindings / emacs-fun / ref < prev    next >
Encoding:
Text File  |  1996-09-27  |  24.7 KB  |  851 lines

  1. @ref-lib fun/tags-mac.r file-reference
  2. @ref-lib fun/sokoban.r sokoban-call-ref
  3. @ref-lib fun/global-ref regexp-reference cmd-reference
  4. @{{{  @ref-header EMacs-Reference-Card
  5. @ref-title EMacs - Reference Card
  6. @ref-author Michael Haardt
  7. This is the reference file for EMacs, a binding for the folding-editor
  8. Origami.
  9. @}}}
  10. @{{{  EMacs-Reference-Card
  11. @{{{  EMacs Command Line Options
  12. You can use the following commad line options, to control the modes of
  13. EMacs:
  14.  
  15. @ref-start-tbl Off 10 On 10 Mode 40
  16. -Onotime  @@ -Otime   @@ time display in the statusline
  17. -Onoposi  @@ -Oposi   @@ position display in the statusline
  18. -Onofull  @@ -Ofull   @@ full shifting display
  19. -Onoai    @@ -Oai     @@ autoindent
  20. -Onomagic @@ -Omagic  @@ regular exprsession search
  21. -Onomagic @@ -Oxmagic @@ extended regular expression search
  22. -Onoc     @@ -Oc      @@ c-mode
  23. @ref-end-tbl
  24.  
  25. You can also use the option '-Odefault' to use the default values:
  26.  
  27. @ref-start-picture
  28. -Otime -Onoposi -Onofull -Oai -Onomagic -Onoc
  29. @ref-end-picture
  30. @}}}
  31. @{{{  @cmd-opt Origami Command Line Options
  32. @}}}
  33. @{{{  @regexp Origami Regular Expressions
  34. @}}}
  35. @{{{  Messages, errors and prompts
  36. Sometimes EMacs may want to tell you something, like when you did
  37. something which EMacs does not allow. If it is something simple, such
  38. as typing a control key sequence which is not associated with any
  39. command, EMacs will just ignore it. Otherwise, it will also display an
  40. informative error message at the bottom of the screen. Simple messages
  41. are displayed in brackets, prompts will appear without brackets and end
  42. with a question mark.
  43.  
  44. When starting using verbose mode, EMacs will be less ignorant and tell
  45. you more. Look under command line switches and/or modes on how to use
  46. modes.
  47. @}}}
  48. @{{{  The status line and the message line
  49. The line immediately above the bottom line is referred to as the "mode
  50. line". The mode line looks something like
  51.  
  52. @ref-start-picture
  53.  * EMacs 1.6.79 (None)  teach-emacs
  54. @ref-end-picture
  55.  
  56. This is a very useful "information" line.
  57.  
  58. @ref-start-item asterisk (star)
  59. indicates that changes have been made to the file.
  60. Immediately after opening or saving a file, there is no star.
  61. @ref-end-item
  62. @ref-start-item name ("EMacs" in this case)
  63. shows the name of your compiled keybinding, which runs on top of the Origami
  64. interpreter.
  65. @ref-end-item
  66. @ref-start-item words inside the parentheses
  67. indicate the "modes" EMacs is currently in.
  68. @ref-end-item
  69. @ref-start-item filename ("teach-emacs" in this case)
  70. is the name of the file you are currently editing.
  71. @ref-end-item
  72.  
  73. If you use more than one window, each window will have its own mode
  74. line.
  75. @}}}
  76. @{{{  Used notation of input
  77. In the following sections, the notation below is used to describe which
  78. commands are bound to which keys or sequences of keys.
  79.  
  80. @ref-start-item C-<chr>
  81. Hold the CONTROL key while pressing the character <chr>.
  82. Thus, C-F would be: hold the CONTROL key and press F. Some
  83. people may be used to see ^F, here it is C-F.
  84. @ref-end-item
  85. @ref-start-item M-<chr>
  86. If you have no Meta key, then press the ESCAPE key and release
  87. it, then press the character <chr>. Alternatively, if your
  88. keyboard has a meta key, then hold it down while typing <chr>.
  89. @ref-end-item
  90. @ref-start-item M-C-<chr>
  91. If you have no Meta key, then press the ESCAPE key and release
  92. it, then hold the CONTROL key while pressing the character <chr>.
  93. Otherwise, hold down Meta and Control while typing <chr>.
  94. @ref-end-item
  95. @}}}
  96. @{{{  Bound keys and key sequences
  97. Each key inserts/overwrites its character at the current cursor position,
  98. unless it is bound to a command, in which case the command will be started.
  99. If the key is start of a key sequence to which a command is bound, EMacs will
  100. wait for the rest of that sequence and show what was typed so far in the
  101. message line.  Killing text means that the text will be erased from the buffer
  102. and appended to the kill buffer whereas deleting text means just erasing it,
  103. although a limited undo function is available.
  104.  
  105. @{{{  The general abort command
  106. @ref-start-item C-G
  107. The EMacs command used to abort any command, no matter if it requests
  108. input or not, is C-G. For example, you can used C-G to discard
  109. a numeric argument, at the beginning of a command that you
  110. don't want to finish, to abort loading big files and to abort
  111. running macros.
  112. @ref-end-item
  113. @}}}
  114. @{{{  Cursor motion
  115. @{{{  Basic cursor control (up, down, left, right)
  116. Not the best, but the most basic way to move the cursor is to use the
  117. commands previous-line, backward-character, forward-character and
  118. next-line. Here, in a more graphical form, are the commands:
  119.  
  120. @ref-start-picture
  121.                      Previous line, C-P
  122.                            :
  123. Backward, C-B .. Current cursor position .. Forward, C-F
  124.                            :
  125.                      Next line, C-N
  126. @ref-end-picture
  127.  
  128. You'll probably find it easy to think of these by letter: P for
  129. previous, N for next, B for backward and F for forward. When you go off
  130. the top or bottom of the screen, the text beyond the edge is shifted
  131. onto the screen so that your instructions can be carried out while
  132. keeping the cursor on the screen. If your terminal is supported, then
  133. the cursor keys will work as well.
  134. @}}}
  135. @{{{  Move cursor backward/forward one word
  136. @ref-start-item M-b
  137. backward-word, moves the cursor back one word.
  138. @ref-end-item
  139. @ref-start-item M-f
  140. backward-word, moves the cursor forward one word.
  141. @ref-end-item
  142. @}}}
  143. @{{{  Move cursor backward/forward one sentence
  144. The end of a sentence in EMacs means a line with a period at its end or
  145. a period followed by two spaces.
  146.  
  147. @ref-start-item M-B
  148. backward-sentence. Moves the cursor to the beginning of the last sentence.
  149. @ref-end-item
  150. @ref-start-item M-F
  151. forward-sentence. Moves the cursor to the beginning of the next sentence.
  152. @ref-end-item
  153. @}}}
  154. @{{{  Move cursor to the previous/next paragraph
  155. A paragraph in EMacs is text without blank lines and without a period in
  156. the first column.
  157.  
  158. @ref-start-item M-p
  159. previous-paragraph, moves the cursor to the previous paragraph.
  160. @ref-end-item
  161. @ref-start-item M-n
  162. next-paragraph, moves the cursor to the next paragraph.
  163. @ref-end-item
  164. @}}}
  165. @{{{  Move cursor to the previous/next page
  166. @ref-start-item M-v
  167. previous-page, move one page back. If your terminal is supported, then
  168. the NextPage key will also work.
  169. @ref-end-item
  170. @ref-start-item C-V
  171. next-page, move one page forward. If your terminal is supported, then
  172. the PreviousPage key will also work.
  173. @ref-end-item
  174. @}}}
  175. @{{{  Move cursor to the beginning/end of a line
  176. @ref-start-item C-A
  177. beginning-of-line, move to the beginning of line. If your terminal is
  178. supported, the begin key will also work.
  179. @ref-end-item
  180. @ref-start-item C-E
  181. end-of-line, move to the end of line. If your terminal is supported, the
  182. end key will also work.
  183. @ref-end-item
  184. @}}}
  185. @{{{  Move cursor to the beginning/end of a fold
  186. @ref-start-item M-<
  187. beginning-of-fold, move to the beginning of the entered fold.
  188. If your terminal is supported, the home key will also work.
  189. @ref-end-item
  190. @ref-start-item M->
  191. end-of-fold, move to the end of the entered fold.
  192. @ref-end-item
  193. @}}}
  194. @{{{  Move cursor to line with a specific number
  195. @ref-start-item M-g
  196. go-to-line, moves the cursor to the specified line in an entered
  197. fold. With a numeric argument, Origami jumps to that line,
  198. otherwise a prompt asking for it will be issued.
  199. @ref-end-item
  200. @}}}
  201. @{{{  Move cursor to matching paren, bracket or brace
  202. @ref-start-item M-#
  203. goto-matching-fence, move cursor to matching paren, bracket or brace. If the
  204. cursor stands not on one of the above mentioned fences, EMacs tries to find
  205. one of the following more complex structures (Skip1 -> Skip2 [ -> Skip3 ] ->
  206. Skip1 .. ):
  207. @ref-start-tbl Language 8 Skip1 10 Skip2 10 Skip3 10
  208. all @@ #ifdef @@ #else @@ #endif
  209. all @@ #if @@ #else @@ #endif
  210. OCL @@ @if-using @@ @fi
  211. @ref-end-tbl
  212. @ref-end-item
  213. @}}}
  214. @{{{  Move cursor in and out of folds
  215. @ref-start-item C-O
  216. open-fold, opens the fold under the cursor. If your terminal
  217. is supported, then the open key will work as well.
  218. @ref-end-item
  219. @ref-start-item C-C
  220. close-fold, closes the current fold and folds inside it. If
  221. your terminal is supported, then the close key will work as well.
  222. @ref-end-item
  223. @ref-start-item M-C-O
  224. enter-fold, enters the fold under the cursor. If the line is not a fold,
  225. Origami tries to follow the given include statement or prompts for a filename.
  226. The environement variable `ORIGAMILIBPATH' may contain a `:' separated list of
  227. directories (default is `/usr/include').
  228. @ref-end-item
  229. @ref-start-item M-C-C
  230. exit-fold, exits the current fold.
  231. @ref-end-item
  232. @}}}
  233. @}}}
  234. @{{{  Editing
  235. @{{{  Creating a new line
  236. @ref-start-item C-M
  237. newline-and-indent, splits the line at the cursor position.  If mode
  238. @ref-end-item
  239. @ref-start-item C-J
  240. Autoindent is active, then the new line is indented as the previous
  241. line.
  242. @ref-end-item
  243. @}}}
  244. @{{{  Deleting characters
  245. @ref-start-item C-H
  246. delete-previous-character, deletes the character left to the
  247. cursor.  Most backspace keys also send C-H.
  248. @ref-end-item
  249. @ref-start-item C-D
  250. delete-character, deletes the character under the cursor.  Most
  251. @ref-end-item
  252. @ref-start-item C-?
  253. delete keys also send a C-?.
  254. @ref-end-item
  255. @}}}
  256. @{{{  Exchanging characters
  257. @ref-start-item C-T
  258. transpose-characters, exchanges the character under the cursor
  259. with the character left from the cursor, then moves the cursor
  260. forward one character.
  261. @ref-end-item
  262. @}}}
  263. @{{{  Deleting words
  264. @ref-start-item M-C-H
  265. delete-word-backward, deletes word backwards from cursor position.
  266. @ref-end-item
  267. @ref-start-item M-C-D
  268. delete-word, deletes word under cursor position.
  269. @ref-end-item
  270. @}}}
  271. @{{{  Changing capitalization of words
  272. @ref-start-item M-c
  273. case-word-capitalize, capitalizes the word starting at cursor
  274. position and moves the cursor forward one word.
  275. @ref-end-item
  276. @ref-start-item M-u
  277. case-word-upper, changes the word to upper case starting at
  278. cursor position and moves the cursor forward one word.
  279. @ref-end-item
  280. @ref-start-item M-l
  281. case-word-lower, changes the word to lower case starting at
  282. cursor position and moves the cursor forward one word.
  283. @ref-end-item
  284. @}}}
  285. @{{{  Killing, deleting, and getting erased text back
  286. @ref-start-item C-K
  287. kill-line, kills all text from cursor position to end of line.
  288. If the cursor was already at the end of the line, the newline
  289. character ending the line will be killed, joining the current line
  290. with the next line.
  291. @ref-end-item
  292.  
  293. @ref-start-item M-C-K  |  delline
  294. delete-line, deleted all text from cursor position to end of line.
  295. If the cursor was already at the end of the line, the newline
  296. character ending the line will be deleted, joining the current line
  297. with the next line.
  298. @ref-end-item
  299.  
  300. @ref-start-item C-Y
  301. insert-folded-kill-buffer, moves the kill buffer in a fold and
  302. yanks this fold back
  303. @ref-end-item
  304.  
  305. @ref-start-item C-X C-Y
  306. undo-delete-line, yank the last deleted line back
  307. @ref-end-item
  308. @}}}
  309.  
  310. @{{{  copy-to-kill-buffer
  311. @ref-start-item M-k
  312. copy-to-kill-buffer, appends the line to the kill buffer without
  313. killing it
  314. @ref-end-item
  315. @}}}
  316. @{{{  unfold-fold
  317. @ref-start-item C-U
  318. unfold-fold, removes the fold marks of the fold under the cursor
  319. @ref-end-item
  320. @}}}
  321. @{{{  auto-header
  322. @ref-start-item C-X C-H
  323. auto-header, copies the first in of the fold under the cursor to
  324. the fold header
  325. @ref-end-item
  326. @}}}
  327. @{{{  toggle-file-fold
  328. @ref-start-item C-X C-F
  329. toggle-file-fold, toggles between a fold and a file-fold
  330. @ref-end-item
  331. @}}}
  332. @{{{  toggle-attach-file-to-fold
  333. @ref-start-item C-X C-A
  334. toggle-attach-file-to-fold, attaches a file to a fold to create a
  335. file-fold for an already existing file, or unlinks the file from
  336. the fold
  337. @ref-end-item
  338. @}}}
  339. @}}}
  340. @{{{  Regions
  341. Regions in EMacs are parts of the buffer, one end marked by an invisible
  342. mark, the other by the cursor. The region includes the beginning
  343. position and excludes the ending position. Regions have to respect the
  344. fold structure.
  345.  
  346. @ref-start-item C-@
  347. set-mark, set an invisible mark at the current cursor position.
  348. This function is also bound to control-space, because most keyboards
  349. generate the same character on C-@ and control-space.
  350. @ref-end-item
  351. @ref-start-item C-X C-X
  352. change-mark-and-position, set the invisible mark at the cursor
  353. position and move the cursor to the previos location of the mark.
  354. @ref-end-item
  355. @ref-start-item C-X x
  356. highlight-region, show the marked region highlighted. A set argument will
  357. enhance the display time.
  358. @ref-end-item
  359. @ref-start-item M-C-W
  360. delete-region, delete a region. This can be undone by undo-delete-line.
  361. @ref-end-item
  362. @ref-start-item C-W
  363. kill-region, move the region to the kill buffer.
  364. @ref-end-item
  365. @ref-start-item M-w
  366. copy-region, copy the region in the kill buffer.
  367. @ref-end-item
  368. @ref-start-item M-C-@
  369. fold-region, folds the region.
  370. @ref-end-item
  371. @}}}
  372. @{{{  Search/replace
  373. @{{{  Search for a string
  374. @ref-start-item M-C-S
  375. search-forward, prompts for a string and moves the cursor
  376. to the next occurence of it.
  377. @ref-end-item
  378. @ref-start-item M-C-R
  379. search-reverse, prompts for a string and moves the cursor
  380. to the last occurence of it.
  381. @ref-end-item
  382. @}}}
  383. @{{{  Incremental search for a string
  384. Incremental search allows you to see the result of the search while the
  385. search string is typed/changed.
  386.  
  387. @ref-start-item C-S
  388. incremental-search-forward, switches to incremental search mode
  389. with default direction forward.
  390. @ref-end-item
  391. @ref-start-item C-R
  392. incremental-search-reverse, switches to incremental search mode
  393. with default direction backward.
  394. @ref-end-item
  395.  
  396. @{{{  Functions in incremental search mode
  397. During incremental search, you can use the following commands:
  398.  
  399. @ref-start-item <chr>
  400. Append the character to the search pattern and search in current
  401. search direction.
  402. @ref-end-item
  403. @ref-start-item C-S
  404. Move the cursor to the next occurence of the search string and
  405. switch to search direction forward.
  406. @ref-end-item
  407. @ref-start-item C-R
  408. Move to the previous occurence and switch to searching backward.
  409. @ref-end-item
  410. @ref-start-item C-P
  411. Go back in search history.
  412. @ref-end-item
  413. @ref-start-item C-N
  414. Go forward in search history.
  415. @ref-end-item
  416. @ref-start-item C-M  |  C-J
  417. exit incremental search, leave the cursor where it is.
  418. @ref-end-item
  419. @ref-start-item C-H
  420. remove last letter from search pattern.
  421. @ref-end-item
  422. @ref-start-item C-G
  423. aborts incremental search, sets the cursor to where it was before.
  424. @ref-end-item
  425. @}}}
  426. @}}}
  427. @{{{  Search and replace
  428. @ref-start-item M-R
  429. replace-string, asks for a search string and a replace string
  430. and replaces all occurences of the search string by the replace
  431. string.
  432. @ref-end-item
  433. @ref-start-item M-R
  434. query-replace-string, asks for a search string and a replace
  435. string and gives the choice to replace the search string by the
  436. replace string at all occurences. During query-replace-string
  437. the following commands are available:
  438.  
  439. @ref-start-item Y
  440. replace and go to next occurence
  441. @ref-end-item
  442. @ref-start-item N
  443. don't replace and go to next occurence
  444. @ref-end-item
  445. @ref-start-item !
  446. replace all further occurences
  447. @ref-end-item
  448. @ref-start-item A
  449. abort
  450. @ref-end-item
  451. @ref-start-item .
  452. replace this occurence and abort after
  453. @ref-end-item
  454. @ref-end-item
  455. @}}}
  456. @}}}
  457. @{{{  Files
  458. @ref-start-item C-X C-I
  459. insert-file, inserts the contents of a file at the current position into the
  460. buffer.
  461. @ref-end-item
  462. @ref-start-item C-X C-S
  463. save-file, writes the buffer back to the edited file. If your
  464. terminal is supported, the save key will also work.
  465. @ref-end-item
  466. @ref-start-item C-X C-W
  467. write-file, writes the buffer to another file.
  468. @ref-end-item
  469. @ref-start-item C-X C-R
  470. read-file, reads another file into the buffer.  A set argument will read the
  471. file without parsing.  The state of the mode parsing will not be changed.
  472. @ref-end-item
  473. @ref-start-item C-X C-N
  474. next-file, reads next file from command line argument list into
  475. the buffer.
  476. @ref-end-item
  477. @ref-start-item C-X C-P
  478. previous-file, reads previous file from command line argument list into
  479. the buffer.
  480. @ref-end-item
  481. @ref-start-item M-~
  482. set-file-unchanged, marks the buffer as unchanged.
  483. @ref-end-item
  484. @}}}
  485. @{{{  Buffers
  486. Origami has a different buffer concept than most other emacs
  487. implementations. Each buffer has its own (and only) window to edit it.
  488. Buffers may not be currently visible, so list-buffers is an important
  489. function if you get lost.
  490.  
  491. @ref-start-item C-X C-B
  492. list-buffers, show a list of all used buffers and offers a menu
  493. for selecting another buffer (return moves you back to the old
  494. position). If your terminal supports it, the select key will
  495. also work.
  496. @ref-end-item
  497. @ref-start-item C-X b
  498. change-buffername, changes the name of the current buffer
  499. @ref-end-item
  500.  
  501. @{{{  Opening and closing buffers
  502. @ref-start-item C-X "2
  503. open-buffer, open a second buffer by parting the current window
  504. horizontally.  A set argument will read the file without parsing.  The
  505. state of the mode parsing will not be changed.
  506. @ref-end-item
  507. @ref-start-item C-X "3
  508. open-adjacent-buffer, open a second buffer by parting the current window
  509. vertically.  A set argument will read the file without parsing.  The state
  510. of the mode parsing will not be changed.
  511. @ref-end-item
  512. @ref-start-item C-X "0
  513. exit-buffer, close the current buffer and unify the window with
  514. the window of the previous buffer
  515. @ref-end-item
  516. @ref-start-item C-X @
  517. show a special buffer containing the last messages.
  518. @ref-end-item
  519. @}}}
  520. @{{{  Changing between buffers
  521. @ref-start-item M-C-X p
  522. previous-buffer, go to the previous buffer.
  523. @ref-end-item
  524. @ref-start-item M-C-X n
  525. next-buffer, go to the next buffer.
  526. @ref-end-item
  527. @ref-start-item C-X o
  528. other-buffer, go cyclic to the next buffer.
  529. @ref-end-item
  530. @ref-start-item M-C-X C-P
  531. up-buffer, move up one buffer
  532. @ref-end-item
  533. @ref-start-item M-C-X C-N
  534. down-buffer, move down one buffer
  535. @ref-end-item
  536. @ref-start-item M-C-X C-B
  537. left-buffer, move left one buffer
  538. @ref-end-item
  539. @ref-start-item M-C-X C-F
  540. right-buffer, move right one buffer
  541. @ref-end-item
  542. @}}}
  543. @{{{  Resizing buffers
  544. @ref-start-item C-X "1
  545. full-size-buffer, extend the size of the current buffer to screen size
  546. @ref-end-item
  547. @ref-start-item M-C-X ^
  548. grow-buffer, grow current buffer vertically
  549. @ref-end-item
  550. @ref-start-item M-C-X v
  551. shrink-buffer, shrink current buffer vertically
  552. @ref-end-item
  553. @ref-start-item M-C-X <
  554. widen-buffer, grow current buffer horizontally
  555. @ref-end-item
  556. @ref-start-item M-C-X >
  557. narrow-buffer, shrink current buffer horizontally
  558. @ref-end-item
  559. @}}}
  560. @}}}
  561. @{{{  Modes
  562. Unlike most other Emacs implementations, Origami does not seperate
  563. between major and minor modes. The mode default values can be set
  564. using command line switches:
  565.  
  566. @{{{  Origami Command Line Options
  567. @}}}
  568. @{{{  EMacs Command Line Options
  569. @}}}
  570.  
  571. All modes are related to a buffer, they are set with C-X "m <mode-key>
  572. and deleted with C-X C-M <mode-key>. The following mode-keys are
  573. available:
  574.  
  575. @ref-start-item "a
  576. autosave, asks for a time interval and saves the text each time
  577. after this interval expires
  578. @ref-end-item
  579. @ref-start-item "c
  580. c-mode, syntax support for C
  581. @ref-end-item
  582. @ref-start-item "d
  583. show a menu for changing the used character display mode. This
  584. mode also can only be changed, not deleted.
  585. @ref-end-item
  586. @ref-start-item "f
  587. full-shift, moving over the right border of the screen will shift
  588. the whole buffer, not only the current line.
  589. @ref-end-item
  590. @ref-start-item "i
  591. autoindent, new lines will be indented as their predecessor
  592. @ref-end-item
  593. @ref-start-item "l
  594. set-language, sets a new language for fold comments. This mode
  595. can only be changed and not deleted.
  596. @ref-end-item
  597. @ref-start-item "m
  598. basic-regular-expression, search/replace will use regular
  599. expressions
  600. @ref-end-item
  601. @ref-start-item "M
  602. extended-regular-expression, search/replace will use extended
  603. expressions.
  604. @ref-end-item
  605. @ref-start-item "n
  606. no-parse, reading files will be done without fold parsing
  607. @ref-end-item
  608. @ref-start-item "o
  609. overwrite, new text overwrites existing text instead of being
  610. inserted
  611. @ref-end-item
  612. @ref-start-item "p
  613. position, always show current position in status line
  614. @ref-end-item
  615. @ref-start-item "t
  616. time, display the time right from the filename
  617. @ref-end-item
  618. @ref-start-item "v
  619. view, text can only be viewd but not changed
  620. @ref-end-item
  621. @ref-start-item "V
  622. If set, EMacs will be more verbose in some situations.
  623. @ref-end-item
  624. @ref-start-item "w
  625. wrap, wraps a word to the next line if neccessary
  626. @ref-end-item
  627. @ref-start-item "#
  628. hash-shifting
  629. @ref-end-item
  630. @}}}
  631. @{{{  Arguments
  632. @ref-start-item M-<number>
  633. set-argument-<number> (number can be a digit from 0 to 9),
  634. set number as argument for the next executed command. Any
  635. following typed digits will be part of the number. Most
  636. commands simply are executed number times, when prefixed by
  637. an argument.
  638. @ref-end-item
  639. @}}}
  640. @{{{  Shell Commands
  641. @{{{  shell
  642. @ref-start-item shift-command  |  C-X "c
  643. shell, starts a sub shell
  644. @ref-end-item
  645. @}}}
  646. @{{{  shell-command
  647. @ref-start-item command  |  C-X "!
  648. shell-command, starts a sub shell with a given command
  649. @ref-end-item
  650. @}}}
  651. @{{{  filter-buffer
  652. @ref-start-item C-X "|
  653. filter-buffer, first saves  current file and then filters it
  654. through the specified filter command.
  655. @ref-end-item
  656. @}}}
  657. @{{{  pipe-to-command
  658. @ref-start-item C-X ">
  659. pipe-to-command, feeds the command with the current file as
  660. standard input.
  661. @ref-end-item
  662. @}}}
  663. @{{{  pipe-from-command
  664. @ref-start-item C-X "<
  665. pipe-from-command, inserts standard output from command at the
  666. current position.
  667. @ref-end-item
  668. @}}}
  669. @{{{  make-it
  670. @ref-start-item M-x m
  671. make-it, invoke make
  672. @ref-end-item
  673. @}}}
  674. @{{{  compile-it
  675. @ref-start-item M-x c
  676. compile-it, invoke C compiler
  677. @ref-end-item
  678. @}}}
  679. @{{{  beautify-c-code
  680. @ref-start-item C-X "i
  681. beautify-c-code, filter buffer through beautifier
  682. @ref-end-item
  683. @}}}
  684. @{{{  check-out
  685. @ref-start-item M-x o
  686. check-out, checks current file out but does *not* reload the
  687. buffer.
  688. @ref-end-item
  689. @}}}
  690. @{{{  check-in
  691. @ref-start-item M-x i
  692. check-in, saves buffer and checks file in
  693. @ref-end-item
  694. @}}}
  695. @{{{  spell-it
  696. @ref-start-item M-x s
  697. spell-it, runs current file through spell and starts an
  698. interactive search and replace for all misspelled words.
  699. @ref-end-item
  700. @}}}
  701. @}}}
  702. @{{{  More advanced functions
  703. @{{{  C-Mode
  704. The following characters have a special meaning in C-mode:
  705.  
  706. @ref-start-picture
  707. ( [ { '  "  ;
  708. @ref-end-picture
  709.  
  710. Just play around to get used to them, once you are they save lots of
  711. typing. In C-mode words consist of letters, digits and underscores.
  712. @}}}
  713. @{{{  Tags
  714. @{{{  enter-and-go-tags-buffer
  715. @ref-start-item M-.
  716. enter-and-go-tags-buffer, prompt for tag and go to tagged
  717. position (open buffer, if needed)
  718.  
  719. filename-or-tag-completion can also be used. In this case, the
  720. first tag starting with the given text is used.
  721. @ref-end-item
  722.  
  723. @{{{  @tags-mac-ref Tags file
  724. @}}}
  725. @}}}
  726. @{{{  find-and-go-tags-buffer
  727. @ref-start-item M-,
  728. find-and-go-tags-buffer, like enter-and-go-tags-buffer, but use
  729. the word under the cursor
  730. @ref-end-item
  731.  
  732. @{{{  @tags-mac-ref Tags file
  733. @}}}
  734. @}}}
  735. @{{{  set-user-tags-file
  736. @ref-start-item C-X t
  737. set-user-tags-file, define a new tags file (empty input uses
  738. default tags files).
  739. @ref-end-item
  740.  
  741. @{{{  @tags-mac-ref Tags file
  742. @}}}
  743. @}}}
  744. @}}}
  745. @{{{  Macros
  746. @{{{  start-define-macro
  747. @ref-start-item C-X "(
  748. define-macro, starts recording a keyboard macro
  749. @ref-end-item
  750. @}}}
  751. @{{{  end-define-macro
  752. @ref-start-item C-X ")
  753. define-macro, ends recording a keyboard macro
  754. @ref-end-item
  755. @}}}
  756. @{{{  execute-macro
  757. @ref-start-item C-X "e
  758. execute-macro, executes a recorded keyboard macro
  759. @ref-end-item
  760. @}}}
  761. @}}}
  762.  
  763. @{{{  center-and-redraw-display
  764. @ref-start-item C-L
  765. center-and-redraw-display, redraws screen bringing the current
  766. line to the middle of the screen.
  767. @ref-end-item
  768. @}}}
  769. @{{{  redraw-display
  770. @ref-start-item refresh  |  M-C-L
  771. redraw, redraws screen e.g. after write(1)s from other people
  772. etc.
  773. @ref-end-item
  774. @}}}
  775.  
  776. @{{{  describe-bindings
  777. @ref-start-item shift-help  |  C-X "?
  778. describe-bindings, shows all commands and where they are bound to
  779. @ref-end-item
  780. @}}}
  781. @{{{  describe-fold
  782. @ref-start-item C-X "=
  783. describe-fold, gives you some information about your position in
  784. the text
  785. @ref-end-item
  786. @}}}
  787. @{{{  quote-character
  788. @ref-start-item C-Q
  789. quote-character, simply insert the next character and do not
  790. parse it as a command
  791. @ref-end-item
  792. @}}}
  793. @{{{  filename-or-tag-completion
  794. @ref-start-item M-C-I
  795. filename-or-tag-completion, complete a word to a filename. This
  796. function works everywhere, not only in prompts! If
  797. filename-or-tag-completion is used outside of prompts and if
  798. there is no filename to complete, Emacs tries to complete the
  799. started word as tag.
  800. @ref-end-item
  801.  
  802. @{{{  @tags-mac-ref Tags file
  803. @}}}
  804. @}}}
  805. @{{{  fill-paragraph
  806. @ref-start-item M-q
  807. fill-paragraph, fills paragraph from cursor to end of paragraph
  808. @ref-end-item
  809. @}}}
  810. @{{{  set-fill-column
  811. @ref-start-item C-X "f
  812. set-fill-column, sets fill column to argument, or cursor position
  813. if none is given, or asks for it if cursor if at the left margin.
  814. @ref-end-item
  815. @}}}
  816. @}}}
  817. @{{{  How to get out
  818. @{{{  exit-origami
  819. @ref-start-item exit  |  C-X C-C
  820. exit-origami
  821. @ref-end-item
  822. @}}}
  823. @{{{  save-and-exit-origami
  824. @ref-start-item shift-exit  |  M-Z
  825. save-and-exit-origami
  826. @ref-end-item
  827. @}}}
  828. @{{{  suspend-origami
  829. @ref-start-item suspend  |  C-Z
  830. suspend-origami
  831. @ref-end-item
  832. @}}}
  833. @}}}
  834.  
  835. @{{{  Funny Functions
  836. @{{{  @ff sokoban
  837. @ref-start-item M-X k
  838. @{{{  sokoban
  839. @}}}
  840. @ref-end-item
  841. @}}}
  842. @{{{  @ff towers-of-hanoi
  843. @ref-start-item M-X t
  844. Play the well known game towers-of-hanoi at the bottom of the current buffer.
  845. set-argument can be used, to control the height.
  846. @ref-end-item
  847. @}}}
  848. @}}}
  849. @}}}
  850. @}}}
  851.