Fern   davin.50webs.com
New Zealanders making it harder to hate computers

       Main Menu        Research Projects       Photo Album            Curriculum Vitae      The Greatest Artists
    Email Address     Computer Games        Web Design           Java Programming       The Fly (A Story)   
  Political Activism   Bob Dylan Quotes+       My Life Story          Smoking Cessation          Other Links      


How to use Davin’s version of GNU Emacs

For programming in S.J.S. it is recommended to use Davin’s version of GNU Emacs so that you get built-in syntax highlighting and automatic indentation of S.J.S. code. For more detailed tutorials on how to use Emacs, simply press f1 inside Emacs. A small caveat applies to the on-line documentation accessed via the f1 command: it explains how to use vanilla Emacs, i.e. a version that does not use my extensive customisations. I have also simplified some of the terminology from the on-line manuals.


Challenge to you: If you don’t like any of the following keybindings then most of them can be redefined to whatever you prefer.

Windows-Style Key Bindings

Emacs does not support Windows-style key bindings by default, but I have altered my version of Emacs so that it does support the following Windows-standard key bindings:


Ctrl-oOpen file. Similar to Ctrl-f but opens a Windows file dialog box. Not as fast as Ctrl-f and cannot be used to open folders.
Ctrl-xCut a Region of Text.
Ctrl-cCopy a Region of Text.
Ctrl-vPaste a Region of Text.
Ctrl-zUndo / Redo the Last Change.
Shift-left or Shift-Right or
Shift-Up or Shift-Down
Marks a region of text
DeleteWhile a region is highlighted, deletes that region

Other Important Key Bindings

Ctrl-f or Ctrl-dFind/Open/Load File or Folder.
Ctrl-x Ctrl-sSave Currently Edited File.
Ctrl-x sSave Some Files (Yes or No Per File).
Ctrl-x kKill the Current File (Asks to confirm if the current file hasn’t been saved).
InsertElectric Buffers Menu (Note: Buffer ≈ File). (Once you get used to it, you will wonder how you ever got by without it!) The f12 key also does the same thing. One common usage of the Electric Buffers Menu is to toggle between the current and the next-to-current file using the key sequence Insert Insert. Note that the Buffers Menu at the top of the screen does a similar thing.
Ctrl-sIncremental Search Forward.
Ctrl-rIncremental Reverse Search.
Alt-% actually Alt-Shift-5Search and Replace.
Alt-/Automatically Complete Abbreviation. (Once you get used to it, you will wonder how you ever got by without it!)
Esc Esc Esc or Ctrl-gAbort Current Command and Widen Narrowed Buffer.
Ctrl-x Ctrl-qQuit Emacs (More simply just press the close button on the top right hand corner of the screen).

Function Key Bindings

f1Online Help.
f2Save All Buffers That You Are Currently Editing (No Questions Asked).
f3Save and Delete Non-Essential Buffers (No Questions Asked). This is useful when you are editing a whole bunch of files and you wish to purge them all to disk.
f4Widen (the opposite of Ctrl-2 and Ctrl-3).
f5Automatically Indent Whole Buffer (see tutorial 2).
f6Opens a file using the Windows open file dialog box. This is the same as the key sequence Ctrl-o.
f7Toggles the current file’s read-only status. Note that files in the output folder are set to be read-only by default. This device is intended to protect the user from editing files that they shouldn’t be editing. If you really want to edit a file that you shouldn’t simply press this key and it opens up the possibility of editing that file.
f8Undo / Redo.
f9Compile Using the Last Compile Command.
Ctrl-f9 or Alt-f9 or Shift-f9Compile and Edit the Command Line.
f11Auto Complete File Name. (Once you get used to it, you will wonder how you ever got by without it!)
f12Electric Buffers Menu. (Once you get used to it, you will wonder how you ever got by without it!) The Insert key also does the same thing. One common usage of the Electric Buffers Menu is to toggle between the current and the next-to-current file using the key sequence f12 f12.

Miscellaneous Key Bindings

Alt-uChange current word to uppercase.
Alt-lChange current word to lowercase.
Alt-cCapitalise current word.
Alt-qReformat paragraph to the width of the current value of the fill-column variable.

Cutting and Pasting Text I

Ctrl-kKill Line and Append to Last Kill.
Ctrl-yYank Last Kill.
Alt-y , immediately following Ctrl-ySearched Killed Text. Each time you press this key it goes back one step through the "kill ring".
Ctrl-Backspace or Alt-BackspaceBackward Delete Word. (Once you get used to it, you will wonder how you ever got by without it!)
Ctrl-Delete or Alt-DeleteForward Delete Word. (Once you get used to it, you will wonder how you ever got by without it!)

Cutting and Pasting Text II

Ctrl-SpaceSet Mark.
Alt-SpacePop Mark Off Stack.
Ctrl-x Ctrl-xSwap Mark And Point.
Ctrl-wCut Region Between Mark and Point.
Alt-wCopy Region Between Mark and Point.

Splitting and Merging Windows

Ctrl-0Delete This Window.
Ctrl-1 or f4Delete All Other Windows.
Ctrl-2Split Window Vertically.
Ctrl-3Split Window Horizontally.
Ctrl-TabOther Window.

Navigating the Emacs Online "Info" Help System

Note that the Emacs Info help system is operated much like a web browser.

nNext Info Page.
pPrevious Info Page.
lLast Info Page (same as the back button on a web browser).
rSame as the forward button on a web browser.
dReturns to the Main Directory of All Info Pages, much like to home button on a web browser.

Useful Keys for Debugging HTML Documents

Alt-;Toggle Tags (see tutorial 1).
Ctrl-Left or Alt-Left
Ctrl-Right or Alt-Right
Find Matching Bracket < > ( ) [ ] { } (see Webdesign Tutorial 1).
Alt-x testlinks EnterDebug Broken Links (see Webdesign Tutorial 2).
TABAutomatically Indent Current Line (see Webdesign Tutorial 3).
f5Automatically Indent Whole Buffer (see Webdesign Tutorial 3).
Alt-x weblint EnterRun the external program weblint to debug HTML (see tutorial Webdesign Tutorial 3.)


Back to Main Menu
| Main Menu | Research Projects | Photo Album | Curriculum Vitae | The Greatest Artists |
| Email Address | Computer Games | Web Design | Java Programming | The Fly (A Story) |
| Political Activism | Bob Dylan Quotes+ | My Life Story | Smoking Cessation | Other Links |

Please report any broken links to the Web-person
Last modified: Tue Mar 25 12:26:59 NZST 2014
Best viewed at 800x600 or above resolution.
© Copyright 1999-2014 Davin Pearson.