Build Sublime Text 2 into a usable IDE

Source: Internet
Author: User
Tags ultraedit



Original address



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):



"Update_check": false



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:



1.Tag Plug-in



The tag plugin provides HTML and CSS tags for Web developers, which is very handy and useful for web front-end designers.






2.PREFIXR Plug-in



Provide some prefixes for CSS3, such as






3.Terminal Plug-in



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



Ctrl+shift+t.



4.SublimeTmpl Plug-in



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.



5.SideBarEnhancements Plug-in



A plug-in to enhance the Sidebar folder browsing function, relatively good.



6.DocBlockr Plug-in



The plug-in used to generate the comment block, enter "/*" directly after installation, and then press ENTER to generate a code comment block.



7.SublimeCodeIntel Plug-in



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:


{
    "Python": {
        "python":‘D:/Program Files/Python26/python.exe‘,
        "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.



8.AndyPython Plug-in



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.



9.ANDYJS2 Plug-in



A plugin for smart tips for Javsscript and jquery.



10.jquery Plug-in



jquery Hint Library.



11.Ctags Plug-in



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)


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.