Difference between revisions of "Navigation"

From WikEmacs
Jump to: navigation, search
m (Notes)
(Undo revision 1992 by GregLucas (talk))
Line 1: Line 1:
== Navigating Text Buffers ==
+
The result of dtlcruteivesy modifying literal data like  (A B C) is undefined. Don't do it.In most of the cases when you think you need to push something on the end of a list, you actually don't; PUSH+NREVERSE is often more suitable. When you really do need to push things on the end of a list, keeping a pointer to the tail of the list is handy.Counting instructions to see how you're doing is a little premature at this point.
 
+
For navigating a buffer while editing text use the following.
+
 
+
{| class="wikitable"
+
|+ Key bindings for navigating text
+
|-
+
! Entity % Movement
+
! Begin (Backward)
+
! End (Forward)
+
! Mark
+
! Kill Or Cut
+
|-
+
!Character
+
| {{Keys | C-b}}
+
| {{Keys | C-f}}
+
| {{Keys | C-@}}
+
| {{Keys | C-d}}
+
|-
+
!Word
+
| {{Keys | M-b}}
+
| {{Keys | M-f}}
+
| {{Keys | M-@}}
+
| {{Keys | M-d}}
+
|-
+
!Line
+
| {{Keys | C-a}}
+
| {{Keys | C-e}}
+
|
+
| {{Keys | C-k}}
+
|-
+
!Sentence
+
| {{Keys | M-a}}
+
| {{Keys | M-e}}
+
|
+
| {{Keys | M-k}}
+
|-
+
! Paragraph
+
| {{Keys | M-{ }}
+
| {{Keys | M-} }}
+
| {{Keys | M-h }}
+
| {{Keys | {{Keys | M-h C-w}}
+
|-
+
! Page
+
| {{Keys | C-x [ }}
+
| {{Keys | C-x ] }}
+
| {{Keys | C-x C-p}}
+
|
+
|}
+
 
+
=== Notes ===
+
 
+
; Sentence : By default Emacs expects two spaces between sentences. If you prefer to use a single space try {{CustomizeVariable|sentence-end-double-space}}.
+
; Paragraph : By default Emacs expects a blank line between paragraphs.
+
; Page : In "*.el" files and other text files (for example the <tt>NEWS</tt> file, {{Keys|C-h n}}), text is divided into "pages" delimited by `^L' character. This character can be entered with {{Keys|C-q C-l}}
+
 
+
 
+
== Navigating Source Code ==
+
 
+
For navigating source code (see [[:Category:Programming languages|Programming languages]]) use the following.
+
 
+
{| class="wikitable"
+
|+ Key bindings for navigating code
+
|-
+
! Entity % Movement
+
! Begin (Backward)
+
! End (Forward)
+
! Mark
+
! Kill Or Cut
+
! Up
+
|-
+
! sexp
+
| {{Keys | C-M-b}}
+
| {{Keys | C-M-f}}
+
| {{Keys | C-M-@}}
+
| {{Keys | C-M-k}}
+
| {{Keys | C-M-u}}
+
|-
+
! defun
+
| {{Keys | C-M-a}}
+
| {{Keys | C-M-e}}
+
| {{Keys | C-M-h}}
+
| {{Keys | C-M-h C-w}}
+
|
+
|-
+
|}
+
 
+
=== Notes ===
+
; sexp
+
: These are balanced expressions. For example, in [[C]] a block enclosed in a pair of '''{''','''}''' and in [[:Category:Lisp|Lisp]] a pair of '''(''', ''')'''.
+
; defun
+
: A Lisp function definition.
+
; subword : The use of <tt>CamelCaseIdentifiers</tt> is common in some programming languages. You can enable {{ModeLink|subword-mode}} to use the standard word-based commands such as {{Keys|M-f}} and {{Keys|M-b}} to navigate subwords delimited by capital letters.  
+
 
+
 
+
[[Category:Beginner]]
+

Revision as of 02:51, 23 June 2012

The result of dtlcruteivesy modifying literal data like (A B C) is undefined. Don't do it.In most of the cases when you think you need to push something on the end of a list, you actually don't; PUSH+NREVERSE is often more suitable. When you really do need to push things on the end of a list, keeping a pointer to the tail of the list is handy.Counting instructions to see how you're doing is a little premature at this point.