[vox-tech] missing vim

Jonathan McPherson vox-tech@lists.lugod.org
Tue, 13 May 2003 15:29:11 -0700


Hello,

> I need to spend more time with the manual myself.  If you are looking
> for a basic tutorial enter:
> 
>         C-h t

Already been through that, but thanks. (-:

> Not sure, but both C-<uparrow> and C-<downarrow> jump mode-specific
> paragraphs.  That may be what you are looking for.

Note quite. Suppose my cursor is in the "l" in "looking" in the above
sentence, and I want to move it to the "d" in "downarrow". If they are
two physical lines, that is easy, but if it's just one long line that's
been wrapped, how do I move up by virtual/screen lines instead of
physical lines?

In vim, I could type gk to do the above.

> M-g doesn't work on my system.  I believe it works with your system
> because because you remapped the key combo.  I use C-c g <linenumber>
> <enter>.  To get this to work I put this in my .emacs:

I don't have any problems going to specific lines; seeing line numbers
on each line is just an interface tweak I'd like to be able to make.

> I also like to know which column number I am in:
> 
>         (column-number-mode t)

Didn't know that one! It's handy. Thanks.

> The closest things which I actually use are:
> 
>      M-< move to top of buffer
>      M-> move to bottom of buffer
>      C-l center buffer around point

H/M/L basically saves time when I see text I want to edit at the top or
bottom of the screen but my cursor is many lines away. 

> > > (7) Folding -- automatically collapse sections of the code based on some
> > >     criteria. In vim: set fdm=indent
> 
> I am not sure what you mean.  Do you have a short example?

Sure. 

def printstuff():
	print "some stuff"
	print "some other stuff"

becomes

def printstuff():
----(2 lines)--------------

so the function is essentially collapsed until I inspect it. If your
source code contains a lot of functions, folding lets you see an
overview of the structure of the file without seeing the contents 
of each function.

When you expand a function, you see an overview of its logic without
having to see all the nested stuff, etc. Very nice. Load a reasonably
large C/C++ source code file in vim, type ":set fdm=indent" and play
with it. (-:

One other question, and I can't believe I forgot this one.

Are there emacs commands for moving forward or backwards to a specific
character? I use f/F and t/T (and ;) all the time in vim and it saves me
from spending a lot of time holding down arrow keys.

Jonathan.