Build Sublime Text 2 into a usable IDE
Speaking of the editor, probably most people want to recommend is vim and Emacs, I used vim, the function is really powerful, but not very accustomed to, has been a friend recommended sublime Text 2 this editor, and then this period of time to try a bit, I deeply like this editor, For a similar editor, I used Notepad2, notepad++, EditPlus, UltraEdit, Vim, TextPad, did not think which editor is very useful, until encountered sublime Text 2, before writing a Python script, Also has been struggling to find a good IDE, used Wingide, Ulipad, Pycharm, Eclipse+pydev, Pyscrypter, no very favorite, until met Sublime Text 2, today to talk about how to make the sublime Text 2 into a good IDE, although it is only an editor, but it has a rich extension, enough to let us turn it into a good IDE.
I. Download and Installation
Sublime Text2 is an open source software, do not need to register to use (although there is no registration will have pop-up windows, but basically does not affect the use).
: http://www.sublimetext.com/, please download it yourself according to the system version. Download it and install it right after.
The default sublime configuration file is in the C-disk directory, if a friend think put C disk is not used to, then after the installation of sublime, do not directly run sublime, in the address bar input%appdata%, and then delete the directory of Sublime Text 2 folder, Then create a folder named data in the sublime installation directory, run Sublime, and all the configuration files about sublime are in the data directory.
If a friend is not accustomed to its English interface, you can use the Chinese package to Chinese, I put the Chinese package uploaded to the blog space, the need for friends can download.
Chinese Package Address: Http://files.cnblogs.com/dolphin0520/sublime%E6%B1%89%E5%8C%96.rar
The method of Chinese:
1. Run Sublime text 2;
2. Select "Preferences", "Browse packages";
3. Locate the folder "default" and copy the extracted files to the "default" folder to overwrite them.
The following is the operating interface after the Chinese:
Turn off the sublime update prompt:
Sublime The default situation will have the update prompt popup box, you can turn off the update prompt by setting the method:
Choose "Preferences", "Browse packages", find the default folder under the Preferences.sublime-settings, add a line at the bottom (note the first line before the last side with a comma):
Save to exit and restart sublime.
Two. Some common settings and shortcut keys
1. Fonts, theme styles and other settings
When you need to change the theme, you can set it directly through the color theme "preferences":
The font size can only be changed on the main interface:
If you need to change the font and font size, you can first "preferences", "Browse Packages", find the "Default" folder, Then find preferences.sublime-settings this file, with sublime Text 2 Open this file, this file saved some common settings,
such as font, theme style, whether to display line number, smart hint delay time, etc., can be set according to their own needs.
2. Open (Close) The sidebar, right thumbnail, and other commonly used panels
By default Sublime Text 2 is not open in the sidebar file browser, you can open and close sidebar by "View", "sidebar", "Hide sidebar"
By default Sublime Text 2 has thumbnails of files on the right, and you can turn thumbnails on and off by viewing and hiding mini maps.
3. Shortcut keys to find files and defined functions
In Sublime Text 2, you can switch to the desired file very quickly, just by opening the switchboard via "Ctrl+p".
Then enter the name of the file you want to find to quickly switch to the file. If you want to find a function, you can quickly switch to the file that defines the function by entering the @+ function name.
Three. Some of the necessary plugins.
Here are some of the most common plugins required in sublime Text 2.
Sublime Text 2 installed plug-ins and all the pre-built plugins are all under the packages file and can be accessed directly through "preferences", "Browse pakcages".
The Sublime Text 2 installation plugin is available in two ways:
1) Offline installation, first download the installation package, unzip and put in the Packages folder, restart the sublime can be.
2) online installation, before online installation, you need to install the "Packages control" this package management plug-in, the installation method is:
Select View, display console, and then enter in the box that pops up below:
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 ())
Then enter confirm, restart sublime after installation, and if found to see the package control item in Perferences, the installation succeeds.
You can then open the command panel with "Ctrl+shift+p" and enter the "install" command to see the list of installed packages.
Here are a few recommended common plugins:
The tag plugin provides HTML and CSS tags for Web developers, which is very handy and useful for web front-end designers.
Provide some prefixes for CSS3, such as
Terminal plug-in can allow the cmd command window to be opened in sublime Text2, a useful plug-in, good installation of the plugin, Open cmd Command Window shortcut keys are
This plugin allows users to define the template of the file, such as in the writing of an HTML file, always repeat the file header some of the introduction of information is very cumbersome, you can define a template directly generate the necessary information, the specific Sublimetmpl plug-in usage please Baidu itself.
A plug-in to enhance the Sidebar folder browsing function, relatively good.
The plug-in used to generate the comment block, enter "/*" directly after installation, and then press ENTER to generate a code comment block.
Smart Tips plugin, this plugin smart hints feature is very powerful, you can customize the content Library of the prompt, my Python smart hint settings (configuration file path is Packages\sublimecodeintel-master\.codeintel\config) is:
"pythonExtraPaths": [‘D:/Program Files/Python26‘,‘D:/Program Files/Python26/DLLs‘,‘D:/Program Files/Python26/Lib‘,‘D:/Program Files/Python26/Lib/plat-win‘,‘D:/Program Files/Python26/Lib/lib-tk‘,‘D:/Program Files/Python26/Lib/site-packages‘]
The "Pythonextrapaths" is the content library that needs to be used for smart hints.
A smart cue plug-in for the Python language that requires hints for keywords and functions that can be set in packages\andypython\pythoncompletions.py.
A plugin for smart tips for Javsscript and jquery.
jquery Hint Library.
The plug-in allows for quick positioning to function definitions.
12. In order to avoid opening the file containing Chinese characters garbled, you need to install GBK Encoding support this plug-in, and then install the ConvertToUTF8 plug-in.
If a friend feels that there is no registration, sometimes there are pop windows annoying, here is a way to crack:
With a hex editor (UltraEdit I use here) to open the sublime Text 2 installation directory of the file Sublime_text.exe, before it is best to back up, if not cracked successfully can be recovered, and then navigate to 000cbb70 this line, find 8A C3, modify it to B0 01, then save it, this is the interface to crack the registration success:
About Sublime Text 2 for the time being only introduced so much, for some plugins interested in friends can find relevant information on GitHub on the line, let us experience sublime text2 convenient place.
Build a good IDE with sublime Text 2 (GO)