Sublime text 3安装svn插件

这几天在研究sublime text 3的使用,感受还不错,如今想让他可以支持svn,因此就写一下怎么安装svn插件吧~html

首先先说一下这个官方的插件网站 点我进入~linux

进入以后,最上边的第一个就是点击安装插件包管理插件,有了这个插件才可以方便的安装别的插件.windows

首先经过ctrl+~唤出控制台eclipse

若是你是sublime text 3那么执行一下代码ide

1 import urllib.request,os,hashlib; h = '2deb499853c4371624f5a07e27c334aa' + 'bf8c4e67d14fb0525ba4f89698a6d7e1'; 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://packagecontrol.io/' + 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)

若是你是sublime text 2那么执行一下代码svn

1 import urllib2,os,hashlib; h = '2deb499853c4371624f5a07e27c334aa' + 'bf8c4e67d14fb0525ba4f89698a6d7e1'; 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')

个人是3的,大体显示一下内容则表示下载完成.网站

import urllib.request,os,hashlib; h = '2deb499853c4371624f5a07e27c334aa' + 'bf8c4e67d14fb0525ba4f89698a6d7e1'; 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://packagecontrol.io/' + 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)
170998ui

注意最后的数值,这个表示下载的数据大小,此时你回车会看见url

1 Package Control: No updated packages

以后须要ctrl+shift+p,而后输入spa

1 install

你就能看见下边显示出内容,选择Install Package

而后你会看见左下角有个=号在一直晃动,等待一下就会出来能够安装的包,此时你只须要输入svn

若是你的是windows的则选择,(须要提早安装TortoiseSVN,也就是咱们说的小乌龟)

1 TortoiseSVN

若是是linux的则选择

1 SVN

此时左下角显示 Installing package TortoiseSVN或者Installing package SVN

我如今用的是windows的因此就以windows为例

下载完成以后会自动打开一个文件,文件内容以下

01 Package Control Messages
02 ========================
03  
04 TortoiseSVN:
05 -----------
06  
07   Sublime-TortoiseSVN
08   =============
09   sublime-TortoiseSVN is a tiny and simple plugin for [Sublime Text](http://www.sublimetext.com) .
10   It's behavior is similar to [subclipse](http://subclipse.tigris.org/) in [Eclipse](http://www.eclipse.org/).
11   **It runs only on Windows and needs the TortoiseSVN and TortoiseSVN command line tools (TortoiseProc.exe).**
12  
13   Usage
14   ============
15   Install it using [Sublime Package Control](http://wbond.net/sublime_packages/package_control).
16   If TortoiseSVN is not installed at `C:\\Program Files\\TortoiseSVN\\bin\\TortoiseProc.exe`, specify the correct path
17   by setting property "tortoiseproc_path" in your TortoiseSVN.sublime-settings file.
18  
19   The default key bindings are
20   - [alt+c] : commit current file.
21   - [alt+u] : update current file.
22   - [alt+r] : revert current file.
23  
24   You can also call TortoiseSVN commands when right-clicking folders or files in the side bar.
25  
26   IMPORTANT
27   ==============
28  
29   Do NOT edit the default Sublime-TortoiseSVN settings. Your changes will be lost
30   when Sublime-TortoiseSVN is updated. ALWAYS edit the user Sublime-TortoiseSVN settings
31   by selecting "Preferences->Package Settings->TortoiseSVN->Settings - User".
32   Note that individual settings you include in your user settings will **completely**
33   replace the corresponding default setting, so you must provide that setting in its entirety.
34  
35   Settings
36   ==============
37  
38   If your TortoiseProc.exe path is not the default, please modify the path by selecting
39   "Preferences->Package Settings->TortoiseSVN->Settings - User" in the menu.
40  
41   The default setting is:
42  
43     {
44           // Auto close update dialog when no errors, conflicts and merges
45           "autoCloseUpdateDialog": false,
46           "tortoiseproc_path": "C:\\Program Files\\TortoiseSVN\\bin\\TortoiseProc.exe"
47       }

里 边最重要的就是下边几句,说的是你要是默认安装的TortoiseSVN,则不须要更改直接可使用,要是自定义的路径,则须要手动配置sublime text的svn插件路径,具体的配置文件在Preferences->Package Settings->TortoiseSVN->Settings - User

如个人路径是D:\SVN\bin\TortoiseProc.exe

则在刚才打开的配置文件里边输入一下内容

1 {
2     // Auto close update dialog when no errors, conflicts and merges
3     "autoCloseUpdateDialog": false,
4     "tortoiseproc_path": "D:\\SVN\\bin\\TortoiseProc.exe"
5 }

 注意,目录层之间用\\分割而不是\分割哦~

如今你再试试在你左侧栏中右键是否是能看见svn的操做选项了呀.

 

 

转载自:http://www.bbtang.info/script/853.html

相关文章
相关标签/搜索