File Editors

From arccwiki
Jump to: navigation, search

Several file editors are available to edit text-based source files and configuration files. The primary method of editing files is through the usage of console based editors. The ones that have been proven to be most useful are: vim, emacs, pico, and nano. Of these, vim and emacs seem to be the most full-featured and configurable.

vim

vim is a full-featured editor with many customizations. There is a guide to getting started at:

There are several tutorials and references on vim on the web such as:

Also, there is a tutorial inside of vim.

Starting vim at the command line is easily done with the following command:

vim filename

Once in the editor, start the tutorial by entering the :tutor. One can then follow the on-screen instructions.

vim configuration

A example base configuration file is as shown. It would be acceptable to save this file as $HOME/.vimrc

syntax on
set tabstop=4
set softtabstop=4
set shiftwidth=4
set expandtab
filetype on
filetype plugin indent on

emacs

emacs is a full-featured editor comparable with vim, but without insert and editor/command modes. Instead, commands are identified by special characters (combinations of the Control and/or Meta keys with regular characters), and regular text is treated as text being added to the document. It also has additional features designed for editing source code, and can be customized and used as an IDE for coding with integrated compiling and debugging. There are several tutorials online as well. The University of Chicago has done a great job on explaining what emacs is and how to use it:

That web site would be a great start to utilizing emacs.


Other editors

There are several other editors such as pico, nano, and gedit. The editors pico and nano are minimalist console editors whereas gedit is a graphical based text editor. To utilize gedit, you must start the SSH connection with X forwarding enabled.