Comparaison des versions

Légende

  • Ces lignes ont été ajoutées. Ce mot a été ajouté.
  • Ces lignes ont été supprimées. Ce mot a été supprimé.
  • La mise en forme a été modifiée.

At some point you may need to create or edit a file. To do so from the terminal you need to use a command line editor. The following is three of the most widely used command line editors.

nano

nano is the simplest of the three editors and does not have a steep learning curve. nano is best used for basic tasks such as writing text files. Commands for nano are displayed at the bottom of the editing screen so you will not have to remember them.

Note that on sporc or on versions of nano before version 2.3.5, in order to be able to undo, use nano -u

vim

vim is more difficult to learn and use than nano, but includes the benefit of syntax highlighting which is very useful when writing code.  vim will require some effort to become proficient in, but is worth it for it's efficiency. A full tutorial on vim can be found here, since it is already installed start with Getting Familiar. Interactive tutorials can be found online, simply search for them. 

emacs

In a basic sense, emacs is similar to vim in that it is more advanced than Nano and provides benefits such as syntax highlighting. Reasons to choose vim over emacs or visa versa are an advanced topic and depend on the needs of the user. There are many emacs tutorials on the internet here is one (emacs is already installed, so be sure to skip that part)

Basics to Text Editors

...

nano -u filename.fileExtension

...

vim filename.fileExtension

...

emacs filename.fileExtension

...

1. ^O (^ common notation for Ctrl, means hold Ctrl and press other key)

2. Press enter to confirm

...

1. Esc to exit 'insert mode'

2. Type :w

...

1. Esc to exit 'insert mode'

2. Type :q

*Save and Quit is :wq

C-x C-c

...

If there are any further questions, or there is an issue with the documentation, please contact rc-help@rit.edu for additional assistance.This wiki page is deprecated. You can find this documentation on our new documentation site: https://research-computing.git-pages.rit.edu/docs/text_editors.html