Help transitioning from CodeWright

Get help with the installation and running of the Zeus IDE. Please do not post bug reports or feature requests here. When in doubt post your question here.
Post Reply
aphor
Posts: 21
Joined: Mon Dec 16, 2013 6:01 am

Help transitioning from CodeWright

Post by aphor »

I'm looking to move to Zeus from my venerable CodeWright 5.0b install. I've gotten it configured mostly the way I want, but there are a few things that I haven't managed to get working in a way that matches...

(1) Can I do prompted slide-in/slide-out of text? In CW, these are bound to CTL+Shift+> and Ctl+Shift+<. For those unfamiliar with the commands, prompted slide-in prefixes all selected text (full lines or CUA box selections) with a given string. Prompted slide-out is the reverse, removing a common prefix from a selection.

(2) How do I bind Ctl+Shift+Home to select everything in the file from current cursor position to beginning of file? Similarly, Ctl+Shift+End should select from the current cursor position to the end of the file. (I'm use to most Windows applications supporting this. Maybe I broke it accidently when trying out options? I don't see it under key bindings, though, which is where I think I'd find it.)

(3) Is there an option to remove the clock from the status bar?

(4) I know this is unlikely, but is there a way to get the input prompt on the status bar instead of having it pop-up a dialog box? ("Document"->"Environment"->"System"->"Use command line prompt" in CW). I'd be really happy if this existed even for just Search/Replace... having a dialog cover the code I'm editing is a bit of a distraction when what is being found/replaced is hidden by it.

My apologies if these options exist somewhere easy and I just missed them... there are a lot of options to look through. :D

TIA for any help.
jussij
Site Admin
Posts: 2650
Joined: Fri Aug 13, 2004 5:10 pm

Post by jussij »

(1) Can I do prompted slide-in/slide-out of text?
You would need to write a macro for this. As an starting point I would take a look at the zScript\numbers.lua macro.

That macro will insert an incrementing number for all the lines of the marked area.

Another example might be the add/remove comments macro found on the Macros menu.

That is found in the zScript\comment_toggle.lua file.

You can also view the macro code using the mouse right click on the Macros panel.
In CW, these are bound to CTL+Shift+> and Ctl+Shift+<.
You can bind those macros to those keys.
(2) How do I bind Ctl+Shift+Home to select everything in the file from current cursor position to beginning of file?
There are at least two ways to do this.

I use the BriefEx keyboard mapping so what I describe below is based on that key mapping.

If I start recording a macro using the Macros menu and type in the Alt+M, Home, Home, Home keys and then stop the macro recording I get this macro:

Code: Select all

function key_macro()
    screen_update_disable()
    MarkBlockToggle()
    MoveDocumentStartEx()
    MoveDocumentStartEx()
    MoveDocumentStartEx()
    screen_update_enable()
    screen_update()
end

key_macro() -- run the macro
I can save that macro to the move_home.lua file in the zScript folder and then bind that macro to the keyboard.

This approach shows how to turn a set of key strokes into one new effective key stroke using a macro.

Similarly I could used my knowledge of the keyboard functions and just written the following macro which will do the same thing:

Code: Select all

function key_macro()
    screen_update_disable()
    MarkBlockToggle()
    MoveDocumentStart()
    screen_update_enable()
    screen_update()
end

key_macro() -- run the macro
Similarly, Ctl+Shift+End should select from the current cursor position to the end of the file.
This macro will do the trick:

Code: Select all

function key_macro()
    screen_update_disable()
    MarkBlockToggle()
    MoveDocumentEnd()
    screen_update_enable()
    screen_update()
end

key_macro() -- run the macro
Note: You can bind macros to the keyboard using the Options, Editor Options menu Keyboard section.
(3) Is there an option to remove the clock from the status bar?
No :(
(4) I know this is unlikely, but is there a way to get the input prompt on the status bar instead of having it pop-up a dialog box? ("Document"->"Environment"->"System"->"Use command line prompt" in CW).
There is no such option in Zeus :(
I'd be really happy if this existed even for just Search/Replace... having a dialog cover the code I'm editing is a bit of a distraction when what is being found/replaced is hidden by it.
For normal search and replace this is not possible.

But the Search/Replace dialog does revert to the status bar when used in a macro so once again writing a macro and binding it to a key might provide something like this option.

You can see this behaviour in action by once again recording a macro and recording a serach and replace via the dialog and then replaying than macro.
My apologies if these options exist somewhere easy and I just missed them... there are a lot of options to look through.
No apologies required and as you correctly point out yest there are lots of ways to tweak Zeus.

Feel free to ask as many questions as you like.

Cheers Jussi
aphor
Posts: 21
Joined: Mon Dec 16, 2013 6:01 am

Post by aphor »

Wonderful, thank you.

It'll be a day or two before I have time to fully digest this and try it out, but I believe that covers everything. Many of my other questions had already been answered by browsing the old forum entries. Thanks for the quick reply. I'm definitely liking Zeus and am happy to have found a replacement that is not only still under development but which has such excellenet support.
jussij
Site Admin
Posts: 2650
Joined: Fri Aug 13, 2004 5:10 pm

Post by jussij »

(4) I know this is unlikely, but is there a way to get the input prompt on the status bar instead of having it pop-up a dialog box.
I had a quick go at writing a search and replace macro that could take input from the status bar and the macro found at the link below does something like this:

http://www.zeusedit.com/zforum/viewtopic.php?t=7059

Cheers Jussi
aphor
Posts: 21
Joined: Mon Dec 16, 2013 6:01 am

Post by aphor »

I had a quick go at writing a search and replace macro that could take input from the status bar and the macro found at the link below does something like this:
Very nice, thanks!

I'm officially on vacation for the next week and plan to spend some time working on the slide-in/out commands. The selection macros you provided are working like a charm (though the 3 calls to MoveDocumentStartEx threw me until I saw that it was Brief-aware).
aphor
Posts: 21
Joined: Mon Dec 16, 2013 6:01 am

Post by aphor »

In case any other CW users read this thread, I've posted the prompted slide-in/out scripts under the scripts topic.

http://www.zeusedit.com/zforum/viewtopic.php?p=11000
jussij
Site Admin
Posts: 2650
Joined: Fri Aug 13, 2004 5:10 pm

Post by jussij »

Thanks for posting the slide in/out macro.

I also like the detab macro that you posted. It works great :)

I like the smart but simple way you've found to handle the variable width white space characteristics of tabs ;)

Cheers Jussi
aphor
Posts: 21
Joined: Mon Dec 16, 2013 6:01 am

Post by aphor »

I like the smart but simple way you've found to handle the variable width white space characteristics of tabs
Thanks. I'm a lazy programmer - the simpler I can do something, the better. :D
Post Reply