Many Linux distributions bundle Vim as their default textual content editor. This appeals to many longtime Linux customers, and those that don’t like it may change it promptly after set up anyway. Vim is a humorous editor, although, because it’s one of many few that opens to a mode that doesn’t allow textual content entry. That’s a puzzling selection for any consumer, and it’s complicated for a brand new one.
Thanks to GNU nano, there’s a typical various to Vim for a light-weight terminal-based textual content editor, and it’s really easy to make use of—it has its most vital instructions listed on the backside of its window.
Installing
On Linux and macOS, you in all probability have already got GNU nano put in. You can confirm with the which
command:
If you don’t have it put in, you possibly can set up it out of your software program repository, or you possibly can download its source code and compile it your self.
On Windows, you possibly can install GNU nano utilizing Chocolatey.
Launching nano
Launch nano from the terminal, both alone:
$ nano
Or you can too open a particular file by following your command with a path to a file. If the file you title doesn’t exist already, it’s created:
$ nano instance.txt
Using nano
Nano is, with just a bit studying, fairly self-explanatory. When you launch it, nano opens to both an empty buffer or the file you opened. At the underside of the display, there’s an inventory of features and their corresponding keyboard shortcuts. More features can be found by urgent Ctrl+G for Get Help.
Here are a very powerful software instructions:
- Ctrl+S saves your work
- Ctrl+W save as
- Ctrl+R masses a file (“Read”)
- Ctrl+X quits, or exits
- Ctrl+G get assist
Here are the commonest modifying instructions:
- Alt+A choose (“mark”) a area
- Ctrl+Okay minimize marked textual content
- Ctrl+U paste (“uncut”)
- Alt+F undo
- Alt+E redo
Customizable
Nano isn’t as extensible as Emacs or Vim, however you may make some important customizations in a file known as ~/.nanorc
. In this file, you possibly can set international preferences, together with phrase wrap settings, shade schemes, line numbering, and extra. You can even create your personal key bindings, so if you wish to use Ctrl+V to stick as an alternative of nano’s default Ctrl+U, you possibly can change the binding assigned to the paste perform:
bind ^V paste all
You can get an inventory of all out there features within the GNU nano documentation.
Simple and efficient
GNU nano is a no-nonsense, simple textual content editor. It’s straightforward to make use of and gives all of the performance you count on from a textual content editor. Try it out, and benefit from the simplicity of intuitive modifying.