Home Download Buy Blog Forum Support

Andy Edits

Re: Andy Edits

Postby singw on Sat Oct 13, 2012 2:27 am

agibsonsw wrote:
singw wrote:Will this be put on Package Control's repository?


Hello. Yes, I have requested this. Andy.


thx. :D
singw
 
Posts: 59
Joined: Fri Aug 05, 2011 2:16 pm

Re: Andy Edits

Postby singw on Sat Oct 13, 2012 2:29 am

Can the gutter icon just use yellow and green dot?
singw
 
Posts: 59
Joined: Fri Aug 05, 2011 2:16 pm

Re: Andy Edits

Postby agibsonsw on Sat Oct 13, 2012 3:40 am

singw wrote:Can the gutter icon just use yellow and green dot?

Do you not like my pencil? ;)

Just for the moment you could comment out the following two lines in AndyEdits.py and add the third line:

Code: Select all
#ICON = path.pardir + '/AndyEdits/icon' if \
#    sublime.load_settings(PACKAGE_SETTINGS).get("use_icon", True) else ""
ICON = "dot"

[Valid icon names are dot, circle, bookmark and cross.]

Open AndyEdits.sublime-settings and change these two lines:

Code: Select all
    "icon_scope": "class",
    "icon_current": "comment"

Change "class" and/or "comment" to different scope names, such as keyword, string, variable, etc. until you get the colours you like. (The colours are determined by your theme, so it requires a little experimenting.) You should probably close and re-open ST each time, after making these changes.

I shall add another setting to make it easier to do this in the future. Andy.
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
agibsonsw
 
Posts: 901
Joined: Fri Jan 27, 2012 9:11 pm

Re: Andy Edits

Postby agibsonsw on Sat Oct 13, 2012 2:31 pm

Using a "dot" can now be achieved from the settings alone:

Code: Select all
"use_icon" : true,
"ST_icon" : "dot"

[On my computer it doesn't like "circle" for some reason :? ]

Code: Select all
"use_icon" : true,
"ST_icon" : false
// will continue to use my pencil.


N.B. Due to the ST-API behaviour I have to state that the listing of edit-regions cannot be guaranteed 100% accurate following multiple Undo and Redo commands. Use the Create and Delete edit-region commands to correct any minor discrepancy.
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
agibsonsw
 
Posts: 901
Joined: Fri Jan 27, 2012 9:11 pm

Re: Andy Edits

Postby agibsonsw on Sun Oct 14, 2012 1:00 am

The latest (and hopefully last!) update handles automatic-insertions better. That is, automatically inserted brackets and quotes will often be included in the edit region.

It achieves this because, if you are starting a new-line or adding content to the end of an existing line, the edit-region will always extend to the end of this line. Automatic insertions will not, however, be accounted for if you begin editing in the middle of an existing line.

edits9.png
edits9.png (15.51 KiB) Viewed 2017 times


Multiple-line snippets are not treated as a single edit region, although the fields that you Tab to and complete will be. Use the Create command if you wish the snippet to be treated as a single edit-region. Andy.
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
agibsonsw
 
Posts: 901
Joined: Fri Jan 27, 2012 9:11 pm

Re: Andy Edits

Postby singw on Mon Oct 15, 2012 2:49 am

agibsonsw wrote:
singw wrote:Can the gutter icon just use yellow and green dot?

Do you not like my pencil? ;)

Just for the moment you could comment out the following two lines in AndyEdits.py and add the third line:

Code: Select all
#ICON = path.pardir + '/AndyEdits/icon' if \
#    sublime.load_settings(PACKAGE_SETTINGS).get("use_icon", True) else ""
ICON = "dot"

[Valid icon names are dot, circle, bookmark and cross.]

Open AndyEdits.sublime-settings and change these two lines:

Code: Select all
    "icon_scope": "class",
    "icon_current": "comment"

Change "class" and/or "comment" to different scope names, such as keyword, string, variable, etc. until you get the colours you like. (The colours are determined by your theme, so it requires a little experimenting.) You should probably close and re-open ST each time, after making these changes.

I shall add another setting to make it easier to do this in the future. Andy.

The pencil is too distractive for me. Thank you very much!
singw
 
Posts: 59
Joined: Fri Aug 05, 2011 2:16 pm

Re: Andy Edits

Postby agibsonsw on Tue Oct 16, 2012 12:58 pm

I've removed my request to place this on PackageControl pro-tem. I don't think there is anything wrong with my code; I'm having rendering issues in ST which I think are related to my running an incorrect Ruby build-file. But until I'm certain I shouldn't add it to PackageControl.

It would help if anyone using this could report any issues, or confirm that it is working fine? Andy.
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
agibsonsw
 
Posts: 901
Joined: Fri Jan 27, 2012 9:11 pm

Re: Andy Edits

Postby agibsonsw on Tue Oct 16, 2012 7:47 pm

Apparently this issue has been encountered before when using add_regions(), and remains an unsolved issue with the ST-API - related to colour-themes.

It can be fixed though (apparently) by changing your theme to another (standard) theme, closing and re-starting ST. (If you are already using a standard theme then the issue may not arise.) I presume I can switch back to my custom theme once I've restarted ST.

At least it's nothing to do with my code :). I shall continue to keep an eye on this behaviour. Andy.
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
agibsonsw
 
Posts: 901
Joined: Fri Jan 27, 2012 9:11 pm

Re: Andy Edits

Postby freewizard on Tue Oct 23, 2012 10:51 am

would be nice if you could add these to command list (just tooo many key combo to remember :B)
using Sublime Text 3 dev in OS X 10.8
my ST packages: https://github.com/freewizard
freewizard
 
Posts: 36
Joined: Wed Feb 09, 2011 4:14 am

Re: Andy Edits

Postby agibsonsw on Tue Oct 23, 2012 11:17 am

freewizard wrote:would be nice if you could add these to command list (just tooo many key combo to remember :B)


It is available via PackageControl now and includes context-menu (right-click) entries.

Just a reminder that in Windows there may be a rendering issue (with the scrollbar and ruler). This is due to ST behaviour :oops: , not my code 8-) !
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
agibsonsw
 
Posts: 901
Joined: Fri Jan 27, 2012 9:11 pm

PreviousNext

Return to Plugin Announcements

Who is online

Users browsing this forum: No registered users and 6 guests