sublime text2的使用

本文介绍如何在Sublime Text中进行项目管理设置、安装及使用CTags插件进行函数定义搜索,以及安装TortoiseSVN插件以实现版本控制等功能。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

项目管理:

首先新建文件夹temp,之后打开sublime text2 选择菜单栏项目->的‘添加文件夹到项目’;之后再选择‘项目另存为’ ,之后命名项目名称就好了。

全项目文件中搜索的应用:搜索函数定义位置。


插件的安装:

git安装:
打开 preferences  菜单下面的 Package Control,输入install  回车,选择需要的包。。 



***************************************************

CTags插件的使用:
去https://github.com/SublimeText/CTags,点zip 下载一个压缩包

解压后,把ctags.exe放到 c:/windows/system32目录下

把解压的包放到preferences->浏览程序包中

重启 sublime text2基本就好了。



怎么使用呢:

首先在需要的项目中 添加“.tags” 文件

在cmd命令下执行
先切换到 项目目录下:
D:\>wamp
'wamp' 不是内部或外部命
或批处理文件。
      
D:\> cd wamp
D:\wamp>cd www
D:\wamp\www>cd demo
D:\wamp\www\demo>
然后执行:

D:\wamp\www\demo>ctags -R -f .tags

这样就产生 .tags 文件

追踪函数: 选中函数名, 用 ctrl+t 两遍,即可以;
返回原地: 连着按:ctrl+t、 ctrl+b 就会返回。

************
TortoiseSVN插件的安装


解压后 文件名改为: Tortoise

把该文件夹复制到Sublime Text 2 下面的Package包下面;

修改:Tortoise.sublime-settings 文件

"svn_tortoiseproc_path": "C:\\Program Files\\TortoiseSVN\\bin\\TortoiseProc.exe",//其他不用管,去掉这个注释,目录为你的原理的svn客户端安装目录


重启后即可;
快捷键:
The key bindings can be modified by selecting the  Preferences > Package Settings > Tortoise > Key Bindings – User  menu entry.



Working Copy Commands

Commit
ctrl+alt+v+c
Status
ctrl+alt+v+s
Update/Sync
ctrl+alt+v+u
Log
ctrl+alt+v+l
Explore
ctrl+alt+v+e

File Commands

Diff
ctrl+alt+v+f
Log
ctrl+alt+v+g
Blame
ctrl+alt+v+m
Explore
ctrl+alt+v+x
Revert
ctrl+alt+v+t
Remove
ctrl+alt+v+r
Add
ctrl+alt+v+a





Package Settings

The default settings can be viewed by accessing the Preferences > Package Settings > Tortoise > Settings – Default menu entry. To ensure settings are not lost when the package is upgraded, make sure all edits are saved to Settings – User.

cache_length
The number of seconds to cache VCS status information. This might be useful to tweak on slow machines.
Default: 5
enable_menus
If Tortoise commands should be available via context menus.
Default: true
debug
If debugging messages should be written to the console.
Default: false
svn_tortoiseproc_path
The filesystem path to the TortoiseSVN  TortoiseProc.exe executable. This should only need to be set if TortoiseSVN is not installed in the standard location.
Default: ""
git_tortoiseproc_path
The filesystem path to the TortoiseGit  TortoiseProc.exe executable. This should only need to be set if TortoiseGit is not installed in the standard location.
Default: ""
hg_hgtk_path
The filesystem path to the TortoiseHg  hgtk.exe (TortoiseHg 1.0) or  thgw.exe (TortoiseHg 2.0) executable. This should only need to be set if TortoiseHg is not installed in the standard location.
Default: ""

Changelog

v1.2.1

  • Upgraded bundled SVN to version 1.7.0

v1.2.0

  • Added keyboard shortcut and file menu entry for blame command

v1.1.4

  • Fixed TortoiseHg support
  • Fixed handling of nested mercurial repositories
  • Improved TortoiseHg support so a cmd window is not shown even when a file path contains a space

v1.1.3

  • Fixed a bug with TortoiseProc.process_status() not properly referencing self.root_dir

v1.1.2

  • Fixed a bug with the Log and Diff menu entries showing for folders that were not under version control

v1.1.1

  • Removed a print line used for debugging

v1.1.0

  • Tweaked handling of statuses
  • Added the ability to disable menus
  • Added debug option

v1.0.8

  • Updated the keymap to actually require the ctrl+alt+v before the ctrl+alt+(letter) for the different commands

v1.0.7

  • Increased the status cache length to help prevent right-click lag on slower machines

v1.0.6

  • Fixed a bug with the detection of the svn binary for the Tortoise SVN context menu

v1.0.5

  • Fixed the plugin to work when custom paths are set for the Tortoise* binaries
  • Fixed the example Tortoise.sublime-settings

v1.0.4

  • Updated the plugin to work with TortoiseHg 2.x

v1.0.3

  • Changed references of Delete to Remove
  • Added documentation for menu items
  • Added the revert keyboard shortcut

v1.0.2

  • Added context menu and sidebar menu entries based on the current state of the file or folder

v1.0.1

  • Added an error message when trying to execute command on an unsaved file

v1.0.0

  • Initial release

License

Sublime Tortoise is licensed under the MIT license. The bundled SVN binary and supporting libraries are licensed under various licenses. Please see the license.txt file in the package directory for details.

GitHub

Source

The source code for Sublime Tortoise is available on GitHub at https://github.com/wbond/sublime_tortoise.


******************************************************
关闭Sublime Text2 的更新提示:
打开 Reference 菜单 进入浏览程序包(Browse Packages),找到User目录下的
Preferences.sublime-settings文件
添加:
"update_check":false
即:

{
"font_size": 16.0,
"ignored_packages":
[
"Vintage"
],
"update_check":false #新增
}




评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值