Skip to content

Instantly share code, notes, and snippets.

@Werninator
Last active February 15, 2022 22:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Werninator/901fe95a1486687d56480f965126d5ca to your computer and use it in GitHub Desktop.
Save Werninator/901fe95a1486687d56480f965126d5ca to your computer and use it in GitHub Desktop.
Sublime Text Plugin to search a selected word in MSDN C++
import sublime
import sublime_plugin
import webbrowser
class OpenHelpCommand(sublime_plugin.TextCommand):
def run(self,edit):
msdnLink = 'https://docs.microsoft.com/en-us/search/?terms={0}';
for region in self.view.sel():
if not region.empty():
syntax = self.view.substr(region)
webbrowser.open_new(msdnLink.format(syntax))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment