sublime 安装配置SVN插件

1、首先必须安装好sublime安装插件管理 Package Control。安装方法如下:
  • 自动安装:
    1.通过快捷键 ctrl+` 或者 View > Show Console 菜单打开控制台
    2.粘贴对应版本的代码后回车安装

  • 适用于 Sublime Text 3:

import  urllib.request,os;pf=’Package Control.sublime-package’;ipp=sublime.installed_packages_path();urllib.request.install_opener(urllib.request.build_opener(urllib.request.ProxyHandler()));open(os.path.join(ipp,pf),’wb’).write(urllib.request.urlopen(‘http://sublime.wbond.net/’+pf.replace(‘ ‘,’%20’)).read())
  • 适用于 Sublime Text 2:
import  urllib2,os;pf=’Package Control.sublime-package’;ipp=sublime.installed_packages_path();os.makedirs(ipp)ifnotos.path.exists(ipp)elseNone;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’)
  • 手动安装:

1.点击 Preferences > Browse Packages… 菜单
2.进入 Installed Packages/ 目录
3.下载 Package Control.sublime-package,并复制文件到 Installed Packages/ 目录
4.重启 Sublime Text

2、安装TortoiseSVN(不是在sublime中安装,直接安装在点电脑)
  1. 首先在百度搜索并下载 TortoiseSVN

推荐从官网下载,软件分为32位和64位版本,下载时请根据自己的系统位数进行下载;

sublime 安装配置SVN插件_第1张图片
TortoiseSVN下载,安装,配置,常用操作 svn教程
  1. 安装过程:
  1. 下载软件后,双击程序进行安装,点击“Next”;
  2. 在许可证协议页面,选择“I Accept the terms in the License Agreement”,点击“Next”;
  3. 在自定义选项页面,可以选择安装目录,也可以直接点击“Next”进行安装;
  4. 点击“Install”开始安装;
3、安装svn插件。

在sublime中按ctrl+shift+p ,然后输入install 你就能看见下边显示出内容,选择 Install Package 然后你会看见左下角有个=号在一直晃动,等待一下就会出来可以安装的包,此时你只需要输入svn

如果你的是windows的则选择,(需要提前安装TortoiseSVN,也就是我们说的小乌龟)TortoiseSVN,如果是linux的则选择 SVN。此时左下角显示 Installing package TortoiseSVN或者Installing package SVN
我现在用的是windows的所以就以windows为例
下载完成之后会自动打开一个文件,文件内容如下:

Package Control Messages
========================
 
TortoiseSVN:
-----------
 
  Sublime-TortoiseSVN
  =============
  sublime-TortoiseSVN is a tiny and simple plugin for [Sublime Text](http://www.sublimetext.com) .
  It's behavior is similar to [subclipse](http://subclipse.tigris.org/) in [Eclipse](http://www.eclipse.org/).
  **It runs only on Windows and needs the TortoiseSVN and TortoiseSVN command line tools (TortoiseProc.exe).**
 
  Usage
  ============
  Install it using [Sublime Package Control](http://wbond.net/sublime_packages/package_control).
  If TortoiseSVN is not installed at `C:\\Program Files\\TortoiseSVN\\bin\\TortoiseProc.exe`, specify the correct path
  by setting property "tortoiseproc_path" in your TortoiseSVN.sublime-settings file. 
 
  The default key bindings are 
  - [alt+c] : commit current file.
  - [alt+u] : update current file.
  - [alt+r] : revert current file.
 
  You can also call TortoiseSVN commands when right-clicking folders or files in the side bar.
 
  IMPORTANT
  ==============
 
  Do NOT edit the default Sublime-TortoiseSVN settings. Your changes will be lost
  when Sublime-TortoiseSVN is updated. ALWAYS edit the user Sublime-TortoiseSVN settings
  by selecting "Preferences->Package Settings->TortoiseSVN->Settings - User".
  Note that individual settings you include in your user settings will **completely**
  replace the corresponding default setting, so you must provide that setting in its entirety.
 
  Settings
  ==============
 
  If your TortoiseProc.exe path is not the default, please modify the path by selecting 
  "Preferences->Package Settings->TortoiseSVN->Settings - User" in the menu.
 
  The default setting is:
 
   {
          // Auto close update dialog when no errors, conflicts and merges
          "autoCloseUpdateDialog": false,
          "tortoiseproc_path": "C:\\Program Files\\TortoiseSVN\\bin\\TortoiseProc.exe"
      }

里边最重要的就是下边几句,说的是你要是默认安装的TortoiseSVN,则不需要更改直接可以使用,要是自定义的路径,则需要手动配置sublime text的svn插件路径,具体的配置文件在 Preferences->Package Settings->TortoiseSVN->Settings – User,如我的路径D:\SVN\bin\TortoiseProc.exe,则在刚才打开的配置文件里边输入一下内容:

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

注意,目录层之间用\分割而不是\分割哦~
现在你再试试在你左侧栏中右键是不是能看见svn的操作选项了呀.

你可能感兴趣的:(sublime 安装配置SVN插件)