现在的位置: 首页 > 综合 > 正文

MAC OS 安装Siblime Text2以及解决中文乱码问题

2018年01月18日 ⁄ 综合 ⁄ 共 3347字 ⁄ 字号 评论关闭

看下系统信息



1.首先安装Siblime Text2,安装包网上有很多,方便大家也给自己留个备份,传了一份到csdn上面

链接:

http://download.csdn.net/detail/xiaohuangcat/8137749


2.为了用siblime text2看c++代码中的中文必须的安装一个插件

网上的方法试了很多,下载ConvertToUTF8安装之后还是失败,无意中发现一个大神的脚本

直接贴出来给大家


因为只用到了 所以提取除了其中的俩条命令

cd
~/Library/Application\ Support/Sublime\ Text\ 2/Packages/

git
clone https://github.com/akira-cn/sublime-gbk.git "GBK Encoding Support"


重启siblime text2即可。


看下效果图



另外贴出全部的脚本,其中很多插件留给有人的人!


#!/bin/sh

cd ~/Library/Application\ Support/Sublime\ Text\ 2/Packages/

echo Install...
echo ==================================================

# Install Package Control 此处为安装 <span style="font-family: Arial, Helvetica, sans-serif;">Package Control 可以剔除掉</span>
# import urllib2,os; 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())); open(os.path.join(ipp,pf),'wb').write(urllib2.urlopen('http://sublime.wbond.net/'+pf.replace(' ','%20')).read()); print 'Please restart Sublime Text to finish installation'

echo === Theme - Soda ===
rm -rf "Theme - Soda"
git clone https://github.com/buymeasoda/soda-theme.git "Theme - Soda"

echo === RailsCasts Colour Scheme ===
rm -rf "RailsCasts Colour Scheme"
git clone https://github.com/talltroym/sublime-theme-railscasts.git "RailsCasts Colour Scheme"

echo === GBK Encoding Support ===
rm -rf "GBK Encoding Support"
git clone https://github.com/akira-cn/sublime-gbk.git "GBK Encoding Support"

echo === SideBarEnhancements ===
rm -rf "SideBarEnhancements"
git clone https://github.com/titoBouzout/SideBarEnhancements.git "SideBarEnhancements"

echo === Gist ===
rm -rf "Gist"
git clone https://github.com/condemil/Gist.git "Gist"

echo === SublimeAStyleFormatter ===
rm -rf "SublimeAStyleFormatter"
git clone https://github.com/timonwong/SublimeAStyleFormatter.git "SublimeAStyleFormatter"

echo === MarkdownBuild/SublimeBullet ===
rm -rf "MarkdownBuild"
git clone https://github.com/erinata/SublimeBullet.git "MarkdownBuild"

echo === Markdown Preview ===
rm -rf "Markdown Preview"
git clone https://github.com/revolunet/sublimetext-markdown-preview "Markdown Preview"

echo === Git ===
rm -rf "Git"
git clone https://github.com/kemayo/sublime-text-2-git.git "Git"

echo === SideBarGit ===
rm -rf "SideBarGit"
git clone https://github.com/SublimeText/SideBarGit.git "SideBarGit"

echo === Sublime-HTMLPrettify ===
rm -rf "Sublime-HTMLPrettify"
git clone https://github.com/victorporof/Sublime-HTMLPrettify.git "Sublime-HTMLPrettify"

echo === CSSTidy ===
rm -rf "CSSTidy"
git clone https://github.com/fitnr/SublimeCSSTidy.git "CSSTidy"

echo === Maven ===
rm -rf "Maven"
git clone https://github.com/nlloyd/SublimeMaven.git "Maven"

echo === Twitter Bootstrap Snippets ===
rm -rf "Twitter Bootstrap Snippets"
git clone https://github.com/devtellect/sublime-twitter-bootstrap-snippets.git "Twitter Bootstrap Snippets"

echo === JsFormat ===
rm -rf "JsFormat"
git clone https://github.com/jdc0589/JsFormat.git "JsFormat"

echo === Aweibo ===
rm -rf "Aweibo"
git clone https://github.com/zhanglubing/sublime-aweibo.git "Aweibo"

echo === SublimeWeibo ===
rm -rf "SublimeWeibo"
git clone https://github.com/zhanglubing/sublime-sublimeweibo.git "SublimeWeibo"

echo === Live Reload ===
rm -rf "Live Reload"
git clone https://github.com/dz0ny/LiveReload-sublimetext2.git "Live Reload"

echo === Licence Snippets ===
rm -rf "Licence Snippets"
git clone https://github.com/sijk/sublime-licence-snippets.git "Licence Snippets"

echo ==================================================
echo Done!


方法二:

安装包管理package control (方法百度 官网有2,3的脚本)之后cmd+shift+p 输入ip 进入install package 查找自己需要安装的插件即可










抱歉!评论已关闭.