Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save cfmitrah/9bec56bf00a95fe7c3c1 to your computer and use it in GitHub Desktop.

Select an option

Save cfmitrah/9bec56bf00a95fe7c3c1 to your computer and use it in GitHub Desktop.
import sublime, sublime_plugin, webbrowser
class LaunchCfHelpCommand(sublime_plugin.TextCommand):
def run(self, edit, forward = True):
word = ""
for s in self.view.sel():
word = self.view.word( s )
''' To use cfquickdocs
s = sublime.load_settings("CfQuickDocs.sublime-settings")
cfVersion = s.get('cf_version', 'cf9')
webbrowser.open("http://cfquickdocs.com/" + cfVersion + "/#" + self.view.substr(word))
'''
# To use Adobe documentation
webbrowser.open("http://localhost:8500/Sublime_CF_help/index.cfm?q=" + self.view.substr(word))
# To use cfdocs.org cloned local version
webbrowser.open("http://localhost:8500/Sublime_CF_help/cfdocs/doc.cfm?name=" + self.view.substr(word))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment