################################
this is the py source:
################################
import sublime, sublime_plugin
import webbrowser
class GoogleCommand(sublime_plugin.TextCommand):
def run(self, edit):
url = ‘http://www.google.com.hk/search?ix=hea&sourceid=chrome&ie=UTF-8&q=’
sels = self.view.sel()
for sel in sels:
url += self.view.substr(sel)
webbrowser.open(url)
##################################
this is the sublime-keymap
##################################
{
"keys":"ctrl+alt+k"],
"command": "google"
}
]
#everything is ok when i run view.run_command(‘google’) in console
#but not effective when using key-map
#what`s wrong? can you help me,a fresher …
#Thanks very much