Sublime Text 2-the Sexiest code Editor! The programmer must be an artifact! Cross-platform support Win/mac/linux, support 32 and 64-bit, support the syntax highlighting of various popular programming languages, code complement congruent ...
Syntax highlighting, code hinting completion, code folding, customizing skins/color schemes, multi-note pages:
SUBLIMETEXT2 supports but is not limited to C, C + +, C #, CSS, D, Erlang, HTML, Groovy, Haskell, HTML, Java, JavaScript, LaTeX, Lisp, Lua, Markdown, Syntax highlighting for mainstream programming languages such as Matlab, OCaml, Perl, PHP, Python, R, Ruby, SQL, TCL, Textile and XML. ST2 has excellent code auto-completion function (auto brace, curly brace and other matching symbols, automatic completion of the words that have already appeared, auto-complete function name), very smart, and ST2 also has the function of code Snippets (Snippet), you can save the common code snippets, and call them whenever necessary. Of course, syntax highlighting, code folding, line number display, custom skin, color scheme and so on are already a modern editor should have a standard function, so here is not more introduction.
Code maps, multiple interface layouts, and fullscreen-free mode:
Sublime text 2 is featured on the interface is supported by a variety of layout and code map, but also provides F11 and shift+f11 into full screen mode, text difficult to describe, see it.
Fully open user-definable configuration with magical and practical editing state recovery features:
The various configurations of the Sublime Text 2 are controlled by the configuration file, completely customizable by the user, and can even be changed to a completely different operating experience if you are willing to toss it. Looking at the diagram below, the Setting-default menu will open the default software configuration file (which will record a lot of configuration information such as what font to use), key Bindings-default is the default shortcut profile, You can open them to see how some of the original settings are configured, but it is not recommended to modify directly here ! You can do this in the-user end of the file (that is, the meaning of custom configuration) in the same way, if you have the same item on both sides, it will be defined in the-user file.
In this example, I'm in the first line of Key Bindings-user: {"Keys": ["Alt+up"], "command": "Swap_line_up"}, meaning to move the currently selected line up (swap position with the previous line) while pressing ALT + the ARROW key If there is no problem with the syntax, you can use this shortcut immediately after you have saved the file.
Sublime Text 2 the shortcut keys also support double combination , for example, by default, the selected text is changed to uppercase hotkey is "ctrl+k, ctrl+u", meaning when you first press ctrl+k and then quickly press Ctrl+u to trigger (only press the ctrl+k is not useful), This avoids a lot of hot-key conflicts, and it can be more flexible and more selective to customize hotkeys. But here is not going to teach you how to modify various configurations or modify the hotkey, I am afraid to make a manual, here is a more complete set of official documents ( birds of the bird ), interested friends can refer to.
In addition, Sublimetext also has a noteworthy detail-"Edit state Recovery", that is, when you modify a file, but not save, then quit the software, ST2 is not very annoying to remind you to do not save, because whether the user spontaneous exit or unexpectedly crashes the exit, the next time you start the software, Your previous edit status will be fully restored, just like you did before you quit. I think the details are very, very great! Because I often try to modify some of the places, but in order to ensure that there is no problem before you do not want to save, then if some things interrupt themselves, need to leave, this feature is very useful, direct exit on the line, do not bother, next time back to open the software to continue editing. Of course, with this recovery feature is no longer afraid of the system crashes, power off, it is really let people feel ST2 particularly special safe and reliable, and duly!
Powerful multi-line selection and multi-line editing:
In the process of writing code, we often need to edit multiple lines of code or multiple variables at the same time. In Sublime Text 2 has a very practical multi-line operation skills, flexible use can greatly improve the speed of editing yo! I believe that you might ask yourself this question: "How did I ever live with an editor that didn't have this way?" ”
Here are some of the multi-line editing methods I've learned:
The mouse selects multiple lines, press Ctrl+shift+l (command+shift+l) to edit these lines at the same time;
The mouse selects the text, repeatedly presses the ctrl+d (command+d) to continue downward simultaneously selects the next same text to simultaneously edit;
Mouse selected text, press ALT+F3 (Win) or ctrl+command+g (MAC) can select all the same text at once for simultaneous editing;
shift+ right mouse button (Win) or option+ left mouse button (MAC) or using the mouse button can be used to vertical multi-line selection;
CTRL + left mouse button (Win) or command+ left mouse button (MAC) to manually select multiple text to edit at the same time
There are a lot of similar tricks, please add ...
shift+ the right mouse button to easily implement multi-line editing, batch to prefix the variable
Lightning-Fast File switching:
If you open more than one file at the same time, or your project often need to edit different files, when the number of files, in the past often need to spend a lot of effort to find, it is annoying. Now, Sublime Text 2 Just press ctrl+p (Win) or shift+command+p (MAC) to bring up the file switcher, then you just enter the filename, you can switch the past in a moment! And it supports fuzzy matching, just enter the part you remember, such as I want to find a "www.iplaysoft.com.php" file to edit, then you only need to enter "IPL" or "IPS.C" such characters can match out, this feature is very very good!
Similar functionality, I've only seen it in a large (bulky) IDE like Eclipse, but in a small, fast editor, I've had it for the first time. With this feature, you can switch between open files, if you use Project management (set a folder as a project), and it will also be able to search for files that have not been opened in a matching project folder. Now you need to use the mouse to go to a point tab to switch? Do you want to open "My Computer" slowly in the different folders to find the files that need to be edited? With ST2, you only need to enter a few characters ~ only one sentence: unprecedented convenience!
Jump as you like: Quickly list the elements that are/html with the positioning function, jump to a specified line
With the Quick file switching feature described above, it's easy to open/switch to the document you want to edit, but what if the code for this file is very long and you want to easily jump to where you want to edit it? Sublime Text 2 long ago to help you think of the same is the same as the previous ctrl+p (Win) or shift+command+p (MAC), this time try to enter an @ number to see? Yes, good! This list immediately lists all the Function in this file! Also use fuzzy matching, quickly enter a few keywords, immediately can locate the function to go!!! This feature is especially useful when you need to jump between functions-mom no longer have to worry about me finding the function to find the egg hurts! When you edit the HTML, this goods to you list is the HTML of the various ID elements, I believe that the front-end of the students are chicken frozen bar.
Enter @ To start with this magical effect, then try to enter a colon: start, and then enter a number, well, this time you can jump to the number of lines specified, you can enter a # number to list/search text, and you can also use faster shortcut keys, such as quick list/jump function is Ctrl +r (Mac is command+r), it is exactly equivalent to ctrl+p after entering @; Jump to the specified line number is ctrl+g (Mac is command+g).
and even more amazing is that these switching positioning methods you can also use together ! For example, I have a file called "Hello-iplaysoft.js", in which there is a function called "visit_iplaysoft_com", I now want to edit this function, then I just press ctrl+p, and then enter "[Email Protected] "carriage return (fuzzy match, note the character in front of the color), ST2 immediately to open this file and locate it! Is it convenient enough?! By memorizing these shortcuts, you can switch and edit files very one go, and you will find the world a better place to be.
All-in-a-set command panel:
One feature of Sublime Text 2 is that it has a fairly powerful command panel that is almost omnipotent! At any time, press Ctrl+shift+p (Win) or command+shift+p (MAC) to recall. With it, you can implement many, many, many, many features, such as "set syntax:php" to set the current document to PHP syntax highlighting, "Convert Case:swap case" to invert the selected text capitalization; "File:save All" You can save all files at once, "File:close all" closes all files at once, etc... Also, the list here supports fuzzy matching (this goods is really a good thing!). )。 Because this command is too much, the scope of coverage is also very wide, I really can not be introduced here, if you are interested, you can often adjust a panel to see the list of what commands, a lot to understand, try, and then slowly digest, I believe it will let you can not leave it.
Package Control (must not be missed the expansion pack manager)
In addition to its numerous practical features and features, the Sublime Text 2 can be installed to enhance itself with a variety of extensions/skins/color schemes. Now introduced the package control can be seen as a ST2 extension manager, using it, you can use a very magical, very simple and convenient way to download, install, delete Sublime Text 2 of various plugins, skins, etc., believe me, want to better use ST2 Absolutely not without it! But ST2 itself does not bring this tool, we need to install it ourselves, the method is simple:
1, in the directory of SUBLIMETEXT2 find data> installed Packages folder (if not, please create manually)
2. Download the package control.sublime-package file here
3. Put the downloaded file in installed Packages inside
4. Restart Sublime Text
If the package control is successfully installed, then ctrl+shift+p invokes the command panel and we will find some commands that begin with the "package Control:", which we often use to install a few (installation extensions), List Packages (all extensions listed), remove package (remove extension), Upgrade package (upgrade extension). But if you follow the above method does not work, you can try to press the keyboard ctrl+~ (number 1 to the left of the button) to bring up the console, and then copy the following code into and enter, it will automatically help you create a new folder and download the file, and the above method the final effect is the same:
Import Urllib2,os; pf= ' Packagecontrol.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 ())), open (Os.path.join (IPP,PF), ' WB '). Write (Urllib2.urlopen (' http://sublime.wbond.net/' +pf.replace ( ', '%20 '). read ()); print ' Restart Sublime Text to finish installation '
After the package Control is successfully installed, a series of commands starting with its name appear in the command panel
Entering "package Control:install" in the command panel will list all the extensions that can be installed (must connect to the network, such as), from the list can be seen, 4GL, Aaapackagedev Those are the name of the plugin, Select them to download and install. As you can see from this list, the various extensions of ST2 are now very rich! In addition, you can see the extended list of Web versions and detailed instructions here (the data for both lists should be synchronized. By the deadline of 2012-7-8, 482 expansion packs have been collected here.
Sublime Text 2-the Sexiest code Editor! The programmer must be an artifact! Cross-platform support for Win/mac/linux, support 32 and 64-bit, support for syntax highlighting in various popular programming languages, code complement congruent