Please refer to the folder "folder ".
Download/install Windows/Mac OS
Download it from the official website and double-click it to install it ~
Linux
For Linux installation, download tar. BZ from the official website and install it manually.
Here we will introduce how to install apt-get on your own initiative:
sudo add-apt-repository ppa:webupd8team/sublime-text-2 sudo apt-get updatesudo apt-get install sublime-text-dev
After the command is completed, everything is done!
Check whether there is a friendly chart in the Application List? (Although this icon is not friendly at all ..)
Change siderbar color
Windows
Modify the topic file:/Pristine packages/theme-default. sublime-package/Default. sublime-theme
Background Color
{ "class": "sidebar_tree", "row_padding": [8, 3], "indent": 12, "indent_offset": 17, "indent_top_level": false, "layer0.tint": [30, 30, 30], "layer0.opacity": 1.0, "dark_content": false},
Text
{ "class": "sidebar_label", "color": [150, 150, 150], "font.bold": false // , "shadow_color": [250, 250, 250], "shadow_offset": [0, 0]},
Cutting Line
{ "class": "sidebar_container", "layer0.tint": [10, 10, 10], "layer0.opacity": 1.0, "layer0.draw_center": false, "layer0.inner_margin": [0, 0, 1, 0], "content_margin": [0, 0, 1, 0]},
In fact, RGB colors are clearly defined and can be changed to what you like.
PS: You must change the type name when backing up the original items, because sublime will load all the packages.
In addition, I would like to thank Yixiang Baike for his great help.
Linux
Note that the location where sublime is stored is/usr/lib/sublime-text-2.
It is assumed that the installation package is installed, usually under/OPT.
Appendix: Linux folder Parsing
Mac OS X
OS is a little troublesome and cannot be changed directly. The tool must be used to read and write files. I changed it under Win and then overwritten it.
Install plug-ins
Like vim, sublime itself is just an editor. to convert it into an IDE, you need to install various plug-ins. Of course, even if you don't need plug-ins, their own power will bring you unexpected surprises!
First, get plug-in Manager
As its name implies, it is a tool used to manage plug-ins. It is convenient to install plug-ins first and then implement other plug-ins. Installation Method: choose View> show console. Then you can see the console form below. (Display box + input box) You can run the Python code and enter the following code to install the package control.
Insert: in many cases, the code is import urllib2 and OS. This is the code of python2.x, which has been replaced by import urllib in python3.x. request, OS; suppose you are sublime2.0 and the following version number, Please modify the code by yourself.
import urllib.request,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(urllib.request.urlopen('http://sublime.wbond.net/'+pf.replace(' ','%20')).read())
Remember to restart the software first! Press Ctrl + Shift + P
You can install your favorite plug-ins.
After installing the plug-in manager, you can find the plug-ins you need and install them.
Some websites will summarize some good plug-ins. You can try them.
Of course, I want you to read what I wrote first ..
High-speed Encoding
Emmet: Same as Zen coding, but st3 no longer supports Zen. This is the same. However, you must first disable sublime's own automatic complementing function, add preferens> setting-user
Code formatting
Code formatting contains various languages. Here are several examples: (all plug-ins can be directly searched in package Control)
C/C ++: sublimeastyleformathtml: Tag
List:
It seems like a good summary
Some indispensable st plug-ins
20 powerful plug-ins
Configure the compiling environment
Console input (take C ++ as an example)
The principle is very easy, that is, to create a bat external for running the file, and then call it. Note that you need to use start to open a new form. At the same time, you need to use it to view the results. The most annoying thing is that sublime runs your start in the background by default, assume that your pause and start are put in a file. Pause is invalid for the start % 1 file. Therefore, you need to create two files. Pay attention to environment variables... (For more information about what environment variables are, I suggest you use Baidu .)
After the configuration, I personally feel that the input in the console is not very significant. All the questions are read from the file, and do not need to be read during development. So ~ Exercise caution.
Mycrun. bat
@echo off%1echo.echo -------------------pauseexit
Mycallrun. bat
@start MyCRun %1
The configuration file is in sublime Text 3 \ packages \ c ++. sublime-package. Back up the data first.
Change C ++. sublime-build
{"Shell_cmd": "G ++ \" $ {file} \ "-O \" $ {file_path}/$ {file_base_name} \ "", "file_regex ": "^ (.. [^:] *) :( [0-9] + ):? ([0-9] + )? :? (. *) $ "," Working_dir ":" $ {file_path} "," selector ":" source. c, source. c ++ "," variants ": [{" name ":" run "," shell_cmd ": "g ++ \" $ {file} \ "-O \" $ {file_path}/$ {file_base_name} \ "& mycallrun \" $ {file_path}/{{file_base_name}.exe \" "// actually, a mycallrun is added here]}
C/C ++
Sublime Text 3 is configured with C ++ by default. However, you need to add the GCC folder to the environment variable by yourself.
Java
Sublime Text 3 only executes javac by default and must be added for execution by itself.
I cannot understand the sublime command format, so I changed javac to my own bat. (I feel like C ++ can be used and connected like C ++)
Create myjrun. BAT (I directly put it under JDK/bin) in the command line where you can directly submit the question)
@ECHO OFF cd %~dp1 ECHO Compiling %~nx1... IF EXIST %~n1.class ( DEL %~n1.class ) javac %~nx1 IF EXIST %~n1.class ( ECHO Running...ECHO ----------------------OUTPUT----------------------java %~n1 )
Note that CLS cannot be used.
Modify the Java compilation option (back up the original ). Folder: packages/Java. sublime-package/javac. sublime-build
{"shell_cmd": "myJRun.bat \"$file\"","file_regex": "^(...*?):([0-9]*):?([0-9]*)","selector": "source.java"}
In this way, the Java code point build will be automatically executed. This method cannot be cross-platform, and we will study the sublime method.
Go
The development environment of golang with sublime is very easy. It is almost the same to install a gosublime.
Enter Chinese Characters in Ubuntu.
You must compile a file and load it for execution. So we need to use some compiling environments.
Step 1: Install the GTK Environment
sudo apt-get install libgtk2.0-dev pkg-config
In addition, it seems that ibus is not supported. I use fcitx + sogou.
Step 2: Save the following file to sublime_imfix.c
/* Sublime-imfix.cUse ld_preload to interpose some function to fix sublime input method support for Linux. by cjacker Huang <Jianzhong. huang at i-soft.com.cn> gcc-shared-O libsublime-imfix.so sublime_imfix.c 'pkg-config -- Libs -- cflags GTK +-100'-fpicld_preload =. /libsublime-imfix.so sublime_text */# include <GTK/GTK. h> # include <gdk/gdkx. h> typedef gdksegment gdkregionbox; struct _ gdkregion {long size; L Ong numrects; gdkregionbox * rects; gdkregionbox extents;}; gtkimcontext * local_context; region (const gdkregion * region, gdkrectangle * rectangle) {g_return_if_fail (region! = NULL); g_return_if_fail (rectangle! = NULL); rectangle-> X = region-> extents. x1; rectangle-> Y = region-> extents. y1; rectangle-> width = region-> extents. x2-region-> extents. x1; rectangle-> Height = region-> extents. y2-region-> extents. y1; gdkrectangle rect; rect. X = rectangle-> X; rect. y = rectangle-> Y; rect. width = 0; rect. height = rectangle-> height; // the caret width is 2; // maybe sometimes we will make a mistake, but for most of the T IME, it shocould be the caret. if (rectangle-> width = 2 & gtk_is_im_context (local_context) {gtk_im_context_set_cursor_location (local_context, rectangle) ;}// this is needed, for example, if you input something in file dialog and return back the edit area // context will lost, so here we set it again. static gdkfilterreturn event_filter (gdkxevent * xevent, gdkevent * event, gpointer im_context) {xeven T * Xev = (xevent *) xevent; If (Xev-> type = keyrelease & gtk_is_im_context (im_context) {gdkwindow * win = g_object_get_data (g_object (im_context ), "window"); If (gdk_is_window (WIN) Then (im_context, Win);} return gdk_filter_continue;} void then (gtkimcontext * context, gdkwindow * window) {gtkimcontextclass * Klass; g_return_if_fail (gtk_is_im_co Ntext (context); large Klass = gtk_im_context_get_class (context); If (Klass-> set_client_window) Klass-> set_client_window (context, window); If (! Gdk_is_window (window) return; g_object_set_data (g_object (context), "window", window); int width = gdk_window_get_width (window); int Height = gdk_window_get_height (window ); if (width! = 0 & height! = 0) {gtk_im_context_focus_in (context); local_context = context;} gdk_window_add_filter (window, event_filter, context );}
Step 3: Compile
gcc -shared -o libsublime-imfix.so sublime_imfix.c `pkg-config --libs --cflags gtk+-2.0` -fPIC
Step 4: Run
In fact, it can be executed here. Try
LD_PRELOAD=./libsublime-imfix.so sublime_text
It should have been successful, but I cannot input the command every time.
-Place sublime_imfix.so In the sublime installation folder (my/opt/sublime_text /)
-Create a file subl write under/usr/local/bin or another path:
LD_PRELOAD=/opt/sublime_text/libsublime-imfix.so /opt/sublime_text/sublime_text
-Create a new launcher command:/usr/local/bin/subl (uppercase is only used to distinguish between general commands)
Success!
Something about cracking
There are a lot of methods to crack the sublime on the Internet. However, I haven't cracked it yet, and the reason is very easy. Suppose you have the heart to crack a software that can be tried for an indefinite period of time .. Everyone is also a developer. If they do not crack the software, who else will be expected to pay for the software? (Said one of my mechanical learners)
To be continued.
The sexiest editor in the history of sublime Text 3