- Choosing an Editor: nano/pico or vi/vim
- Starting nano and Dabbling with It
- Saving in nano
- Cutting and Pasting Text Blocks in nano
- Checking Spelling in nano
- Getting Help in nano
- Exiting nano
- Starting vi (or vim) and Dabbling with It
- Saving in vi
- Adding and Deleting Text in vi
- Importing Files into vi
- Searching and Replacing in vi
- Exiting vi
When you’re finished editing in nano, you’ll exit it using the following steps.
To exit nano:
Within nano, press . If you haven’t made any changes to the text since you last saved the file, you’ll find yourself immediately back at the shell prompt. If you have made changes, you’ll be prompted to “Save modified buffer” .
nano gives you the opportunity to “Save modified buffer.” Without the techno-babble, this means to save the text you just wrote or edited before you exit.
At the “Save modified buffer” prompt:
- Press if you want to save your changes. Proceed to step 3.
- Press if you don’t want to save your changes. You’ll end up back at the shell prompt.
Specify the filename for your file if it’s the first time you’ve saved it. If you’ve saved it before, press to confirm the current filename or change the name to save a copy and not change the original file.