|
|
| Line 47: |
Line 47: |
| | :Display the current line regardless of where the edit position is on it. | | :Display the current line regardless of where the edit position is on it. |
| | | | |
| − | ==Other Resources== | + | ==Related Resources== |
| − | *[[Command_Line_Overview#Basic_Commands|Basic Commands]] | + | *[[Command_Line#Basic_Commands|Basic Commands]] |
| | *[[Command Mode| Command Mode Overview]] | | *[[Command Mode| Command Mode Overview]] |
| − | *[[Command Line Overview]] | + | *[[Command_Line|Command Line Overview]] |
Latest revision as of 17:30, 20 February 2017
Many of the commands operate on the text at the edit position. The edit position corresponds to the cursor position in Visual Mode. Commands exist to move the edit position by character or by line. The number of lines or characters the edit position moves is determined by the numeric argument for the command. Negative numbers mean backward movement, towards the beginning of the edit buffer.
- Begin_Of_File / BOF
- Move the edit position to the beginning of the file. Equivalent to clicking Goto then Beginning of file or Ctrl-Home.
- End_Of_File / EOF
- Move the edit position to the end of the file. Equivalent to clicking Goto then End of file or Ctrl-End.
- Begin_Of_Line / BOL
- Move the edit position to the beginning of the current line.
- End_Of_Line / EOL
- Move the edit position to the end of the current line.
- Goto_Line(n)
- Move the edit position to the beginning of line "n" in the file.
- Goto_Pos(n)
- Move the edit position to the nth character in the file. Counting starts at 0 (zero) - Goto_Pos(0) moves to the beginning of the file.
- Goto_Pos(500000)
- Move the edit position to the 500,001 'st character in the file. If the file is not this large, moves to the end of the file.
- Line(m) / L(m)
- Move the edit position forward or backward by "m" lines.
- Line(6) / L(6)
- Move the edit position forward by 6 lines.
- Line(-5) / L(-5)
- Move the edit position backwards by 5 lines.
- Line(0) / L(0)
- Move the edit position to the beginning of the current line. Equivalent to BOL( ).
- Char(m)
- Move the edit position forward or backward by "m" characters. Remember that with DOS/Windows files, the "newline" is usually two characters - <CR> and <LF>.
- Char(90) / C(90)
- Move the edit position forward by 90 characters.
- Char(-2) / C(-2)
- Move the edit position backward by 2 characters.
The commands that alter the text all operate from the current edit position. The search and replace commands normally start their search at the edit position. You can display the lines in the region of the edit position with the Type( ) command:
- Type(m) / T(m)
- Display (type) the following or previous "m" lines of file.
- Type(10) / T(10)
- Display the following 10 lines of the file.
- Type(-4) / T(-4)
- Display the previous 4 lines of the file.
- T(0) T
- Display the current line regardless of where the edit position is on it.
Related Resources