foo.c0
in emacs, simply type
emacs foo.c0
in the shell.
C-x C-c
. If you have made any changes to the
file, you will be prompted to choose one of many options. The only ones that usually concern you, will
be 'y' for yes (to save your changes) and 'n' for no (to discard your changes).
C-x C-s
.
M-f
M-b
C-n
C-p
C-a
C-e
M-g g num
C-v
M-v
C-s
and type in the string you
want to search for. This highlights all the occurences of the
string in the document. To move forwards through the
matches, use C-s
and to move backwards,
use C-r
.
M-%
. When prompted,
type the string to replace and hit enter. Then type the string that replaces
it and hit enter. Then press space to replace a match and the delete key to ignore it.
C-space
and move your cursor
to the end of the text. Then use the appropriate command below.
C-w
M-w
C-y
to paste.
C-_
C-g
M-=
to count
the lines and characters in the region.
C-a C-space C-e M-=
to get the number of characters in the line.
This works by going to the beginning of the line, selecting the region till the end of the line
and then running the command to count the number of characters in that line. I do this when
I feel a line is growing too long, as it is good style to keep the line length limited to
80 characters.