Skip to content

Instantly share code, notes, and snippets.

@chrisurf
Created December 10, 2021 13:44
Show Gist options
  • Select an option

  • Save chrisurf/2290057d74c790f342c4529774ae1518 to your computer and use it in GitHub Desktop.

Select an option

Save chrisurf/2290057d74c790f342c4529774ae1518 to your computer and use it in GitHub Desktop.
nano keyboard shortcuts mac

⌘ Command (or Cmd) ⇧ Shift ⌥ Option (or Alt) ⌃ Control (or Ctrl)

^ + G      (F1)              Display this help text
^ + X      (F2)              Close the current file buffer / Exit from nano
^ + O      (F3)              Write the current file to disk
^ + J      (F4)              Justify the current paragraph
  
^ + R      (F5)              Insert another file into the current one
^ + W      (F6)              Search for a string or a regular expression
^ + Y      (F7)              Move to the previous screen
^ + V      (F8)              Move to the next screen

^ + K      (F9)              Cut the current line and store it in the cutbuffer
^ + U      (F10)             Uncut from the cutbuffer into the current line
^ + C      (F11)             Display the position of the cursor
^ + T      (F12)             Invoke the spell checker, if available

^ + _      (F13)   (⌥ + G)   Go to line and column number
^ + \      (F14)   (⌥ + R)   Replace a string or a regular expression
^ + ^      (F15)   (⌥ + A)   Mark text at the cursor position
           (F16)   (⌥ + W)   Repeat last search

⌥ + ^              (⌥ + 6)   Copy the current line and store it in the cutbuffer
⌥ + }                        Indent the current line
⌥ + {                        Unindent the current line

^ + F                        Move forward one character
^ + B                        Move back one character
^ + Space                    Move forward one word
⌥ + Space                    Move back one word
^ + P                        Move to the previous line
^ + N                        Move to the next line
  
^ + A                        Move to the beginning of the current line
^ + E                        Move to the end of the current line
⌥ + (              (⌥ + 9)   Move to the beginning of the current paragraph
⌥ + )              (⌥ + 0)   Move to the end of the current paragraph
⌥ + \              (⌥ + |)   Move to the first line of the file
⌥ + /              (⌥ + ?)   Move to the last line of the file

⌥ + ]                        Move to the matching bracket
⌥ + -              (⌥ + _)   Scroll up one line without scrolling the cursor
⌥ + +              (⌥ + =)   Scroll down one line without scrolling the cursor
 
⌥ + <              (⌥ + ,)   Switch to the previous file buffer
⌥ + >              (⌥ + .)   Switch to the next file buffer

⌥ + V                        Insert the next keystroke verbatim
^ + I                        Insert a tab at the cursor position
^ + M                        Insert a newline at the cursor position
^ + D                        Delete the character under the cursor
^ + H                        Delete the character to the left of the cursor
^ + K                        Delete entire line
⌥ + T                        Cut from the cursor position to the end of the file
  
⌥ + J                        Justify the entire file
⌥ + D                        Count the number of words, lines, and characters
^ + L                        Refresh (redraw) the current screen

⌥ + X                        Help mode enable/disable
⌥ + C                        Constant cursor position display enable/disable
⌥ + O                        Use of one more line for editing enable/disable
⌥ + S                        Smooth scrolling enable/disable
⌥ + P                        Whitespace display enable/disable
⌥ + Y                        Color syntax highlighting enable/disable
   
⌥ + H                        Smart home key enable/disable
⌥ + I                        Auto indent enable/disable
⌥ + K                        Cut to end enable/disable
⌥ + L                        Long line wrapping enable/disable
⌥ + Q                        Conversion of typed tabs to spaces enable/disable
   
⌥ + B                        Backup files enable/disable
⌥ + F                        Multiple file buffers enable/disable
⌥ + M                        Mouse support enable/disable
⌥ + N                        No conversion from DOS/Mac format enable/disable
⌥ + Z                        Suspension enable/disable
^ + W                        Search for text
^ + R                        Find and Replace text
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment