Last active
February 15, 2022 22:56
-
-
Save Werninator/901fe95a1486687d56480f965126d5ca to your computer and use it in GitHub Desktop.
Sublime Text Plugin to search a selected word in MSDN C++
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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