The search bar can also find specific line numbers. To continue to the next result, use Alt+W ( M-W). This will open a search prompt where you can type in the text you want to find. To search for a particular word or part of a text inside the editor, use the “where is” option with the Ctrl +W shortcut ( ^W). move to the end of the line: Ctrl+E (^E).move to the beginning of the line: Ctrl +A (^A).move to the previous page: Ctrl +Y (^Y).move to the previous line: Ctrl +P (^P).move back one word: Alt+Space (M-Space). ![]() ![]() move forward one word: Ctrl +Space (^Space).move forward one character: Ctrl +F (^F).Useful keyboard shortcuts for navigating include: Nano allows you to do this either by using the arrow keys or keyboard shortcuts. When dealing with a large file, it is helpful to know how to quickly navigate through the text. All shortcuts use unmodified numbers and lowercase letters. Note: Do not use the Shift button in Nano. The two bottom lines in the text editor will display some of the most commonly used shortcuts, as seen in the image below. They are represented by the letter M followed by a symbol.įor example, the shortcut to U ndo an action in a text is Alt+U (displayed as M-U). In addition, there are combinations that require the Meta key (usually the Alt button). Control shortcuts (used with the Ctrl button) are represented by a carat ( ^) followed by a symbol.įor example, the shortcut to Exit out of the Nano text editor is Ctrl+X (displayed as ^X). There are keyboard combinations for each function in Nano. Nano Command Keyboard Shortcuts Control Characters and Keys You can directly write, edit and navigate through content and receive immediate on-screen feedback. ![]() There is no need to switch to an edit mode, like in Vim. What makes Nano so attractive is that it has an easy graphical user interface (GUI), allowing users to directly interact with the text. nano +line,column file1.php Edit Files in Nano It is also possible to open a file and directly go to a specific line or column. However, to open a file in another directory, you must include the path in which the file is located: nano /path/to/file1.php For example, if the file is called file1.php, the command will be: nano file1.php To open an existing file, add the file name to the command.
0 Comments
Leave a Reply. |