nano

nano - это простой текстовый редактор в командной строке, который обладает относительно простым интерфейсом и управлением с помощью горячих клавиш. Вот некоторые основные горячие клавиши в nano:

  1. Сохранение изменений:

    • Сохранить (Write Out): Ctrl + O

    • Подтвердить сохранение: нажать Enter

  2. Закрытие файла:

    • Закрыть (Exit): Ctrl + X

    • Если были внесены изменения, nano спросит, нужно ли сохранить изменения.

  3. Отмена (Undo):

    • Alt + U

  4. Вырезать (Cut):

    • Ctrl + K

  5. Вставить (Paste):

    • Ctrl + U

  6. Копировать (Copy):

    • Alt + ^ (нажать Ctrl и, удерживая, нажать Shift + 6)

  7. Перемещение курсора:

    • Вверх: Ctrl + P

    • Вниз: Ctrl + N

    • Влево: Ctrl + B

    • Вправо: Ctrl + F

  8. Поиск и замена:

    • Поиск: Ctrl + W

    • Замена: Ctrl + \

  9. Показать номер строки и столбца:

    • Ctrl + C

  10. Выделение текста:

    • Alt + A (начать выделение)

    • Ctrl + K (вырезать выделенный текст)

  11. Помощь:

    • Ctrl + G (отображение справки)

  12. Перейти к строке:

    • Ctrl + _]

Это базовые горячие клавиши. Если вы хотите увидеть полный список горячих клавиш, вы всегда можете нажать Ctrl + G для отображения справки внутри nano.

 The nano editor is designed to emulate the functionality and ease-of-use
 of the UW Pico text editor.  There are four main sections of the editor.
 The top line shows the program version, the current filename being
 edited, and whether or not the file has been modified.  Next is the main
 editor window showing the file being edited.  The status line is the
 third line from the bottom and shows important messages.  The bottom two
 lines show the most commonly used shortcuts in the editor.

 Shortcuts are written as follows: Control-key sequences are notated with
 a '^' and can be entered either by using the Ctrl key or pressing the Esc
 key twice.  Meta-key sequences are notated with 'M-' and can be entered
 using either the Alt, Cmd, or Esc key, depending on your keyboard setup.
 Also, pressing Esc twice and then typing a three-digit decimal number
 from 000 to 255 will enter the character with the corresponding value.
 The following keystrokes are available in the main editor window.
 Alternative keys are shown in parentheses:

^G     (F1)      Display this help text
^X     (F2)      Close the current buffer / Exit from nano
^O     (F3)      Write the current buffer (or the marked region) to disk
^R     (Ins)     Insert another file into current buffer (or into new buffer)

^W     (F6)      Search forward for a string or a regular expression
^\     (M-R)     Replace a string or a regular expression
^K     (F9)      Cut current line (or marked region) and store it in cutbuffer
^U     (F10)     Paste the contents of cutbuffer at current cursor position

^J     (F4)      Justify the current paragraph
^T     (F12)     Invoke the spell checker, if available

^C     (F11)     Display the position of the cursor
^_     (M-G)     Go to line and column number

M-U              Undo the last operation
M-E              Redo the last undone operation

M-A    (^6)      Mark text starting from the cursor position
M-6    (M-^)     Copy current line (or marked region) and store it in cutbuffer

M-]              Go to the matching bracket

^Q               Search backward for a string or a regular expression
M-Q              Search next occurrence backward
M-W              Search next occurrence forward

^B     (Left)    Go back one character
^F     (Right)   Go forward one character
^Left  (M-Space) Go back one word
^Right (^Space)  Go forward one word
^A     (Home)    Go to beginning of current line
^E     (End)     Go to end of current line

^P     (Up)      Go to previous line
^N     (Down)    Go to next line
M-Up   (M--)     Scroll up one line without moving the cursor textually
M-Down (M-+)     Scroll down one line without moving the cursor textually

^Up    (M-7)     Go to previous block of text
^Down  (M-8)     Go to next block of text
M-(    (M-9)     Go to beginning of paragraph; then of previous paragraph
M-)    (M-0)     Go just beyond end of paragraph; then of next paragraph

^Y     (PgUp)    Go one screenful up
^V     (PgDn)    Go one screenful down
M-\    (^Home)   Go to the first line of the file
M-/    (^End)    Go to the last line of the file

M-Left (M-<)     Switch to the previous file buffer
M-Right(M->)     Switch to the next file buffer

^I     (Tab)     Insert a tab at the cursor position
^M     (Enter)   Insert a newline at the cursor position

^H     (Bsp)     Delete the character to the left of the cursor
^D     (Del)     Delete the character under the cursor
Sh-^Del          Delete backward from cursor to word start
^Del             Delete forward from cursor to next word start
M-T              Cut from the cursor position to the end of the file

M-J              Justify the entire file
M-D              Count the number of words, lines, and characters
M-V              Insert the next keystroke verbatim

^L               Refresh (redraw) the current screen
^Z               Suspend the editor (if suspension is enabled)

M-}    (Tab)     Indent the current line (or marked lines)
M-{    (Sh-Tab)  Unindent the current line (or marked lines)

M-3              Comment/uncomment the current line (or marked lines)
^]               Try and complete the current word

M-:              Start/stop recording a macro
M-;              Run the last recorded macro

M-Del            Throw away the current line (or marked region)

M-B              Invoke the linter, if available
M-F              Invoke a program to format/arrange/manipulate the buffer

^S               Save file without prompting

M-X              Help mode enable/disable
M-C              Constant cursor position display enable/disable
M-S              Soft wrapping of overlong lines enable/disable
M-N              Line numbering enable/disable
M-P              Whitespace display enable/disable
M-Y              Color syntax highlighting enable/disable

M-H              Smart home key enable/disable
M-I              Auto indent enable/disable
M-K              Cut to end enable/disable
M-L              Hard wrapping of overlong lines enable/disable
M-O              Conversion of typed tabs to spaces enable/disable

M-M              Mouse support enable/disable
M-Z              Suspension enable/disable

Last updated