linuxnewbie.org.gif
Tuesday, 12-Dec-2000 10:40:19 EST
Newbized Help Files articles discussion board bookshelf sensei's log advertising info
BASIC COMMANDS

OPENING A FILE / CREATING A NEW ONE

To get started, you are going to want to create your own file to work with. This is done by issuing the open file command. Type C-x-C-v. In the message box the path of the file will appear. What you will probably see looks like this : '~/'. This indicates that emacs is looking in the directory from which it was called for the file.

Hopefully, you started emacs up from your home directory, or wherever you like to keep your files. So, it'll be just fine to type in the name of the document you want to open. If it doesn't exist in the current directory, a new file of that name will be created. So, type in 'example.txt' or anything that ends with the '.txt' extension, and hit Enter. And presto! You have a new, blank emacs document to work with. Take note of the changes that have occured on the white info bar at the bottom of the screen. The filename you chose is now there and the operation mode is now (Text Fill). This is the standard plain text editing mode. You're ready to type away.

SAVING A FILE

Now that you have played around and created this new, or edited an existing, document you may find it useful to save the changes you have made. This is easily done by typing the command C-x-C-w to save those changes. This allows you to save the document and continue working.

EXITING EMACS

When you have had enough of emacs, the command C-x-C-c will lead you out. If you try to exit emacs without saving your document it will ask you if you really want to discard the changes you have made. You can answer with a 'y' for yes, 'n' for no, or '!' to force quitting with no questions asked. This precaution can be a pain, but it only takes once to learn how useful it is for the computer to ask before your changes are deleted.

MOVING AROUND IN EMACS

For moving around from space to space or from line to line, it is probably easiest to simply use the arrow keys. However, if the arrow keys are not mapped on your terminal, or if you like to do things the "special" way, here are the movement commands.

C-f forward one character
C-b backward one character
C-n move to next line
C-p move to previous line

Now, there are some other movement commands that are useful no matter what kind of emacs you are using. A few of the most useful are listed here for your convenience.

C-a moves to the beginning of a line
C-e moves to the end of a line
C-v moves forward one screen
M-v moves backward one screen
C--> moves right to the end of the next word
C-<- moves left to the beginning of previous word

There are a number of editing commands that are also helpful in basic text-editing mode.

C-k deletes everything to the right of the cursor on current line
C-d deletes characters from the left (unlike standard DEL)


Table Of Contents


Last edited on April 22, 1999
Text written by Bryan Dotzour
[-NHF Control Panel-]
The Linux Channel at internet.com
Linux Planet
Linux Today
Linux Central
Linuxnewbie.org
PHPBuilder
Just Linux
Linux Programming
Linux Start
BSD Today
Apache Today
Enterprise Linux Today
BSD Central
All Linux Devices
SITE DESCRIPTIONS
[-What's New-]
Order a Linuxnewbie T-Shirt
Easy Webcam NHF
Directory Navigation NHF
Installing Snort 1.6.3 on SuSE 6.x-7.x
Customizing vim
The SysVinit NHF
Installing ALSA for the VT82C686 integrated sound
USB Creative Video Blaster II for Linux
Configuring the Intellimouse Explorer in XFree86 V4+
The beginnings of a distro NHF
Getting Past Carnivore?
Getting and Installing PGP
Getting your ATI Rage 128 Working
How to create a multiple partition system
Using Fdisk
Introduction to Programming in C/C++ with Vim
Adding a Hard drive in Linux -- In five steps
Installing ALSA for the Yamaha DS-XG Sound Card
Getting your Diamond Rio Mp3 Player to work with Linux
Bash Programming Cheat Sheet
Installing NVIDIA Drivers for Mandrake
Setting up Portsentry
Hard Drive Speed Tweak for Linux
Sensei's Log
Chat room
Join: Linuxnewbie.org SETI Black Belts!
Send in your news
Click the image to add Linuxnewbie.org to your MyNetscape Page
[-LNO Newsletter-]

[-Archive-]
The beginnings of a distro NHF
Connecting to the Internet using KPPP
Getting your SBLive to work
Unreal Tournament NHF
LWE Day 2 Pictures
LWE Day 1 Pictures
The LNO FAQ!
WoW (Words of Wisdom)
Other sites news
What is Linux?
What is Linux? part deux (ups & downs)
Search newsgroups
The List
ALS Report
Feedback Form
jobs.linuxtoday.com.gif
Match: Format: Sort by:
Search:
Copyright © 1999 All Rights Reserved
[-Quick Links-]

Copyright 2000 internet.com Corp. All Rights Reserved. Legal Notices Privacy Policy

internet.com.gif