8

I'm not able to use unicode composition (The ctrl+shift+u method) to enter unicode characters in Sublime Text 2 (v2.0.1, Build 2217) on Ubuntu 12.04 (Unity). To reproduce, just open up a tab and do this:

  1. Press ctrl+shift+u
  2. Type 00B0
  3. Press enter

Normally the degree sign (°) will be entered. I'm not sure if some Sublime command is overriding this keybinding, Is anyone else able to do this?

10

I just ran into this same issue and I couldn't find an answer anywhere, but I did find a solution. The problem is that the default key bindings in Sublime for Linux overwrite ctrl+shift+u with a soft_redo command. To disable this:

  1. Open up your default key bindings: Preferences > Key Bindings - Default
  2. Search for ctrl+shift+u and comment out the line containing that key binding. For example: //{ "keys": ["ctrl+shift+u"], "command": "soft_redo" },. Optionally, you could remap this to a different key binding if you really want soft_redo (I have no idea what this command does See comment below for soft_redo functionality).
  3. Save and you're good to go!

One note though, you'll need to use <space> instead of <enter> when you've completed the unicode character code as Sublime has a key binding for <enter>.

Edit:

Since you can no longer easily edit the default key bindings in Sublime Text 3, I would suggest using the answer by @brandon-lockaby.

  • Thanks, Michael. This solution fixes the problem easily! – dhulihan Mar 19 '13 at 20:12
  • btw, any idea on soft redo? what is it? – kumarharsh Jun 16 '13 at 8:15
  • You need to restart sublime. – redochka Jun 20 '13 at 11:54
  • 2
    You don't have to restart sublime. Any time you save a sublime configuration file, sublime reloads the configuration. As for the soft_undo and soft_redo they are used to undo/redo selections when you are making multiple selections. For instance, if you mistakenly added a selection to your multi-selection, you can perform a soft_undo to undo the last selection without losing all your other selections. – Michael Mims Jun 3 '14 at 22:00
21

I also got here, but these days it seems you really aren't meant to edit the default settings, and the binding can't be unbound in user settings.

My solution is to press ctrl+alt+shift+u in sublime. It works and I don't have to change any key bindings. Still have to press space when you're done.

  • 2
    Ctrl + Alt + Shift + U does not work for me with Sublime Text 3 on Debian 7. – Geradlus_RU Dec 10 '14 at 21:20
  • 1
    ctrl+alt+shift+u does not work in Sublime Text 3 on Ubuntu 14.04 – Phrogz Aug 17 '16 at 3:51
  • 1
    Works on my machine, Ubuntu 16.04 Sublime 3. I also use Character Table package because it offers a search functionality and additional keybindings that are easier to memorise – jbbiomed Sep 29 '16 at 10:35
  • Does not work for me, Ubuntu 16.04, Sublime 3. CTRL-Shift-u works fine from Terminator, Firefox, etc. – Pointy Apr 3 '17 at 3:42
1

By Editing 'Default (Linux).keymap' in /opt/sublime_text/Packages/Default.sublime-package one could disable the conflicting ctrl+shift+u binding

0

In Sublime Text 3 you cannot alter the Default key bindings...normally. However, if you install PackageResourceViewer, you can use the command PackageResourceViewer: Open Resource and then choose Default, then Default (Linux).sublime.keymap...and then you can delete (or comment out) the soft_redo line, and save the file.

0

Being a Vim user, I'm used to working with my keyboard, and while my IDE is heavily configured, I like to use default options for computers which are not mine, for instance. This should work.

A possible solution which should work on any default setup:

Type any letter or word (just a placeholder), and just hit Ctrl+D. It selects the word.

Then press Ctrl+H. It opens search and replace. Hit Tab, type \x{<unicode>}, making sure RegEx is activated (toggled with Alt+R), and hit Ctrl+Shift+H to replace it with the Unicode value.

Hit Esc to close the search and replace menu.

If you need the same Unicode several times

After you've done one replacement, you can repeat the same process by selecting (with Ctrl+D again) whatever you want, and Ctrl+Shift+H will automatically replace it, since it stores your last replacement in memory. No need to bring up the menu again.

TL;DR:

Use search and replace. \x{<unicode} in RegEx mode will serve as Unicode characters.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.