Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Other Community Discussions > Tutorials & Tips
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Ubuntu 9.10 is out!!!

When downloading Ubuntu 9.10 please consider using bittorrent to get your copy of Ubuntu.

The Ubuntu Developers Summit for Lucid Lynx will be held the week of 16-Nov-2009 till 20-Nov-2009 in Dallas, TX USA. Visit the the Ubuntu wiki for more information about UDS and how to participate remotely.

Tutorials & Tips
The place to find Ubuntu related Tips & Tricks.

 
Thread Tools Display Modes
Old November 9th, 2004   #1
HungSquirrel
Ubuntu Extra Shot
 
HungSquirrel's Avatar
 
Join Date: Oct 2004
Location: Mobile, AL, USA
Beans: 336
Ubuntu 8.10 Intrepid Ibex
Send a message via AIM to HungSquirrel Send a message via MSN to HungSquirrel
HOWTO: Edit text files in Ubuntu

Graphical

When Ubuntu is booted into the graphical environment (X), you can use gedit as your text editor. Gedit is a small, lightweight text editor similar to Windows' WordPad. It has a very easy to use graphical interface. To access it, navigate to Applications -> Accessories -> Text Editor.



Console

For those who would prefer (or for situations when you can't get X to start!), there are many text editors you can use from within the console.


nano

Nano is a very easy-to-use free pico clone that comes installed by default in Ubuntu. This is definitely a great console text editor for those who are unfamiliar with more advanced ones such as vim.

To use nano to edit a file, do the following in a terminal, where 'filename' is the name of the file you want create or modify:

Code:
nano filename
The important command shortcuts are displayed at the bottom of nano's screen, denoted by a ^ and a shortcut character. The ^ stands for the Ctrl character on your keyboard. For example, the exit shortcut on nano is ^X, so to exit nano you would hold down Ctrl and press x.

For more information on this editor, please see the documentation.


ee and aee

ee (Easy-Edit) and aee (Advanced Easy Editor) are two similar very easy to use console text editors. Like nano, keyboard shortcuts are performed by holding Ctrl and pressing the correct shortcut keys. Common shortcuts are listed at the top of the screen. There is also a handy menu system that can be accessed by pressing Esc.

Of the two, I prefer aee simply because the main menu loads slightly faster. Apart from that, their keyboard shortcut sequences are slightly different, but all the shortcuts are listed at the top of the screen. ee is the default text editor of FreeBSD.

To install these editors, you will need to enable the Universe repository.

After doing so, open a terminal and do the following to install ee:

Code:
sudo apt-get install ee
Or, for aee:

Code:
sudo apt-get install aee
To create or modify a file with these editors, do the following in a terminal, where 'filename' is the name of the file you want to edit or create:

Code:
ee filename
Or, for aee:

Code:
aee filename

vim

This powerful vi clone is installed by default on nearly all Linux systems, including Ubuntu. It has many advanced features such as syntax highlighting (a feature that color codes key words in programming languages and configuration files). If you prefer a more feature-packed text editor than nano and the rest, this is a good one.

To use vim to edit a file, do the following in a terminal, where 'filename' is the name of the file you want to create or modify:

Code:
vi filename
or

Code:
vim filename
To get syntax highlighting to work, do the following in a terminal:

Code:
cp /usr/share/vim/vim63/vimrc_example.vim ~/.vimrc
For more information on how to use vim, please see The Vim Documentation. Vim is a very powerful and complicated tool, so be sure to read over the documentation.
__________________
$ whatis themeaningoflife
themeaningoflife: not found

Last edited by HungSquirrel; November 9th, 2004 at 08:10 AM..
HungSquirrel is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:25 PM.


vBulletin ©2000 - 2009, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. bilberry