一、文本出现中文乱码问题
1、打开Sublime Text 3,按Ctrl+~打开控制行,复制粘贴以下python代码,然后回车运行。
2. 复制并粘贴如下代码:
- import urllib.request,os,sys; exec("if sys.version_info < (3,) or os.name != 'nt': raise OSError('This code is for Windows ST3 only!')"); pr='Preferences.sublime-settings'; ip='ignored_packages'; n='Package Control'; s=sublime.load_settings(pr); ig=s.get(ip); ig.append(n); s.set(ip,ig); sublime.save_settings('Preferences.sublime-settings'); pf=n+'.sublime-package'; urllib.request.install_opener(urllib.request.build_opener(urllib.request.ProxyHandler())); by=urllib.request.urlopen('https://packagecontrol.io/'+pf.replace(' ','%20')).read(); open(os.path.join(sublime.installed_packages_path(),pf),'wb').write(by); ig.remove(n); s.set(ip,ig); sublime.save_settings(pr); print('Package Control: 3.0.0 upgrade successful!')
2、重启Sublime Text 3。
3、按Ctrl+Shift+P打开命令行,输入Install Package,回车,然后继续输入ConvertToUTF8,回车。
等安装好了以后,应该问题就解决了,如果还是不行,再按照安装ConvertToUTF8的方式安装GBK Encoding Support,就好了。
转自:http://blog.csdn.net/china_chenxing/article/details/18841641 (亲试有效)
二、tab中文出现方块问题:
在sublime text 3中,Preference, Settings-User,添加:
写道
"dpi_scale": 1.0,
我的Settings-User配置:
写道
{
"dpi_scale": 1.0,
"font_face": "Consolas",
"font_size": 17,
"ignored_packages":
[
"Vintage"
],
"line_padding_bottom": 1,
"line_padding_top": 1,
"tab_size": 4,
"translate_tabs_to_spaces": true,
"word_wrap": "true"
}
"dpi_scale": 1.0,
"font_face": "Consolas",
"font_size": 17,
"ignored_packages":
[
"Vintage"
],
"line_padding_bottom": 1,
"line_padding_top": 1,
"tab_size": 4,
"translate_tabs_to_spaces": true,
"word_wrap": "true"
}
--end