Sublime Text 2 editor practical tips

Reprint address: http://www.csser.com/board/4f59c2cb9c3694f227001cd7

Quickly search for files in the current project

Quickly search for files in the current project

hot key:CTRL + p

There are tricks here, such as wanting to search for the filename of the following path and open it:

routes/user/messages.js
Just type in the window: rum or Isn't it cool r/u/m to see the result?

Add a comment One time 2012-03-30 05:15

Quick comment and uncomment

Quick comment and uncomment

Shortcut keys for inline comments CTRL + /, select an interval for block comments, shortcut keysCTRL + SHIFT + /

Uncomment regardless of line comment or block comment, the shortcut key is the same CTRL + /, just need the mouse cursor to be in the comment interval.

5 comments one time 2012-03-26 13:20

merge rows

merge rows

It seems that this is not a trick, the application scenario, you now want to merge the current line and the next line into one line, the shortcut keyCTRL + J

2 comments One time 2012-03-24 19:13

Multiple compound selection text content

Multiple compound selection text content

Have you tried selecting text like the image below?

The operation method is as follows

  1. First select the first paragraph of text
  2. Then press the CTRLkey , and use the mouse to select the text to be selected in the second paragraph
  3. keep doing this

There is also a good place, that is, after selecting, press to [try ? Is not very considerate, you can also press single and double quotation marks and so on.

Overall, the Sublime Text 2experience is top notch.

4 comments one time 2012-03-14 08:32

Column selection mode

Column selection mode

Two ways:

1. Right mouse button + shift

2. Ctlr+Shift+Up and Down Arrow

Reference: http://www.sublimetext.com/docs/2/column_selection.html

But I don't understand this:

Add to selection: Ctrl
Subtract from selection: Alt

9 comments Tianzhu 2012-03-13 10:22

Let SublimeText2 support Jade syntax highlighting

Make Sublime Text 2 support Jade syntax highlighting

 

$ git clone git://github.com/miksago/jade-tmbundle Jade
$ cd Jade
$ zip -r Jade.sublime-package*
At this point, a file will be generated in the current directory: Jade.sublime-package

Just copy this file to a directory under the Sublime Text 2 root Pristine Packagesdirectory and you're done.

2 comments One time 2012-03-11 14:45

text selection

text selection

In the process of writing code, it is inevitable to select some characters frequently. It is common to drag the mouse to select, and then delete or how to.

In Sublime Text 2, when the cursor is on a word, press the shortcut key: CTRL + d, the block of characters will be selected, and the same characters existing in the file will be prompted.

Select section content

For example, now to select the content between [and ]:

 

[ a , b , c , d , csser ]
Place the cursor anywhere between the brackets and press the shortcut key: CTRL + SHIFT + m. This selection method supports symbols [ ] { } ( ) such as .
Add a comment One time 2012-03-11 14:25

Search for content in all files in a specified directory

Search for content in all files in a specified directory

hot key:CTRL + SHIFT + f

The result is as follows:

Double-clicking the file path or keyword will automatically open the file and jump to the specified location.

1 comment One time 2012-03-09 22:26

Quickly search for content in the current file

Quickly search for content in the current file

Shortcut key: CTRL + penter after

Add a comment One time 2012-03-09 17:25

Quickly jump to a function in a file

Quickly jump to a function in a file

hot key:CTRL + r

or CTRL + pafter typing

Add a comment One time 2012-03-09 17:15

How to install SublimeText2 plugin

How to install Sublime Text 2 plugin

  1. Press Ctrl+` to bring up the console
  2. Paste the following code into the command line at the bottom and hit enter:
    import urllib2,os;pf='Package Control.sublime-package';ipp=sublime.installed_packages_path();os.makedirs(ipp) if not os.path.exists(ipp) else None;open(os.path.join(ipp,pf),'wb').write(urllib2.urlopen('http://sublime.wbond.net/'+pf.replace(' ','%20')).read())
  3. Restart Sublime Text 2.
  4. If you see the package control item in Perferences->package settings, the installation is successful.

How to install plugins with Package Control:

  1. Press Ctrl+Shift+P to bring up the Command Palette
  2. Enter install to bring up the Install Package option and press Enter, then select the plugin to be installed in the list.
10 comments Sangui 2012-03-09 17:13

Jump to the specified line

Jump to the specified line

hot key:CTRL + g

Or CTRL + pafter input :, this is very familiar to the feeling of using VIM

7 comments one time 2012-03-09 17:07

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=327041584&siteId=291194637