Sublime Forum

View In Browser plugin not working

#1

I use the sublime portable and after restoring the settings of windows 10 I had a single problem with the View In Browser plugin, in the console the message is displayed

View In Browser plugin v2.0.0, Python 3
Traceback (most recent call last):
File “D:\SublimeText3\sublime_plugin.py”, line 1066, in run_
return self.run(edit, **args)
File “D:\SublimeText3\Data\Installed Packages\View In Browser.sublime-package\ViewInBrowserCommand.py”, line 201, in run
File “D:\SublimeText3\Data\Installed Packages\View In Browser.sublime-package\ViewInBrowserCommand.py”, line 176, in loadPluginSettings
File “D:\SublimeText3\Data\Installed Packages\View In Browser.sublime-package\ViewInBrowserCommand.py”, line 85, in getBaseCommand
File “D:\SublimeText3\Data\Installed Packages\View In Browser.sublime-package\ViewInBrowserCommand.py”, line 67, in expandWindowsUserShellFolder
File “D:\SublimeText3\Data\Installed Packages\View In Browser.sublime-package\ViewInBrowserCommand.py”, line 137, in getWindowsUserShellFolders
UnicodeEncodeError: ‘ascii’ codec can’t encode character ‘\xc1’ in position 24: ordinal not in range(128)

0 Likes

#2

Encontrei a solução usando a função build do próprio Sublime clicando em

Tools / Build System / New Build System

No arquivo que se abre colocar os comandos

{
        "cmd": ["C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe", "https://192.168.0.2/$project_base_name/$file_name"]
}

Então salva o arquivo na pasta \SublimeText3\Data\Packages\User com o nome desejado.
Clica no menu Build System e seleciona o arquivo que você escolheu.
E para colocar a tecla de atalho desejada, abre o Key Bindings

{ "keys": ["f12"], "command": "build" },
0 Likes