![]() You may also use the Ctrl+Shift+C keyboard shortcut in Ubuntu terminal. Select a text with mouse and then use the right click menu to copy the text. If you don’t want to spend too much time remembering the shortcuts, use mouse. Jump to a specific line in Nano Cut, copy and paste in Nano editor This will show you some options you can use at the bottom of the editor. If you want to go a specific location like last line, first line, to a certain text, use Ctrl+_ key combination. Ctrl+Y/Page Up and Ctrl+V/Page Down keys can be used to scroll by pages. You can use the Home key or Ctrl+A to move to the beginning of a line and End key or Ctrl+E to move to the end of a line. Use the arrow keys to move up and down, left and right. When you exit the editor using Ctrl+X keyboard shortcut, you’ll be asked whether you want to save your modified text to the file or not. ![]() ![]() Nothing is saved immediately to the file automatically unless you explicitly do so. It is almost like using a regular text editor, at least for writing and editing.Īs soon as you modify anything in the file, you’ll notice that it reflects this information on the editor. There are no special insert mode or anything of that sort. You can start writing or modifying the text straightaway in Nano. You may also open a new file without any name (like new document) with Nano like this: nano Basic editing If the file doesn’t exist, it will still open the editor and when you exit, you’ll have the option for saving the text to my_file. You can open a file for editing in Nano like this: nano my_file Open or create a file for editing in Nano When it says “M-U Undo”, it means use Alt+U key to undo your last action. ![]() When it says “^X Exit”, it means to use Ctrl+X keys to exit the editor. You should get familiar with the symbols in Nano. The wider your terminal window, the more shortcuts it shows. This way you won’t get stuck at exiting the editor like Vim. Nano editor also shows important keyboard shortcuts you need to use for editing at the bottom of the editor. You can start writing or editing text straightaway. If you’ve ever used Vim or Emacs, you’ll notice that using Nano is a lot simpler. Getting familiar with the Nano editor interface If not, please your distribution’s package manager to install it. I presume that you have Nano editor installed on your system already. Essential Nano keyboard shortcuts Shortcutĭownload-circle How to use Nano text editor Please expand the next section if you are just interested in a quick summary of Nano keyboard shortcuts. I will also include a downloadable PDF cheat sheet at the end of the article so that you can refer to it for practicing and mastering Nano editor commands. In this beginner’s guide, I’ll show you how to use the Nano text editor. Though it is less complicated to use than the likes of Vim and Emacs, it doesn’t mean Nano cannot be overwhelming to use. It performs the undo functionality using “ ALT+U” and redo functionality using “ CTRL+E.”This guide illustrated the use of the nano editor and how users can perform the “ undo” and “ redo” functionality in it.Nano is the default terminal-based text editor in Ubuntu and many other Linux distributions. The undo feature of the nano allows the users to fall back to the previous version of the document by reverting a few changes. The above image confirms the “redo functionality” of the nano editor on Linux. To redo in the nano editor, press “CTRL+E,” and it will display the message “Redid deletion,” confirming that the changes made by “undo functionality” are now “redone”: The nano editor has a redo command that can bring back the changes made by undo command. It is possible that a user accidentally undid the changes and wants to redo them. It will now show the message “ Undid deletion,” meaning that the characters/words that were deleted are added back to the file. In the above image, a few words were added to the existing text, let’s delete a few words, and then do “ undo functionality” of the nano editor using the combination of “ ALT+U”: To Undo in the nano editor, press “CTRL+U,” and the message “Undid addition” is appeared, as seen below: It will save the changes which cannot be undone. In most cases, the users will use “ CTRL+Z.“ which invokes the nano editor’s suspension mechanism, and they need to type “ CTRL+Z+T” to suspend the current session. When editing a document or a script file, you may have made an unnecessary addition/removal that must be undone.
0 Comments
Leave a Reply. |