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

相關文章
相關標籤/搜索