Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Sublime 4 Autohotkey [Updated 13/11]


  • Please log in to reply
74 replies to this topic
budRich
  • Members
  • 146 posts
  • Last active: Aug 03 2015 08:33 PM
  • Joined: 09 Aug 2011

Thanks for the update A v i. But I had problems with RunHelp() (the problem is not due to the update), but i made some small changes to it (last 5 lines) and it now works great.

RunHelp(){
	Tooltip
	BlockInput, Sendandmouse
	cjconst := Cjcontrol(0)
	
	oldclip := ClipboardAll
	Send, +{Home}^c{Right}
	copiedcode := Clipboard	
	Send, +{End}^c{Left}
	copiedcode2 := Clipboard
	if ( ( !Instr(copiedcode2, " ") ? Strlen(copiedcode2) : Instr(copiedcode2, " ") ) > ( !Instr(copiedcode2, "(") ? Strlen(copiedcode2) : Instr(copiedcode2, "(") ) )
		needles := "=|+|-|*|?|:|(|% |%	|\|/|,|!|<|>|.| "
	else
		needles := "%|=|."
	
	copiedcode := Ltrim( (temp_pos := SuperInstr(copiedcode, needles, 0, false, 0)) ? Substr(copiedcode, temp_pos+1) : copiedcode )
	copiedcode .= copiedcode2
	comand := RegExReplace(copiedcode, "([A-Z]*)(,|`t| |\()(.*)", $1)
	
	BlockInput, off
	Clipboard := oldclip
	
	if cjconst
		Cjcontrol(1)
	;;Running
	IfNotEqual, comand
	{
		if !WinExist("AutoHotkey Help")
			Run, Autohotkey.chm
		WinWait, AutoHotkey Help
		WinActivate, AutoHotkey Help
		WinWaitActive, AutoHotkey Help
		SendMessage, 0x1330, 1,, SysTabControl321
		SendMessage, 0x130C, 1,, SysTabControl321
		ControlGetFocus, dd, AutoHotkey Help
		StringLeft, dd, dd, 4
		if (dd != "Edit")
			SendInput, {F6}
		SendInput, {End}{Shift Down}{Home}{Shift Up}%comand%{enter}
	}
}


Carrozza
  • Members
  • 214 posts
  • Last active: Mar 02 2016 09:51 AM
  • Joined: 05 Jul 2009

Cool project, testing it out right now.

 

Are you still determined to stop the development when Sublime Text will be released?



A v i
  • Members
  • 1323 posts
  • Last active: Nov 14 2015 06:56 PM
  • Joined: 30 Jan 2013

Cool project, testing it out right now.
 
Are you still determined to stop the development when Sublime Text will be released?

Why will I stop development ? :S  Sublime Text was released years ago.  :O


Now a CS Undergrad. | My WebsiteAutohotkey Scripts | Softwares

Telegram me : @aviaryan


Carrozza
  • Members
  • 214 posts
  • Last active: Mar 02 2016 09:51 AM
  • Joined: 05 Jul 2009

I was referring to this post: http://www.autohotke...11/#entry580423 , anyway glad to hear that you'll continue working on this add-on because I find it really useful to work on AHK scripts.



A v i
  • Members
  • 1323 posts
  • Last active: Nov 14 2015 06:56 PM
  • Joined: 30 Jan 2013

I was referring to this post: http://www.autohotke...11/#entry580423 , anyway glad to hear that you'll continue working on this add-on because I find it really useful to work on AHK scripts.

Most of the world uses ST 2 and it is freely available at http://www.sublimetext.com/2 and so it's all right.


Now a CS Undergrad. | My WebsiteAutohotkey Scripts | Softwares

Telegram me : @aviaryan


Binocular222
  • Members
  • 99 posts
  • Last active: Jul 25 2014 04:28 AM
  • Joined: 26 Feb 2012

Hi, the auto-complete does not trigger when I start typing from the beginning of line. Auto-complete require at least a space before I can type words.

Any work around?



A v i
  • Members
  • 1323 posts
  • Last active: Nov 14 2015 06:56 PM
  • Joined: 30 Jan 2013

Hi, the auto-complete does not trigger when I start typing from the beginning of line. Auto-complete require at least a space before I can type words.
Any work around?

