Sublime Text 2 is a cross-platform Text editor that supports Windows, Linux, and Mac OS.
Features:
There is no scroll bar on the right of a good Package. Instead, there is a powerful shortcut command for code thumbnails: The corresponding commands, options, Snippet and Syntex can be searched in real time, press enter to switch files to any position of any file. The Multi-Selection function allows multiple cursors to exist on the page at the same time. Support for VIM mode supports fast macro update ......
:
Test Platform:
System Version: Fedora 17 32bit
Sublime Text Version: Version 2.0.1, Build 2217
Installation:
Installation of Sublime Text 2:
Download the Linux version from the official website Or run # wget audio mv/home/aneek/Downloads/Sublime_Text_2 // opt/Sublime_Text_2 to create shotcut: (1) # touch/usr/bin/sublime (2) # chmod 755/usr/bin/sublime (3) # vim/usr/bin/sublime (4) copy the following to sublime and save it. [Plain] view plain copy #! /Bin/sh export SUBLIME_HOME = "/opt/Sublime_Text_2" $ SUBLIME_HOME/sublime_text $ *
5. Create a desktop icon: (1) vi/usr/share/applications/sublime. desktop
(2) copy the following to sublime. desktop and save it.
[Plain] view plaincopy
<p>[Desktop Entry]</p><p>Name=Sublime Text 2</p><p>Comment=Sublime Text 2</p><p>Exec=<span><span>/home/john/Applications/</span></span>"Sublime Text 2"/sublime_text</p><p>Icon=/<span><span>home/john/Applications/</span></span>Sublime Text 2/Icon/48x48/sublime_text.png</p><p>Terminal=false</p><p>Type=Application</p><p>Categories=Application;Development;</p><p>StartupNotify=true</p>
Chinese display:
The software cannot display Chinese Characters in Linux. You can perform the following operations to solve the problem:
Open the menu bar of Sublime-> Preferences-> Settings-User, and add it to the configuration file (the first half was originally available, which can be replaced according to the situation ):
// Settings in here override those in “Default/Base File.sublime-settings”, and// are overridden in turn by file type specific settings. Place your settings// here, to ensure they’re preserved when upgrading.{“font_face”: “WenQuanYi Micro Hei Mono”}
Among them, "wenquanyi" is a famous open source font http://wenq.org/
Chinese input:
Set the switch key of the fcitx input method, and set Ctrl + Shift in the default Ctrl + Space mode. However, the effect is not very good and it is often unavailable in Chinese.
You can copy and paste it elsewhere.
In the future, Sublime Text 2 may be resolved.
VIM mode compatibility:
- Preference => Setting-User click to open
- A json file named Preferences. sublime-settings is opened, which is a custom configuration file. Add the "ignored_packages" Statement to the configuration file and save it.
- Open a file and edit it in VI Mode. The default value is insert mode. After ESC, it enters command mode. perform various operations.
Package Control and Alignment Tools ):
To install the alignment tool, you must first install the installation package tool. Sublime Package Control allows you to conveniently manage a package.
- Use shortcuts
Ctrl + 'Go to the Console
- Copy the following code to the console:
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())
- Restart.1
Preferences ==> Package SettingsSee
1
Package ControlThis indicates that the installation is successful.
Next, install the Alignment tool through Package Control.
- 1
Shift + Command + PCall up Command Panel
- Enter install to bring up the Package Control ==> Install Package option, and press Enter.
- Enter Alignment in the list, and press enter to install
- Restart takes effect
The default Alignment Command shortcut key is Control + Command + a, and the Alignment shortcut key is Shift + Control + Command +. Set to: In
1
Preference ==> package setting ==> Alignment ==> key Binding-user
Add the following Configuration:
1
{"Keys": ["super + ctrl + shift + a"], "command": "alignment "}
Shortcut Key conflict:
The Default Code prompts that the shortcut key is "Ctrl + Space", which is in conflict with the input method switch, resulting in failure of both parties.
You can search "insert_best_completion" in the menu bar-> Preferences-> Key Bindings-Default:
{"Keys": ["tab"], "command": "insert_best_completion", "args": {"default": "\ t", "exact ": true }},
Change the value of keys to the required shortcut key. We recommend that you:
{"Keys": ["alt +/"], "command": "insert_best_completion", "args": {"default": "\ t", "exact ": true }},
TIPS:
- After selecting the text, press Tab and Shift + Tab to control indentation.
- You can directly exit the program without saving the file, and it will be automatically restored at the next startup.
Sublime Text 2 is a shared software that charges fees but can be used permanently for free. The price is 59 USD. I believe developers will not understand the Chinese people, nor face the Chinese market ,. To put it bluntly, ST2 has powerful editing functions and is well received. It is available in Windows, Linux, and Mac systems.
The Installation Process in Linux is as follows:
1. Download the installation package from the official website
Official website address: http://www.sublimetext.com/2
ST2 is currently 2.0.1. Because the software source does not exist by default, apt-get install cannot be downloaded. The official network is also a direct download package. The linuxfile is .bz2. The file is not big, only 5 MB more.
2. decompress and place
It is not difficult to decompress the package. You just need to find a directory to decompress the package, but we recommend that you decompress the package to the/usr/lib/directory to make it easy to start quickly in the command line, the method I used is to uncompress and then move it. The command is as follows:
Tar-xvf Sublime \ Text \ 2.0.1.tar.bz2
Mv Sublime \ Text \ 2/usr/lib/
The "\" is an escape character.
This is because the $ PATH environment variable automatically covers the/usr/lib directory and does not need to modify the environment variable.
Then type:
Ln-s/usr/lib/Sublime \ Text \ 2/sublime_text/usr/bin/subl
This line of command creates a subl Link under the/usr/bin/directory, so that you can easily start the editor using the command line. Here, the subl name is customized, Which is simpler and easier to define.
The installation has ended. You can use ST2 to open a file.