Jump to content

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Find out more here. X
X


Photo

SciTE v 3.20 Beta available

For people willing to test.

  • This topic is locked This topic is locked
150 replies to this topic

#141 69255

69255

    Adventurer

  • Active Members
  • PipPip
  • 131 posts

Posted 01 April 2012 - 09:54 PM

I would like to be able to toggle a bookmark (Ctrl + F2) by clicking the margin next to the line number.

Can this be done with the AutoIt package or do I need to request it be added to the original SciTE?







#142 Jos

Jos

    Je maintiendrai

  • Developers
  • 23,356 posts

Posted 02 April 2012 - 06:42 PM

I would like to be able to toggle a bookmark (Ctrl + F2) by clicking the margin next to the line number.

Can this be done with the AutoIt package or do I need to request it be added to the original SciTE?

I use the standard SciTE package released by Neil and are limiting the mods made, so this will feature have to come from there.

Jos

Visit the SciTE4AutoIt3 Download page for the latest versions                                                                 Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)


#143 69255

69255

    Adventurer

  • Active Members
  • PipPip
  • 131 posts

Posted 04 April 2012 - 07:44 PM

I use the standard SciTE package released by Neil and are limiting the mods made, so this will feature have to come from there.


Okay, I made a feature request but Neil rejected it because clicking in the margin is already used for selecting lines.

Given that SciTE can already detect margin clicks, could the bookmark toggling be added by a LUA script?

#144 Valik

Valik

    Former developer.

  • Active Members
  • PipPipPipPipPipPip
  • 18,879 posts

Posted 04 April 2012 - 08:05 PM

I don't see why a double click on the margin couldn't toggle a bookmark keeping the current behavior of a single click selecting the line. That is analogous to Visual Studio's breakpoint toggle behavior which visually looks similar to a bookmark (though obviously different functionally).

As for Lua, there is an OnMarginClick() event that might be useful to implement the functionality.

#145 69255

69255

    Adventurer

  • Active Members
  • PipPip
  • 131 posts

Posted 05 April 2012 - 02:12 AM

As for Lua, there is an OnMarginClick() event that might be useful to implement the functionality.

Thanks for the tip, Valik. After reading various documents, I have implemented similar functionality which I find to be quite satisfactory.

OnMarginClick() didn't work like I expected and caused too many problems, so I used OnDoubleClick(). Now when I double-click a line, a bookmark is toggled on/off for that line. I think this is just as good, if not better, than the margin clicking version found in Notepad++.

Here are the installation instructions for anyone that is interested. In anyone sees something I did wrong, please let me know.

Spoiler


Is there somewhere outside of the scite source that I can find the menucommand IDs?

I'm not sure this qualifies as "outside of the scite source" but the Menu IDs are defined in SciTE.h which can be viewed here.

http://scintilla.hg.sourceforge.net/hgweb/scintilla/scite/file/tip/src/SciTE.h

#146 wraithdu

wraithdu

    this noise inside my head

  • MVPs
  • 2,413 posts

Posted 05 April 2012 - 02:19 AM

Hmmm, I double click to select entire words all the time. Is there a way to detect if the double click happened in the margin?

#147 69255

69255

    Adventurer

  • Active Members
  • PipPip
  • 131 posts

Posted 05 April 2012 - 02:35 AM

Not that I could find. Simply replacing OnDoubleClick with OnMarginClick will toggle a bookmark when the margin is single-clicked. I encountered two problems with using OnMarginClick though.

First, folding points are in the margin, so toggling a fold will also toggle a bookmark at the same time.

The bigger problem was that I can't find any way to get the line number the margin was clicked at. The bookmark will always be toggled at the line where the caret is located. If the caret is at line 2 and you click the margin at line 5, the bookmark will be toggled at line 2.

#148 Andreik

Andreik

    Bishop

  • Active Members
  • PipPipPipPipPipPip
  • 2,592 posts

Posted 01 May 2012 - 11:53 AM

Can I add to SciTE some colors for specific words?

For example I added a new color for AutoIt Objects functions name but I want one more and for some reason doesn't work.
This is how it looks like au3.properties:
Spoiler


I tried to add new lines like below but without success:

# Others
keywords10.$(au3)=$(au3.keywords.others)
# Others
style.au3.17=fore:#FF8000,italics,bold

Any idea?
When the words fail... music speaks

#149 Valik

Valik

    Former developer.

  • Active Members
  • PipPipPipPipPipPip
  • 18,879 posts

Posted 01 May 2012 - 05:04 PM

You don't just add new keywords and the lexer magically knows what to do. If Jos has not written support for 9 different sets of keywords then you are confined to 8 sets.

#150 Jos

Jos

    Je maintiendrai

  • Developers
  • 23,356 posts

Posted 09 June 2012 - 07:37 PM

Updated SciTE beta to v3.20 released recently.
See first post.

Edited by Jos, 09 June 2012 - 08:34 PM.

  • jaberwacky likes this

Visit the SciTE4AutoIt3 Download page for the latest versions                                                                 Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)


#151 jaberwacky

jaberwacky

    RegExp("\m/")

  • Active Members
  • PipPipPipPipPipPip
  • 3,207 posts

Posted 09 June 2012 - 11:02 PM

Thanks Jos. Works fine. Havn't seen you around much.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users