FutureQuest Professional Web Hosting Flash Intro FutureQuest Community Message Forums
Activate Today! Home Web Hosting
Services
Web Hosting
Support
Web Hosting
Data Center
Web Hosting
Community
Web Hosting
About
Web Hosting
Contact
Web Hosting
Account Management

Service Desk
Service Desk > Knowledgebase > Using the Pico Text Editor 12 Mar 2010
Using the Pico Text Editor

For editing files on the servers, one option is the File Manager interface in your account's CNC. The File Manager provides an easy-to-use, point-n-click web interface that is recommended for most Site Owners who wish to create or modify files directly on the FutureQuest® servers.

For those who would like to use a text editor in an SSH session, a simple text editor that is installed on all FutureQuest®servers is the Pico text editor. (Other text editors that are installed as well are vi, emacs, ed and Midnight Commander.)
Note: The FutureQuest® Service Desk does not provide direct support for the use of text editors. For assistance, please visit the Community Forums.

Here are some basic tips to get you started with Pico.

Starting a Session with Pico

At the command line enter

[username@FQ-Server:~]$ pico filename.ext

If the file filename.ext already exists, then Pico will open the existing file for editing. If the file filename.ext does not exist, it will be created as a new file.

Using Pico for Editing

Note that the ^ symbol denotes the Control (Ctrl) key. So ^G means the key combination Ctrl-G, which brings up the Help menu (for "Get Help"). As shown in the image below, Pico displays the current file name and its status across the top of the screen, and across the bottom are some listed commands.

Once you are inside the editor, you can simply begin typing. You can move around in Pico with the arrow keys. Here are some additional navigational commands.

Note: The ^ symbol denotes the Control (Ctrl) key.
Thus, ^A is the Ctrl-A key combination.
^A Move cursor to beginning of line.
^B Move cursor back one character.
^E Move cursor to end of line.
^F Move cursor forward one character.
^N Move cursor to next line.
^P Move cursor to previous line.
^V Move cursor forward a page of text.
^Y Move cursor backward a page of text.


Additional editing commands:

^R Insert the contents of a textfile at the current cursor position.
^^ Mark the current cursor position as the start of a text selection.
^K Cut (delete) the current line or marked text.
^U Uncut (paste) the text that was last deleted, at the current cursor position. By cutting in one location, moving cursor to a new location, and then uncutting, you can move text easily.
^L Redraw the screen.
^G Get Help. (Display the Pico Help File.)

A complete list of commands can be found by using the ^G(Ctrl-G)"Get Help" command.

Saving and Exiting

To save without exiting, use the ^O command. Pico may suggest a file name to save to, or you may have to enter one. Once you have the desired file name showing, hit [Enter] to finish saving.

To exit, use ^X. If there have been any changes made to the file, Pico will ask whether you would like to save. Type Y to save, or N to exit without saving. If you tell Pico to save, it will prompt for a file name. You may edit any suggested file name. Once you have the desired file name showing, hit [Enter] to finish saving and exit.

More Resources on Using Pico

Pico is a very simple text editor, and not as powerful as other editors such as vi or emacs. Because of its simplicity and ease of use, the Pico text editor is a good choice for many beginners. This tutorial does not cover all of the features of Pico. For additional information on using Pico, you will find numerous Pico tutorials posted on the web. A web search should turn up a great deal of additional information on using Pico. Here is a link to search results on Google:

Google Search Results for +"pico editor"+"tutorial"

In addition, should you have questions concerning Pico or need additional assistance, we invite you to visit the FutureQuest® Community Forums.

Related Topics
Why won't the editor in the CNC let me add new text to a file?

Reading Mail on the Server from the Command Line

Guidelines For Saving Files

CLI Tip: Midnight Commander (linux file manager)

Print Article
Add to Favorites
 

Service Desk | Knowledgebase | Downloads | Announcements | Ticket Status | Contact Us




Helpdesk Powered by Kayako eSupport
FutureQuest Professional Web Hosting Services
Click to verify BBB accreditation and to see a BBB report.
Copyright © 1998-2010 FutureQuest, Inc. All rights reserved.