i use sublime text 2 to edit vhdl code, i want to use regex to highlight words after “beq”, for example: beq testloop, then highlight testloop. but i donot know how do make it.
does any could help me? 
i use sublime text 2 to edit vhdl code, i want to use regex to highlight words after “beq”, for example: beq testloop, then highlight testloop. but i donot know how do make it.
does any could help me? 
Would you like to search by using the regex search from console input?
The pattern is: (?<=beq )\w+
If you need this as command in a plugin, use it so:
[code]
import sublime
import sublime_plugin
class SelectAfterBeqCommand(sublime_plugin.TextCommand):
def run(self, edit):
regions = self.view.find_all("(?<=beq )\w+")
selections = self.view.sel()
selections.clear()
selections.add_all(regions)[/code]
Bind the command “select_after_beq” to an hotkey.
thanks for the help!
[quote=“BugFix”]Would you like to search by using the regex search from console input?
The pattern is: (?<=beq )\w+
If you need this as command in a plugin, use it so:
[code]
import sublime
import sublime_plugin
class SelectAfterBeqCommand(sublime_plugin.TextCommand):
def run(self, edit):
regions = self.view.find_all("(?<=beq )\w+")
selections = self.view.sel()
selections.clear()
selections.add_all(regions)[/code]
Bind the command “select_after_beq” to an hotkey.[/quote]