mirror of
git://git.sv.gnu.org/nano.git
synced 2024-11-25 14:20:46 +03:00
101b53b541
Also, adjust the alignment of the two header lines, and slightly reword one of the descriptions.
139 lines
5.2 KiB
HTML
139 lines
5.2 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
<html lang="en">
|
|
|
|
<head>
|
|
<title>Cheatsheet for GNU nano</title>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
<meta name="description" content="A concise overview of the command shortcuts for nano, the editor, grouped by category.">
|
|
<meta name="keywords" content="cheatsheet, nano, editor, shortcuts, keystrokes, functions, operations, commands">
|
|
<meta name="author" content="Benno Schulenberg">
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<br>
|
|
<h1 align="center">Overview of nano's shortcuts </h1>
|
|
<h3 align="center">The editor's keystrokes and their functions </h3>
|
|
<br>
|
|
|
|
<table align="center"><tbody>
|
|
<tr><td>
|
|
|
|
<b>File handling</b>
|
|
<table><tbody>
|
|
<tr><td>Ctrl+S </td><td>Save current file</td></tr>
|
|
<tr><td>Ctrl+O</td><td>Offer to write file ("Save as")</td></tr>
|
|
<tr><td>Ctrl+R</td><td>Insert a file into current one</td></tr>
|
|
<tr><td>Ctrl+X</td><td>Close buffer, exit from nano</td></tr>
|
|
</tbody></table>
|
|
<br>
|
|
|
|
<b>Editing</b>
|
|
<table><tbody>
|
|
<tr><td>Ctrl+K </td><td>Cut current line into cutbuffer</td></tr>
|
|
<tr><td>Alt+6</td><td>Copy current line into cutbuffer</td></tr>
|
|
<tr><td>Ctrl+U</td><td>Paste contents of cutbuffer</td></tr>
|
|
<tr><td>Ctrl+]</td><td>Complete current word</td></tr>
|
|
<tr><td>Alt+3</td><td>Comment/uncomment line/region</td></tr>
|
|
<tr><td>Alt+U</td><td>Undo last action</td></tr>
|
|
<tr><td>Alt+E</td><td>Redo last undone action</td></tr>
|
|
</tbody></table>
|
|
<br>
|
|
|
|
<b>Search and replace</b>
|
|
<table><tbody>
|
|
<tr><td>Ctrl+B </td><td>Start backward search</td></tr>
|
|
<tr><td>Ctrl+F</td><td>Start forward search</td></tr>
|
|
<tr><td>Alt+B</td><td>Find next occurrence backward</td></tr>
|
|
<tr><td>Alt+F</td><td>Find next occurrence forward</td></tr>
|
|
<tr><td>Alt+R</td><td>Start a replacing session</td></tr>
|
|
</tbody></table>
|
|
<br>
|
|
|
|
<b>Deletion</b>
|
|
<table><tbody>
|
|
<tr><td>Ctrl+H</td><td>Delete character before cursor </td></tr>
|
|
<tr><td>Ctrl+D</td><td>Delete character under cursor</td></tr>
|
|
<tr><td>Alt+Bsp</td><td>Delete word to the left</td></tr>
|
|
<tr><td>Ctrl+Del </td><td>Delete word to the right</td></tr>
|
|
<tr><td>Alt+Del</td><td>Delete current line</td></tr>
|
|
</tbody></table>
|
|
<br>
|
|
|
|
<b>Operations</b>
|
|
<table><tbody>
|
|
<tr><td>Ctrl+T </td><td>Execute some command</td></tr>
|
|
<tr><td>Ctrl+T Ctrl+S</td><td>Run a spell check</td></tr>
|
|
<tr><td>Ctrl+T Ctrl+Y</td><td>Run a syntax check</td></tr>
|
|
<tr><td>Ctrl+T Ctrl+O </td><td>Run a formatter</td></tr>
|
|
<tr><td>Tab</td><td>Indent marked region</td></tr>
|
|
<tr><td>Shift+Tab </td><td>Unindent marked region</td></tr>
|
|
<tr><td>Ctrl+J</td><td>Justify paragraph or region</td></tr>
|
|
<tr><td>Alt+J</td><td>Justify entire buffer</td></tr>
|
|
<tr><td>Alt+:</td><td>Start/stop recording of macro </td></tr>
|
|
<tr><td>Alt+;</td><td>Replay macro</td></tr>
|
|
</tbody></table>
|
|
<br>
|
|
|
|
</td><td>
|
|
|
|
<b>Moving around</b>
|
|
<table><tbody>
|
|
<tr><td><b>←</b></td><td>One character backward</td></tr>
|
|
<tr><td><b>→</b></td><td>One character forward</td></tr>
|
|
<tr><td>Ctrl+<b>←</b></td><td>One word backward</td></tr>
|
|
<tr><td>Ctrl+<b>→</b></td><td>One word forward</td></tr>
|
|
<tr><td>Ctrl+A </td><td>To start of line</td></tr>
|
|
<tr><td>Ctrl+E</td><td>To end of line</td></tr>
|
|
<tr><td>Ctrl+P</td><td>One line up</td></tr>
|
|
<tr><td>Ctrl+N</td><td>One line down</td></tr>
|
|
<tr><td>Ctrl+<b>↑</b></td><td>To previous block</td></tr>
|
|
<tr><td>Ctrl+<b>↓</b></td><td>To next block</td></tr>
|
|
<tr><td>Ctrl+Y</td><td>One page up</td></tr>
|
|
<tr><td>Ctrl+V</td><td>One page down</td></tr>
|
|
<tr><td>Alt+\</td><td>To top of buffer</td></tr>
|
|
<tr><td>Alt+/</td><td>To end of buffer</td></tr>
|
|
</tbody></table>
|
|
<br>
|
|
|
|
<b>Special movement</b>
|
|
<table><tbody>
|
|
<tr><td>Alt+G </td><td>Go to specified line</td></tr>
|
|
<tr><td>Alt+]</td><td>Go to complementary bracket</td></tr>
|
|
<tr><td>Alt+<b>↑</b></td><td>Scroll viewport up</td></tr>
|
|
<tr><td>Alt+<b>↓</b></td><td>Scroll viewport down</td></tr>
|
|
<tr><td>Alt+<</td><td>Switch to preceding buffer</td></tr>
|
|
<tr><td>Alt+></td><td>Switch to succeeding buffer</td></tr>
|
|
</tbody></table>
|
|
<br>
|
|
|
|
<b>Information</b>
|
|
<table><tbody>
|
|
<tr><td>Ctrl+C </td><td>Report cursor position</td></tr>
|
|
<tr><td>Alt+D</td><td>Report line/word/character counts</td></tr>
|
|
<tr><td>Ctrl+G</td><td>Display help text</td></tr>
|
|
</tbody></table>
|
|
<br>
|
|
|
|
<b>Various</b>
|
|
<table><tbody>
|
|
<tr><td>Alt+A</td><td>Turn the mark on/off</td></tr>
|
|
<tr><td>Alt+T </td><td>Cut until end of buffer</td></tr>
|
|
<tr><td>Alt+V</td><td>Enter next keystroke verbatim</td></tr>
|
|
<tr><td>Alt+C</td><td>Turn constant position info on/off</td></tr>
|
|
<tr><td>Alt+N</td><td>Turn line numbers on/off</td></tr>
|
|
<tr><td>Alt+P</td><td>Turn visible whitespace on/off</td></tr>
|
|
<tr><td>Alt+S</td><td>Turn softwrapping on/off</td></tr>
|
|
<tr><td>Alt+X</td><td>Hide/unhide the help lines</td></tr>
|
|
<tr><td>Alt+Z</td><td>Hide/unhide the info bars</td></tr>
|
|
<tr><td>Ctrl+L</td><td>Refresh the screen</td></tr>
|
|
</tbody></table>
|
|
<br>
|
|
|
|
</td></tr>
|
|
</tbody></table>
|
|
|
|
</body>
|
|
|
|
</html>
|