Jump to content


 

SciTE v 3.04 Beta available

For people willing to test.

148 replies to this topic

#141 69255

    Advanced Member

  • Full Members
  • PipPip
  • 131 posts
  • Gender:Not Telling

Posted 01 April 2012 - 10: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

    Doing my thing my way

  • Developers (Dev)
  • 19,956 posts
  • Gender:Not Telling

Posted 02 April 2012 - 07:42 PM

View Post69255, on 01 April 2012 - 10:54 PM, said:

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
SciTE4AutoIt3 Homepage
Installation instructions for SciTE4AutoIt3 and AutoIt3:Production and Beta.
---------------------------
Live for the present,
Dream of the future,
Learn from the past.

#143 69255

    Advanced Member

  • Full Members
  • PipPip
  • 131 posts
  • Gender:Not Telling

Posted 04 April 2012 - 08:44 PM

View PostJos, on 02 April 2012 - 07:42 PM, said:

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

    Keelah se'lai

  • Developers (Dev)
  • 18,139 posts
  • Gender:Male
  • Location:Silent Hill

Posted 04 April 2012 - 09: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.
"She wears a dress like a body bag every day"

I have a blog where I rant. Imagine that.

#145 69255

    Advanced Member

  • Full Members
  • PipPip
  • 131 posts
  • Gender:Not Telling

Posted 05 April 2012 - 03:12 AM

View PostValik, on 04 April 2012 - 09:05 PM, said:

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

View Postwraithdu, on 30 March 2012 - 03:10 PM, said:

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

    I am less fun than a twisted ankle.

  • AutoIt MVPs (MVP)
  • 1,945 posts
  • Gender:Male

Posted 05 April 2012 - 03: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

    Advanced Member

  • Full Members
  • PipPip
  • 131 posts
  • Gender:Not Telling

Posted 05 April 2012 - 03: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

    Bishop

  • Full Members
  • PipPipPipPipPipPipPip
  • 2,296 posts
  • Gender:Male
  • Location:Romania

Posted 01 May 2012 - 12:53 PM

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:

Quote

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

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

#149 Valik

    Keelah se'lai

  • Developers (Dev)
  • 18,139 posts
  • Gender:Male
  • Location:Silent Hill

Posted 01 May 2012 - 06: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.
"She wears a dress like a body bag every day"

I have a blog where I rant. Imagine that.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users