|
GNU Emacs
is a text editor and a religion in itself that is
available on almost all platforms. Here is a list
of its features, listed in order of decreasing
coolness: Support for editing programs in virtually
any language. I use Emacs to edit the following
file types (in alphabetical order):
Bash Script
,
binary
,
Blitz BASIC
,
C
,
C++
,
C.S.S.
,
Emacs Lisp
,
H.T.M.L.
,
Java
,
JavaScript
,
LaTeX
,
m4
,
Makefile
,
MyS.Q.L.
,
P.H.P.
, and
Pov-Ray
.
If Emacs does not support your favourite language, it can
be easily made so that it does.
Built-in Emacs Lisp programming language for implementing
virtually any conceivable feature. You can read
an article about some
of the features that I have added to Emacs
.
Here is why Emacs is so good:
-
Customisable
Syntax
Highlighting
-
C/C++ keywords, comments and strings in their own
colours.
-
C/C++ global variables in a different colour from
local variables (a feature invented by me). The
downside of this feature is that global variables must
be prefixed by the
word
global_.
Using too many global variables can be a source of
bugs in a program, so it is useful to have syntax
highlighting of their use. The
dabbrev feature (see below) helps to mitigate
the cost in terms of extra typing from longer variable
names.
-
C/C++ Super Comments (a feature
invented by me). Super Comments start with
/// and end
with the end of line. Super Comments are
highlighted brighter then normal C/C++
comments and are analogous to Java’s
/**
... */
comments in that they contain text for the
programmer to read rather that just commented-out
code.
-
C++ Allegro graphics library function calls in their
own colour (a feature invented by me). Whatever
libraries you use, it is possible to set up syntax
highlighting for those libraries.
You can view
a screen-shot
of Emacs’ syntax highlighting using my
personal choices of colours. Note:
keywords are in bold
black, function definition names
are in bold
black foreground with yellow
background, types are
in blue
bold, comments are
in , super
comments are
in , strings are
in black
foreground with a blue
background, variable
definitions are
in blue
unbold, class properties are
in orange
bold and global variables are
in green
bold. I am using a variant of
the much maligned Hungarian notation so that
Emacs is able to highlight global variables
and class properties in different colours.
Without Hungarian notation such
as prop_*
for properties and
global_* for global
variables it would be impossible to do the syntax highlighting
so that is why I use it.
-
Integrated make, gdb,
grep, dired, info,
calendar and eshell etc. means
that programmers almost never need to leave
Emacs while doing useful work.
-
Dynamic Abbreviations (dabbrev). For
example: press z,
and then repeatedly
press Alt-/
to cycle through all words in memory that start with
‘‘z’’. This feature allows you
to use long variable names (which are more descriptive
than short variable names) without needing to type them
in every time you use them.
-
Automatic indentation, so there is no need to waste
time aligning code by hand.
-
Unlimited undo/redo.
-
Find matching brackets.
-
Re-definable keys to reduce the risk of developing
R.S.I.
(Repetitive
Strain Injury).
For example I have defined all of
the function keys
F1 -
F12
to achieve different
commonly-used operations, such as
F1
for help, F2 to
save all currently edited files,
F3 to save and purge all currently
edited files, F4 to delete all but one
window,
F5 to
activate cbrow my own C++ class
browser, F6 to toggle
the value of the
variable selective-display
for folding and unfolding of
buffers, F7 to toggle
read-only status, F8
to undo and F9 to
compile, F10 to go
from *.hts
files
to *.html
files,
Shift F10 to go from
*.html files back
to *.hts files F11
is bound by Ubuntu to toggle maximisation of the current frame,
Shift F11 is bound
to dmp-complete-file,
F12 is bound to eval-last-sexp,
Shift F12 is bound
to dmp-complete-lisp for Lisp
dynamic symbol abbreviations. I have also redefined the command
find-file from Control-x Control-f to the shorter
Control-f or Control-d because it is used so
much.
|