Jump to content

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

Sublime Text Editor - Very nice


  • Please log in to reply
72 replies to this topic
StepO
  • Members
  • 195 posts
  • Last active: Mar 06 2014 05:02 PM
  • Joined: 05 Sep 2011

Btw i attached my Autohotkey package, it has many stuff, including auto-complete for AHK (but only for BASIC commands)


I'm trying to get the autocomplete to show ahk commands. I'm using your package and highlighting is working correctly, but the completion only offers variables I have already used, no ahk commands in there.

Any additional settings I have to do?

thanks!

Feel free to correct me when you spot any mistakes. Please?


willyfoo
  • Members
  • 40 posts
  • Last active: Jul 31 2015 07:35 PM
  • Joined: 03 Jun 2007
For those needing to show help documentation.. i've linked Ctrl-F1 to the online documentation by doing the following

Using <!-- m -->https://github.com/k... ... umentation<!-- m -->
I've added in the following in gotodocumentation.py
def ahk_doc(self, keyword, scope):
        open_url("http://www.autohotkey.com/docs/commands/%s.htm" % keyword)

And in Packages/User/(OS).sublime-keymap
[
	{"keys": ["ctrl+f1"], "command":"goto_documentation"}
]


  • Guests
  • Last active:
  • Joined: --
<dict>
	<key>comment</key>
	<string>Default methods</string>
	<key>match</key>
	<string>\b(?i:__new|__set|__get|__call|__delete|write(|line|uint|int|int64|short|ushort|char|uchar|double|float)|read(|line|uint|int|int64|short|ushort|char|uchar|double|float)|rawread|rawwrite|seek|tell|close|setcapacity|getcapacity|getaddress|haskey|_newenum|clone|minindex|maxindex|remove|insert)(?=\(|\s?:[^:])\b</string>
	<key>name</key>
	<string>meta.function-call.ahk</string>
</dict>

<dict>
	<key>comment</key>
	<string>Meta</string>
	<key>match</key>
	<string>(\.?[\w.].*)(\.[^\w(]*)</string>
	<key>name</key>
	<string>variable.language.ahk</string>
</dict>
How to highlight "obj.subObj.value" but don't highlight any not specific .Method()? Like this:
[color=#0000BF]obj.subObj.value[/color] := var
[color=#0000BF]obj.subObj[/color].Method()
[color=#0000BF]obj[/color].Method()
[color=#0000FF]obj[/color].[color=#0080FF]getcapacity[/color]()


  • Guests
  • Last active:
  • Joined: --

How to highlight "obj.subObj.value" but don't highlight any not specific .Method()? Like this:

[color=#0000BF]obj.subObj.value[/color] := var
[color=#0000BF]obj.subObj[/color].Method()
[color=#0000BF]obj[/color].Method()
[color=#0000FF]obj[/color].[color=#0080FF]getcapacity[/color]()

<dict>
			<key>comment</key>
			<string>Object access</string>
			<key>match</key>
			<string>(?<=\.)\w+\b(?!\()|\w+\b(?=\.\w+)</string>
			<key>name</key>
			<string>variable.language.ahk</string>
		</dict>


S0und
  • Members
  • 100 posts
  • Last active: Apr 08 2015 10:07 AM
  • Joined: 16 Feb 2007
Perfect Workflow in Sublime Text 2

Amazing tutorial about ST2.

https://tutsplus.com...sublime-text-2/

  • Guests
  • Last active:
  • Joined: --

(?<=\.)\w+\b(?!\()|\w+\b(?=\.\w+)

(?<=\.)\w+\b(?!\()|\w+\b(?=\.\w+|\[)


Guest
  • Guests
  • Last active:
  • Joined: --
Can't get the ahk syntax added.

My path:
C:\Program Files\Sublime Text 2
C:\Program Files\Sublime Text 2\Pristine Packages
C:\Program Files\Sublime Text 2\Pristine Packages\AutoHotKey

Sublime Text2 -> Preferences -> Browse Packages -> Autohotkey -> Emty folder
Sublime Text2 -> View -> Syntax -> No autohotkey to select

The autohotkey files in the zip don't contain the extension which the other have (in the pristine packages).
Current in this folder, there's no ahk file except for the ahk folder itself (containing the syntax files and stuffs).

What am I doing wrong...?

Guest
  • Guests
  • Last active:
  • Joined: --
I also don't have this file:
gotodocumentation.py

v2.01

Guest
  • Guests
  • Last active:
  • Joined: --
The commands are showing up in the box, so that's working.

However, the syntax and colour is probably still wrong.

ripper121
  • Members
  • 114 posts
  • Last active: Jan 16 2014 11:06 AM
  • Joined: 01 Nov 2012
Pleas ReUp the Highlighter File THX.
Is there a installer for the Highlighter?

Ripper121 aka Ripp3r]D3[
Deutsches (original) Forum: Seit: 11.11.2007 Beitr├Ąge: 1912
ripper.gif
Top-10 German


nnnik
  • Members
  • 1625 posts
  • Last active: Jan 24 2019 02:19 PM
  • Joined: 28 Jul 2012
I only get Errorlevel 2 and nothing is executed with the build system

Visit the new forum ahkscript.org.

http://ahkscript.org


Coco
  • Members
  • 697 posts
  • Last active: Oct 31 2015 07:26 PM
  • Joined: 27 Jul 2012

Here's a plugin that allows you run/build AHK script. Its advantage over the build system: You can run(test) code or selection w/o having to save or create a file. 

 

How to use:

- Save it in a  a folder inside your Packages directory.

 

from the Sublime Text console:

view.run_command('ahkexec')

 

or you can bind the command to a hot key.

[
	{"keys": ["f5"], "command": "ahkexec"}
]

This version is for the Unicode version of AHK only

Tested it on ANSI, it works

 

UPDATE:

02/09/13 - Added support for multiple AHK flavors/version(see inline documentation)

 

CODE:



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

I'm  looking forward to create a total- Autohotkey package for Sublime (with all the needed features).

 

Here's what I have added till now..

 

.Syntax Complete. (Perfect)

.Syntax Higllight (Perfect)

.Intellisense (Launches the Help of the Command)  (Perfect)

.A Build System (Decent)

 

*Intellisense is infact a AHK Script .......

 

I will add other handy tools such as Msgbox Creator.

 

So, does anybody how to write a SyntaX-Specifc code in Sublime in order to run a program. (here a Script)


Now a CS Undergrad. | My WebsiteAutohotkey Scripts | Softwares

Telegram me : @aviaryan


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

I'm  looking forward to create a total- Autohotkey package for Sublime (with all the needed features).

 

I made it!!    tongue.png


Now a CS Undergrad. | My WebsiteAutohotkey Scripts | Softwares

Telegram me : @aviaryan


stevenp
  • Members
  • 197 posts
  • Last active: Sep 23 2014 05:47 PM
  • Joined: 28 Aug 2006
AVI, things that discourage even to try your stuff:
* Win+S, Win+G, Win+M - what are these hotkeys, I don't need them
* you recommended to start from a fresh Sublime-Text rather than the one I originally have.
* your recommendation: paste the contents of your Package and Replace All Files if asked! 
* your recommendation: don't do things such as renaming the folder or renaming certain files, as then some features will not work. 
 
Now how about future versions?
How SublimeText will be updated?
Will it work after an update?
 
It's a nice try but imho it's not suited for public usage

"Simplifying complexity is not simple"