A couple of questions about Zeus features

Get help with the installation and running of the Zeus editor. Please do not post bug reports or feature requests here. When in doubt post your question here.
Solace

A couple of questions about Zeus features

Postby Solace » Fri Nov 20, 2009 12:50 pm

Q1: How to enable word wrap? This means, when a string is longer then a zeus's window height, editor automatically cuts the string and places it on another string. This Q is about only reading and viewing, without source modification (instead of Q2 is about).

Q2: How to disable world wrap in Zeus? (This Q concerning editing functions, instead of viewing) I hate, when Zeus cuts my typed string and move it on another string. I only want, that editor just VIEW the wrap, but don't actually modifying typed text by wrapping.
In other words, i hate how the word wrapping work in Zeus, and i want to know, how to switch it to works like in others editors

Q3: Can i make fast searching like in *nix editors? (Nedit for example) I mean, when i mark the text and push F3(find next), i'll search the marked text instead of previous search. The same Q with marked text, about copying, replacement and other tips - Is any way to enable fast copying, fast replacement etc.?

Big Tnx!

jussij
Site Admin
Posts: 2238
Joined: Fri Aug 13, 2004 5:10 pm

Postby jussij » Sat Nov 21, 2009 2:56 am

Q1: How to enable word wrap? ....This Q is about only reading and viewing, without source modification (instead of Q2 is about).

Unfortunately Zeus does not have a view word wrap feature :(

Q2: How to disable world wrap in Zeus?

Use the Options, Properties menu to bring up the document type details and in the General section turn off the Line Wrap option.

I only want, that editor just VIEW the wrap, but don't actually modifying typed text by wrapping.

As I said before, there is no view wrap option in Zeus :(

Q3: Can i make fast searching like in *nix editors? (Nedit for example) I mean, when i mark the text and push F3(find next), i'll search the marked text instead of previous search.

Save the following text to the find_text.lua file in the Zeus zScript folder:

Code: Select all

function key_macro()
  -- macro only works for documents
  local document = is_document()

  if document == 0 then
    message("This macro only works for document files!")
    beep()
    return
  end

  -- NOTE: get the current word or marked area
  local text = macro_tag("$WEX")

  if string.len(text) == 0 then
    message("The cursor is not over a word!")
    beep()
    return
  end

  -- set the search text
  set_find_text(text)

  -- run the find for this text
  SearchNext()
end

key_macro() -- run the macro


Then bind this macro to the F3 key.

Code: Select all

The same Q with marked text, about copying, replacement and other tips - Is any way to enable fast copying, fast replacement etc.?

Zeus is fully scriptable so in general there are lots of ways you can change the way it works.

There are plenty of macro examples on this forum and in particular here: http://www.zeusedit.com/forum/viewforum.php?f=10

There are also more scripting examples found in the Zeus zScript folder.

Cheers Jussi

Solace

Postby Solace » Mon Nov 23, 2009 6:49 am

Tnx, jussij!

jussij
Site Admin
Posts: 2238
Joined: Fri Aug 13, 2004 5:10 pm

Postby jussij » Fri Jun 04, 2010 12:35 am

Q3: Can i make fast searching like in *nix editors?

It turns out there is no need to even create a macro because the SearchWordCurrentNext and SearchWordCurrentPrevious keyboard functions provide do exactly this ;)

Cheers Jussi


Return to “General”

Who is online

Users browsing this forum: No registered users and 2 guests

cron