How to Jump to Middle of Screen - Macro Help Needed

How to Jump to Middle of Screen - Macro Help Needed

13
Basic UserBasic User
13

    May 25, 2005#1

    I want to be able to move my cursor to the middle of the screen. I use UE 10.20d+ and it has the ability jump to the top and bottom of the screen but not the middle. I created the following macro:

    Code: Select all

    InsertMode
    ColumnModeOff
    HexOff
    UnixReOff
    SelectToTop
    Key DOWN ARROW
    {previous line repeated 24 more times}
    but quickly found it would take me to the top of my file, not screen, and then drop me back down. My screen is 50 lines high, btw.

    For all of UE's awesome features, it's macros language seems pretty limited to me. It may just be that I am missing something.

    1) Is there a way to jump to the middle of the screen?
    2) Or is there a scripting language that I can use instead of the macros?
    3) Does v11 have better macro / scripting capabilities?

    Thanks for you help!

    -Adam R.

      May 25, 2005#2

      One alternative method that might work is to find the current line you are on and then perform an addition or subtraction as needed and then perform the goto line command. Not even sure if that is possible either though.

      6,686585
      Grand MasterGrand Master
      6,686585

        May 27, 2005#3

        In the Key Mapping configuration dialog near the end of the list is the function MoveLineToCenterofView. This function positions the current line and the cursor to the middle of the window. Assign a hotkey for it and I think, you will be happy.
        Best regards from an UC/UE/UES for Windows user from Austria

        13
        Basic UserBasic User
        13

          May 27, 2005#4

          I have one for that actually. That's not quite what I want to do. I don't want to move the current line to the middle of the screen. I want the cursor to jump to what ever line is the middle line. My screen is 50 lines high so it would jump to the top line number on the screen +25 lines. Currently under the key mappings is a CursorToTopOfWindow and CursorToBottomOfWindow. I'd like to create a "CursorToCenterOfWindow". Thanks. :)

          6,686585
          Grand MasterGrand Master
          6,686585

            May 27, 2005#5

            Sorry, but I think, there is no possibility at the moment to create a "CursorToCenterOfWindow" function. The macro commands all work with file base and not window base and there is function to get the actual window line number. You have to write a feature request to IDM for it.
            Best regards from an UC/UE/UES for Windows user from Austria

            13
            Basic UserBasic User
            13

              May 27, 2005#6

              Yeah I was afraid of that... the feature I'd like to write them for is a good scripting system that makes UE very extensible. Most good editors come with something that is at least fairly flexible. UE is the best traditional windows style text editor I've found and all it has is a handful of basic macros commands. Must not be much of a demand for something better. Kinda surprising actually.

              1
              NewbieNewbie
              1

                May 29, 2005#7

                Yeah I was afraid of that... the feature I'd like to write them for is a good scripting system that makes UE very extensible. Most good editors come with something that is at least fairly flexible. UE is the best traditional windows style text editor I've found and all it has is a handful of basic macros commands. Must not be much of a demand for something better. Kinda surprising actually.
                I agree that it would be nice if it were more flexible. I've been using Ultraedit off and on since 2000. I love it, but the thing which prevents me from using it more is that I can't configure the keys to work like my usual editor, Emacs. I've been using Emacs for so long that the keystrokes are second-nature, and using anything else slows me down quite a bit. Switching from Emacs to Ultraedit would be a consideration if I did most of my editing on a Windows box (I don't).

                I'm not looking for Ultraedit to do everything Emacs does, but a scripting language with some awareness of the windowing system so I can write the macros I want, and a way to assign multi-key sequences to operations would be great.

                13
                Basic UserBasic User
                13

                  May 29, 2005#8

                  Yeah I'm in a similar boat. I am a big Vim fan and I can duplicate enough to get me by but I keep bumping into things I'd like to change. My company has standardized on UE so I don't really have a choice. Over all I love it for what it is but it sure would be nice if it were a whole lot more script able and extensible.