Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Macro: center (vert.) current line on screen

Help
Dani CS
2006-10-25
2013-05-02
  • Dani CS
    Dani CS
    2006-10-25

    I'm trying to write a macro to center the current line in the window, but am too new to the macro language.

    I'd need to set programmatically the number of repetitions for the dnslide command (which I already calculate as line-top+height/2). I don't have a clue how to accomplish this.

    Btw, the -mid option in .joerc does exactly the opposite of what I need. I'd like to have the cursor centered on screen when doing big jumps (i.e. pgdown, pgup, search, ...) but not when I'm just scrolling just one line up.

    Any help appreciated!