Jump to content

SciTE v 3.20 Beta available


Jos
 Share

Recommended Posts

  • Developers

I wrote exactly what you want a while back... got no comments on it surprisingly. Hopefully it suits your purpose:

Nice feature and will be in the next release.

Thanks :)

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Hello! it's me again, with new suggestions! Hope you guys like them!

- Add to the context menu of a script (right click on the code): "Open Containing Folder" => open in explorer the folder containing the current script.

- Make the "Add Strem Comment" command adds the #cs and #ce as: lowercase, and in the line before, and the line after the selected area

- Add a command to convert spaces to tabs, and vice vers ca

- Just like the standard function that have calltips, it will be nice to add this feature for the current script functions: a kind of "on-the-fly function calltips", that will contain only the definition of the function, with it's parameters. Because when using a function of our script, it's not handy to be forced to search it's definition, to see it's parameters all the time!

- Last: i really don't like the context menu of a tab, it don't need to contain the entire Tools menu!

Thanks for reading me!

Link to comment
Share on other sites

  • Developers

Hi. Earlier I hacked around with some lua (neat-o!) and I came up with some extra options for styling the calltip window. This isn't something that no one else could have done.

Add these to your SciTEUser.Properties

## CallTips
# Display the calltip above the function
calltips.set.above=1
# Set the fore and back color of the calltip window
style.au3.38=fore:#DADADA,back:#15191E
# Set the highlight color of the function argument
calltips.color.highlight=#5C81B3

Add this to your lua file. (Look to wraithdu's post here: )

myCallTips = EventClass:new(Common)

function myCallTips:OnOpen(path)
    myCallTips:set_above()
    myCallTips:set_highlight_color()
    return true
end

--------------------------------------------------------------------------------
-- set_above()
-- Displays the calltip above the function.
--------------------------------------------------------------------------------
function myCallTips:set_above()
    local calltips_set_above = tonumber(props["calltips.set.above"])

    if ((calltips_set_above ~= 1) and (calltips_set_above ~= 0)) then
        calltips_set_above = 1
    end

    scite.SendEditor(SCI_CALLTIPSETPOSITION, calltips_set_above)
end

--------------------------------------------------------------------------------
-- set_highlight_color()
-- Set the color of the highlighted calltip property
--------------------------------------------------------------------------------
function myCallTips:set_highlight_color()
    local calltips_color_highlight = props["calltips.color.highlight"]

    if (calltips_color_highlight == '') then
        calltips_color_highlight = "#FF0000" -- dark blue default
    end

    calltips_color_highlight = myCallTips:BGR2Decimal(calltips_color_highlight)

    if (calltips_color_highlight == "Error") then
        return true
    end

    scite.SendEditor(SCI_CALLTIPSETFOREHLT, calltips_color_highlight)
end

--------------------------------------------------------------------------------
-- BGR2Decimal()
-- convert BGR to decimal, duh! (albeit in a hack and stab manner)
--------------------------------------------------------------------------------
function myCallTips:BGR2Decimal(BGR)
    if (BGR.len(BGR) ~= 7) then
        return "error"
    end

    BGR = BGR:gsub('#', '') -- remove hash
    BGR = BGR.reverse(BGR)
    BGR = "0x"..BGR

    return tonumber(BGR)
end

Don't think the calltips.set.above=0 will work as this is a bool and needs to be True or False.

What about doing it this way?:

function myCallTips:set_above()
    local calltips_set_above = tonumber(props["calltips.set.above"])

    if (calltips_set_above == 1) then
        scite.SendEditor(SCI_CALLTIPSETPOSITION, true)
    else
        scite.SendEditor(SCI_CALLTIPSETPOSITION, false)
    end
end
Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Developers

Hello! it's me again, with new suggestions! Hope you guys like them!

- Add to the context menu of a script (right click on the code): "Open Containing Folder" => open in explorer the folder containing the current script.

Ihave this on my own setup, just add this to your SciTEuser,properties and press Ctrl+E:

#x 40 Open Explorer in scriptdir $(FilePath)
command.40.*=Explorer.exe /e,/select,"$(FilePath)"
command.name.40.*=Open Explorer in Sourcedir
command.shortcut.40.*=Ctrl+E
command.subsystem.40.*=2
command.save.before.40.*=2
command.replace.selection.40.*=0
command.quiet.40.*=1

- Make the "Add Strem Comment" command adds the #cs and #ce as: lowercase, and in the line before, and the line after the selected area

Already available:Select range and hit Ctrl+Shift+Q

Hello! it's me again, with new suggestions! Hope you guys like them!

- Add a command to convert spaces to tabs, and vice vers ca

Already available: SciTE Options/Change Indentation Settings

- Just like the standard function that have calltips, it will be nice to add this feature for the current script functions: a kind of "on-the-fly function calltips", that will contain only the definition of the function, with it's parameters. Because when using a function of our script, it's not handy to be forced to search it's definition, to see it's parameters all the time!

You can define your own Calltips (See helpfile for explanation) but other than that don't see how we can easily do this.

- Last: i really don't like the context menu of a tab, it don't need to contain the entire Tools menu!

This is what comes with the Standard release of SciTE distributed by Neil which is what we use as a base source.

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Moderators

Jos,

How easy would it be to introduce separate files for user abbreviations in the same way you already have for user UDFs? Is it a simple matter of having separate files and adding some new "import properties" lines to au3.properties or would it entail a lot more? :)

