sublim text3在deepin系统下的license:在help--enter license输入下面的证书
BEGIN LICENSE
eldon
Single User License
EA7E-1122628
C0360740 20724B8A 30420C09 6D7E046F
3F5D5FBB 17EF95DA 2BA7BB27 CCB14947
27A316BE 8BCF4BC0 252FB8FF FD97DF71
B11A1DA9 F7119CA0 31984BB9 7D71700C
2C728BF8 B952E5F5 B941FF64 6D7979DA
B8EB32F8 8D415F8E F16FE657 A35381CC
290E2905 96E81236 63D2B06D E5F01A69
84174B79 7C467714 641A9013 94CA7162
END LICENSE
pakage control安装:用shift+control+p打开sublim的终端并且输入下面的命令,回车,成功后重启sublim
import urllib.request,os,hashlib; h = '6f4c264a24d933ce70df5dedcf1dcaeeebe013ee18cced0ef93d5f746d80ef60'; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); by = urllib.request.urlopen( 'http://sublime.wbond.net/' + pf.replace(' ', '%20')).read(); dh = hashlib.sha256(by).hexdigest(); print('Error validating download (got %s instead of %s), please try manual install' % (dh, h)) if dh != h else open(os.path.join( ipp, pf), 'wb' ).write(by)
解决插件安装缓慢的问题:
1.preferences---pakage control--settings User
在里面增加:
"channels": [ "https://raw.githubusercontent.com/wilon/sublime/master/download/channel_v3.json" ],
解决无法输入中文问题:
git clone https://github.com/lyfeyaj/sublime-text-imfix.git
cd sublime-text-imfix
./sublime-imfix
解决sublim在安装插件时出现错误:
以安装中文插件为例:
Unable to download ChineseLocalizations. Please view the console for more details.
ignored packages updated to: ["Vintage"]
reloading settings Packages/User/Package Control.sublime-settings
reloading settings Packages/User/Preferences.sublime-settings
reloading settings Packages/User/Preferences.sublime-settings
以上的错误解决办法:
到官网下载最新版http://www.sublimetext.com/3,覆盖到/opt/sublim_text3/下,参考命令:
sudo cp -r /sublim_text3/* /opt/sublime_text3
只是这样操作的可能会导致原来的图标不能用,建议重新安装一下即可。
更新内容,所有均可用,包括安装插件:
按照上面复制进去后,去 /usr/share/applications 下把原来的sublime_text.desktop给删除,然后回到 /opt/sublime_text3这个文件下,把 sublime_text.desktop文件用编辑器打开,然后复制下里面的内容,
然后回到 /usr/share/applications 目录下,用终端打开,用vim 创建一个sublime_text.desktop文件,把复制的内容粘贴进去,这样就可以了。注意设置里面的地址指向;必须是/opt/下的sublime的目录。
[Desktop Entry]
Version=1.0
Type=Application
Name=Sublime Text
GenericName=Text Editor
Comment=Sophisticated text editor for code, markup and prose
Exec=/opt/sublime_text/sublime_text %F
Terminal=false
MimeType=text/plain;
Icon=sublime-text
Categories=TextEditor;Development;
StartupNotify=true
Actions=Window;Document;
[Desktop Action Window]
Name=New Window
Exec=/opt/sublime_text/sublime_text -n
OnlyShowIn=Unity;
[Desktop Action Document]
Name=New File
Exec=/opt/sublime_text/sublime_text --command new_file
OnlyShowIn=Unity;
突然想到,就是不删除旧的图标也可以,直接进去修改里面的指定应用路径,把路径修正即可。可以不进行上面这一步的操作;因为你看上面的.desktop文件是把文件夹指向的是:/opt/sublime_text
而终端的指向的是:
image.png
修正.desktop文件路径或者,修改这个文件夹名称都行。
安装sublime_text2:
sudo apt-get install sublime-text
经测试插件无法成功安装;
于是sublim_text2的pakage_control安装方法:
import urllib2,os,hashlib; h = '6f4c264a24d933ce70df5dedcf1dcaee' + 'ebe013ee18cced0ef93d5f746d80ef60'; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); os.makedirs( ipp ) if not os.path.exists(ipp) else None; urllib2.install_opener( urllib2.build_opener( urllib2.ProxyHandler()) ); by = urllib2.urlopen( 'http://packagecontrol.io/' + pf.replace(' ', '%20')).read(); dh = hashlib.sha256(by).hexdigest(); open( os.path.join( ipp, pf), 'wb' ).write(by) if dh == h else None; print('Error validating download (got %s instead of %s), please try manual install' % (dh, h) if dh != h else 'Please restart Sublime Text to finish installation')
同上到console执行,执行后会出现
Please restart Sublime Text to finish installation
重启后就可以了;
然后再进行中文的安装,重新打开sublim-text2,按下shift+ctrl+p然后输入install打开一个框框安祖昂就好了,但是还是会安装失败,因为Pakage Control被墙了。
部分参考自:https://www.twblogs.net/a/5c3f4408bd9eee35b21e296c/zh-cn
内容来自我的博客:http://leanote.com/blog/post/5dca8701ab644101f4000a2b
作者:Kenny技术仔 个人联系邮箱:zhangdlmj@163.com
欢迎交流
网友评论