๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ

Tools/Sublime Text2

Sublime Text2 ์›น๋ธŒ๋ผ์šฐ์ € ๋ฐ”๋กœ ์—ด๊ธฐ

๋ฐ˜์‘ํ˜•

๋ฉ”๋‰ด์—์„œ Tools -> New Plugin 

     

์•„๋ž˜ ๋‚ด์šฉ์œผ๋กœ ๋ฎ์–ด์“ฐ๊ธฐ ํ•œ ๋’ค User ํด๋”์— ์ €์žฅ

import sublime, sublime_plugin 

import webbrowser 


class OpenBrowserCommand(sublime_plugin.TextCommand): 

    def run(self,edit):  

        url = self.view.file_name() 

        webbrowser.open_new(url)

* ๋‹จ์ถ•ํ‚ค ์ง€์ •Preference -> Key Bindings โ€“ User

์•„๋ž˜ ๋‚ด์šฉ ์ž…๋ ฅ ํ›„ ์ €์žฅ (Ctrl + b๋กœ ๋‹จ์ถ•ํ‚ค ์ง€์ •)

{ "keys": ["ctrl+b"], "command": "open_browser" }




๋ฐ˜์‘ํ˜•