I ask because having separate files makes "user UDF" management easy whereas the combined files render "user abbreviation" management a bit more tricky. ;)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

  • Developers

Jos,

How easy would it be to introduce separate files for user abbreviations in the same way you already have for user UDFs? Is it a simple matter of having separate files and adding some new "import properties" lines to au3.properties or would it entail a lot more? :)

I ask because having separate files makes "user UDF" management easy whereas the combined files render "user abbreviation" management a bit more tricky. ;)

M23

That should work fine as I have already separated the standard Scite4Autot3 Abbreviation into au3abbrev.properties and added this to abbrev.properties:

import au3abbrev

We could add a line for the user abbrev's to the abbrev.properties

import au3abbrev
import au3UserAbbrev
Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Are you sure this worked before? I just tried it in SciTE 2.28 released in the latest installer and the mouse doesn't mirror and bookmarks clicks don't do anything.

Researching this in Google only gave me a hit for Notepad++ till now.

Was this working for you in the 2.28 version included in the latest installer?

I could be very red faced now... I'll have to double check an old version of scite to be sure, but I use both editors so it's ENTIRELY possible I'm getting some features confused between the two. Doh. Edited by wraithdu
Link to comment
Share on other sites

You can define your own Calltips (See helpfile for explanation) but other than that don't see how we can easily do this.

What, you don't have that? I do, noob. I've actually had it for years. It's part of something I was working on that I never finished. Maybe one day.

Edit: Oh, forgot to comment on the inline error thing. Yes, I expected it would involve spawning a new instance to sit around waiting for the parent to close. It's not all that elegant a solution but it works.

Edited by Valik
Link to comment
Share on other sites

Thanks for answering me Jos!

Open Folder - Thanks for the trick, i'll add it!

Block Comment - I Know that it's available, but for example: When i select code like this:

some code


[color=#ff0000]some code
some code[/color]

some code

Scite make this

some code


#CSsomecode
somecode#CS

somecode

This is why i made befor & after bold! Because i think it should be something like this

some code
#cs
some code
some code
#ce
some code

Indentation - OK

Tab Menu - So it's impossible to remove it???

Thanks!

Link to comment
Share on other sites

  • Developers

I wrote exactly what you want a while back... got no comments on it surprisingly. Hopefully it suits your purpose:

Isn't this the same as Valik already indicated here?:

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

I think "highly annoying" is a bit of a stretch. I'm okay with how it works myself. It works the same as it does in Visual Assist X for Visual Studio which I'm used to.

Edited by Valik
Missing word
Link to comment
Share on other sites

I guess it's a personal preferences then, but I hate the fact it highlights EVERY word I click on every time I move the mouse. I much prefer the Notepad++ (and my function) behavior.

But the point back to Jos is yes, it is different behavior.

Link to comment
Share on other sites

  • Developers

Ahh.. you don't like to auto select word feature that kicks in after a second.

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Developers

What, you don't have that? I do, noob.

Noob... yeap ... thats me.

Guess you never shared that code with me and only wanted to keep it for yourself.

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

I guess it's a personal preferences then, but I hate the fact it highlights EVERY word I click on every time I move the mouse. I much prefer the Notepad++ (and my function) behavior.

But the point back to Jos is yes, it is different behavior.

wraithdu wrote that allows you to toggle the highlighting on and off, although it doesn't allow you to only highlight it when the text is selected, it does allow you to only highlight it when you want to.

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Link to comment
Share on other sites

I am NOT having a good month lately.

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...