![]() To find the same string again, press Ctrl+W again and hit Enter. Performing a text search in nano is also easy: Hit Ctrl+W, enter the search string, and press Enter. You can then paste the snippet using the Ctrl+U shortcut. If you need to cut a single word or a text fragment, press Ctrl+6 or Alt+A, select the text you want, then press Ctrl+K to cut it. ![]() ![]() To move multiple lines, cut them using the Ctrl+K shortcut, then paste them all together by pressing Ctrl+U. To paste the line, place the cursor where you want to insert the line and press Ctrl+U. Like any text editor worth its salt, nano supports cut and paste actions. Nano shows the name of the file you are currently editing at the top of the screen As an alternative, you can pass the filename to the command to open the file when the program launches: nano. To create a new file, you just launch the editor by typing nano at the command line. ![]() If you exit nano from a modified file, it will prompt you to save it first. You can periodically save the file during editing using the Ctrl+O shortcut. Which key is defined as Meta depends on your system in most cases, it’s either the Esc, Alt, or Windows key (we use Alt in this HowTo). Some functions are accessible via the meta key (shown as M- in the onscreen Help). The circumflex (^) represents the Ctrl key – the shortcut Ctrl+G displays Help, for example. Keyboard shortcuts are shown at the bottom of the screen.
0 Comments
Leave a Reply. |