Thanks for the tips, Ralph. I definitely learned the 6, but put 'em on a
card with searching. Here's my motion card, including the scrolling
commands, mark movement and a couple odd balls, to see how my mind works
:) :
On another note, I was reminded in an offline discussion that QED was
the predecessor to ed - my history of tech always seems to glitch at the
genesis of Unix. Of course the Unix pioneers didn't say "Let there be
Unix and so mote it be" even though it may seems so to some of us. A lot
of intellectual blood, sweat, and tears went into what came before and
Ken Thompson definitely stood on the shoulders of Lampson, Deutsch,
Kleene and others to create his masterpiece.
Ritchie's partial history of QED
Hi Will,
But, I think I'll stick with nvi a while
until I really nail it down.
Something I used to do was to look at each key on the keyboard and think
what it would do, e.g. d, D, and ^D. Most do at least one thing.
Leftward motions - [[, {, (, 0, ^|_, B, b, h|^H
Rightward Movement - l|SP, e, E, w, W, $, ), }, ]]
You're missing these handy six: f F t T ; ,
Upward motions - 1G, ^B, H, ^U, -, k | ^P
Downward motions - G, ^F, L, ^D, ^M | +, j | ^J | ^N
There's also keeping the cursor on the same line but moving the window
over the text: z ^E ^Y
Off to figure out tags
Understand the format of the tags file first; built by ctags(1).
^] on a word looks it up and goes there.
Where you were is pushed on to the ‘tagstack’.
When you wish to exit that rabbit hole, ^T pops the top of the stack and
goes there which returns you to where you pressed ^].
$ func='foo bar xyzzy'
$ printf "%s: $func"'\n' $func >src
$ cat src
foo: foo bar xyzzy
bar: foo bar xyzzy
xyzzy: foo bar xyzzy
$ grep -n '[^:]*' src | awk -F: '{print $2 "\tsrc\t"
$1}' >tags
$ sed -n l tags
foo\tsrc\t1$
bar\tsrc\t2$
xyzzy\tsrc\t3$
$
vi src, move to a word, ^] and it will move you to the ‘definition’
line. Imagine each line is a function definition with calls to other
functions. You're wandering down and up a ‘call tree’, following
possible execution paths.