You mean when typing from the beginning of a line ? Why Not ? It does work . Yes it doesn't work (as it should) if you put your cursor after a pre-written word but that's a different thing. You are using ST 2 or 3 ?


Now a CS Undergrad. | My WebsiteAutohotkey Scripts | Softwares

Telegram me : @aviaryan


Binocular222
  • Members
  • 99 posts
  • Last active: Jul 25 2014 04:28 AM
  • Joined: 26 Feb 2012

I use ST3 Build 3056.

I placed cursor in the beginning of line, no pre-written word.



A v i
  • Members
  • 1323 posts
  • Last active: Nov 14 2015 06:56 PM
  • Joined: 30 Jan 2013

I use ST3 Build 3056.
I placed cursor in the beginning of line, no pre-written word.

I have ST3 3008 and it's fine here.

What about other languages ? Maybe they have changed something , I will try to see the latest version. 


Now a CS Undergrad. | My WebsiteAutohotkey Scripts | Softwares

Telegram me : @aviaryan


Binocular222
  • Members
  • 99 posts
  • Last active: Jul 25 2014 04:28 AM
  • Joined: 26 Feb 2012

Found it!

It's due the the setting:

"gutter": false,

Is this a bug? Then I should report to Jon



evilc
  • Members
  • 340 posts
  • Last active: Oct 27 2015 11:07 PM
  • Joined: 17 Nov 2005

Thanks for this! I did use Notepad++, but I am starting to move to Sublime.

 

Maybe it would be a good idea to add a little more info to your How to Install post?

 

It took me a while to work out how to install everything I needed.

 

Package Control can be installed from here.

 

After doing the Add Repository, you need to do another command palette:

Package Control: Install Package

Then select the AutoHotkey package.



A v i
  • Members
  • 1323 posts
  • Last active: Nov 14 2015 06:56 PM
  • Joined: 30 Jan 2013

Found it!
It's due the the setting:
"gutter": false,
Is this a bug? Then I should report to Jon

Did you report it ? 

 

 

Thanks for this! I did use Notepad++, but I am starting to move to Sublime.

 

Maybe it would be a good idea to add a little more info to your How to Install post?

 

It took me a while to work out how to install everything I needed.

 

Package Control can be installed from here.

 

After doing the Add Repository, you need to do another command palette:

Package Control: Install Package

Then select the AutoHotkey package.

The AutoHotkey package shown in command palette I believe is not mine.  My AutoHotkey repository is https://github.com/a...ryan/AutoHotkey and it is not included in the Package Control and so I recommend those steps. 


Now a CS Undergrad. | My WebsiteAutohotkey Scripts | Softwares

Telegram me : @aviaryan


evilc
  • Members
  • 340 posts
  • Last active: Oct 27 2015 11:07 PM
  • Joined: 17 Nov 2005

Ah, apologies for that.

So what is this about?

Installing and updating Package from Package Control.

  • In Command Palette type  
Package Control: Add Repository  
  • Enter. Then add the following to it.
https://github.com/avi-aryan/AutoHotkey
Now, the package will be available for Install in Package Control: Install Package
 
  
If you don't have Package control, you can download the zip and replace the package with the default Autohotkey Package if you have. 
 
Use  Package Control: Upgrade Package  to update package

 

I added that URL and I see no package. What is it meant to be called?

I am guessing I added the URL, and another AHK package was already present, so I assumed the repository add had added it.

 

It should maybe be made clear - I visited the top link in the first post (See how to install the package http://www.autohotke...ey/#entry592146) and followed the instructions.

 

Do I need to follow the Guide linked further down instead?



Binocular222
  • Members
  • 99 posts
  • Last active: Jul 25 2014 04:28 AM
  • Joined: 26 Feb 2012

I reported http://www.sublimete...59b8196d4e9b045

But seems to fall into oblivion as usual



vasili111
  • Members
  • 40 posts
  • Last active: Feb 14 2016 07:25 AM
  • Joined: 08 Apr 2013

A v i

 

May be it will be interesting for you. There is opensource analog for Sublime text editor https://github.com/limetext/lime . It is not yet ready for use but it is actively developed.