Sublime Text 2/3 GBK Encoding Support and Input Chinese with ibus on Ubuntu

Sublime Text 3 GBK Encoding Support

Press Ctrl ~ to open the command line, and then enter the following line of code

import urllib.request,os,hashlib; h = '2915d1851351e5ee549c20394736b442' + '8bc59f460fa1548d1514676163dafc88'; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); by = urllib.request.urlopen( 'http://packagecontrol.io/' + pf.replace(' ', '%20')).read(); dh = hashlib.sha256(by).hexdigest(); print('Error validating download (got %s instead of %s), please try manual install' % (dh, h)) if dh != h else open(os.path.join( ipp, pf), 'wb' ).write(by)

After running, restart Sublime Text 3, in order to proceed to the next step.

Installation ConvertToUTF8

Press Command Shift P (on OS X), Ctrl Shift P (on Linux / Windows) to open the universal search box, then enter the install package return, this time will load a list of all packges. See the list after re-enter ConvertToUTF8 Enter, it will download and install this package.

Sublime Text 2 GBK Encoding Support

Open Preferences menu,select Browse Packages,the system will open Sublime Text 2 Packages folder,Return to the previous menu,open Installed Packages folder.
Download and copy Package Control.sublime-package to the Installed Packages folder.

Restart Sublime Text 2

Press Command Shift P (on OS X), Ctrl Shift P (on Linux / Windows) to open a command line mode,input Install Package to search for the Package.Install ConvertToUTF8 and GBK Encoding Support can be properly read and write CJK file format.
If you are prompted Encoding GBK is not supported. Please install Codecs26 package.

Input Chinese with ibus on Ubuntu

Installing
A small plugin for chinese input in Sublime Text 2 input helper.
Just a little plugin to open new gtk window having text input field which will support Input Method like ibus, then insert it back to Sublime Text 2 when you complete input text.
Manual Install:(Running in a terminal)

$ cd ~/.config/sublime-text-2/Packages
$ git clone https://github.com/xgenvn/InputHelper.git

Using

Make sure your iBus/scim is working normally on other gtk application

Default key combination: Ctrl Shift Z → Input text in the text field → Press Enter or Ctrl Enter to place text → Press Arrow Key or End to place cursor to the last position. Ctrl Enter to reach new line after input text.

This plugin is only working on Linux! On Windows or Mac you shouldn't have above issues to use this plugin.

0.00 avg. rating (0% score) - 0 votes