Sublime Text的几个常用操作

1、先选中变量,再Ctrl+D N次同时选中多个同名变量,同步修改

Use Multiple Selections to rename variables quickly

使用多个选项快速重命名变量

Here Ctrl+D is used to select the next occurrence of the current word. Once created, each selection allows for full-featured editing.

这里Ctrl+D用于选择当前单词的下一个出现项。一旦创建,每个选择都允许进行全功能编辑。


2、Ctrl+P呼出查找框,首字母组合快速定位文件,@转换为字符模式方便查找内容

Quickly jump to files and functions with Goto Anything

快速跳转到文件和函数与Goto任何东西

Here Ctrl+P is used to open the Goto Anything menu, xcc is used to select the file xla_compilation_cache.cc, @ switches to symbol mode, and :c selects the XlaCompilationCache::Compile method.

这里使用Ctrl+P打开Goto Anything菜单,使用xcc选择文件xla_compilation_cache.cc, @切换到符号模式,:c选择XlaCompilationCache::Compile方法。


3、跳转到函数的定义,鼠标悬停跳转定义,或者光标定位后F12,或者Ctrl+Shift+R

Navigate source using Goto Definition

使用Goto定义导航源代码

Here the mouse is hovered over a symbol to jump to the definition. The keyboard shortcut F12 can be used when the caret is located on a symbol, or Goto Symbol in Project can be opened via Ctrl+Shift+R to jump to the definition of any symbol in the project.

这里,鼠标悬停在一个符号上以跳转到定义。当插入符号位于符号上时,可以使用键盘快捷键F12,或者可以通过Ctrl+Shift+R打开项目中的Goto符号,跳转到项目中任何符号的定义。


4、Ctrl+R呼出检索框,@后输入函数名,在大型源码文件中能快速定位到函数位置

Unsurpassed performance

无与伦比的性能

Here a 7MB source code file is opened, and Goto Symbol Ctrl+R is used to jump to a function 200k lines down. Full editing features are retained for code in large files, or with complex syntax.

这里打开一个7MB的源代码文件,并使用Goto符号Ctrl+R向下跳转到一个函数200k行。对于大型文件或具有复杂语法的代码,将保留完整的编辑特性。

你可能感兴趣的:(Sublime Text的几个常用操作)