This is a dirty fix but at least works. cursor position update also supported.

Use LD_PRELOAD to reimplement gtk_im_context_set_client_window and set im focus in.use "gdk_region_get_clipbox" to catch the caret position. (It's really difficult to find which function can catch the position....)

Here I made a assumption that the caret width is always 2, since it is 2.

This is a dirty fix but at least works. cursor location update still not works, since I really can not find a proper way to get the current caret loation relative to GdkWidow, it seems sublime use a customized GtkWidget? I am not sure.......

I've tested this in Archlinux with sublime version 2.0.1-2, It works quite well.

This is a dirty fix but at least works. cursor location update still not works, since I really can not find a proper way to get the current caret loation relative to GdkWidow, it seems sublime use a customized GtkWidget? I am not sure.......

I've tested this in Archlinux with sublime version 2.0.1-2, It works quite well.

Thanks for your excellent job!!

original post had been updated to support cursor location update, please try it.

Followed all of cjacker's steps but they didn't seem to work for me. No errors or anything, I just still don't get anything from the IME. Even if I turn it on manurally, when I type the characters are still English, not the Japanese characters from the IME.

This is a dirty fix but at least works. cursor position update also supported.

Use LD_PRELOAD to reimplement gtk_im_context_set_client_window and set im focus in.use "gdk_region_get_clipbox" to catch the caret position. (It's really difficult to find which function can catch the position....)...

This is a dirty fix but at least works. cursor position update also supported.

Use LD_PRELOAD to reimplement gtk_im_context_set_client_window and set im focus in.use "gdk_region_get_clipbox" to catch the caret position. (It's really difficult to find which function can catch the position....)[/code]

I tried this on Ubuntu 12.04, it works but only work for FCITX not ibus.I sure get cursor location update, but there still is some problem (actually a big one) - backspace will erase the text before cursor, not character in IME.

So, I guess I just went back to ibus since it makes me feel better Anyway, great work.

Another question: is it possible to bring this cursor location update feature to Windows version of sublime?IME works better on Windows version of sublime, the only problem is cursor location update. If you can fix that, it will be really great.

Enz0:

For Sublime Text 2, there was a nice plugin for supporting input method.

For Sublime Text 2, there was a nice plugin for supporting input method.github.com/chikatoike/IMESuppor ... DME_en.orgNow that Sublime Text 3 has threaded plugin system, the plugin no longer works properly, at least in my environment.Because the plugin hooks the input, there are some side effects like BracketHighlighter becomes unworkable.Please support the input method correctly, especially with Sublime Text 3 for Windows.

I wasn't able to use my compose key at all on Arch Linux running KDE with xim in ST2, I tried scim but it didn't supposed custom compose keys from ~/.XCompose, but I was able to fix this for Linux by changing to scim-uim

To enable this for all GTK apps, put this into your ~/.xprofile after installing scim-uim, and then restart X:

GTK_IM_MODULE=uim-scim

Note that there are other ways to do this that make this work for all users on the computer and whatnot.To run it just for ST2, or test it out without restarting, run this in your preferred console, set it as a bash alias, etc:

thank you so much to whitequark and cjacker. i've just invested a few days getting familiar with Sublime Text and talking myself into the making the psychologically wrenching step of switching code editors, and then I ran into this problem, which is a total deal-breaker for me. the interposition works very nicely, but i do find it more than a little disconcerting that the developers seem to have no interest in this issue -- even when the community has effectively discovered, diagnosed and solved it for them... i was already a little uncomfortable using a non-open-source code editor... think i'll delay my purchase a bit longer and see how this plays out.

i tried to fork chikatoike's SublimeIBus https://github.com/chikatoike/SublimeIBus to make chinese/english hybrid input work in sublime 2 , but due to my technical skills, i can't figure out how to get rid of the redundent return after you press enter. it's 90% working i could say ...

I meet a strange problem with fcitx. I can call fcitx in Sublime3 successful, and input chinese successful too. But I can not type "Backspace", If I type "Backspace", it will not del what I just typed, but del char in sublime view! For example: Current sublime view is : "Hello World", and I want to insert a chinese word like "你好", I need type "nihao" and a "space". But If I type wrong char when inserting chinese like "nihaoxx", And after I type two "Backspace", view change to "Hellow Wor", and fcitx input box is still "nihaoxx".

And I find If will comment "{ "keys": "backspace"], "command": "left_delete" }," , it works, but I can not use backspace in sublime too.

I am a Vietnamese and I am using fcitx-unikey and your solution for typing VietnameseMy problem is fcitx-unikey not display preview popup, so unless I press space, the text I typed didn't display in Sublime Text windows. But for Gnome Terminal, or gedit, I can see pre-edit text with an underline.Can you help me fix this problem?Thank you!