11

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?

6 Answers 6

13

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.

4
  • Thanks, Michael. This solution fixes the problem easily!
    – dhulihan
    Commented Mar 19, 2013 at 20:12
  • btw, any idea on soft redo? what is it?
    – kumarharsh
    Commented Jun 16, 2013 at 8:15
  • You need to restart sublime.
    – redochka
    Commented Jun 20, 2013 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. Commented Jun 3, 2014 at 22:00
24

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.

5
  • 3
    Ctrl + Alt + Shift + U does not work for me with Sublime Text 3 on Debian 7. Commented Dec 10, 2014 at 21:20
  • 3
    ctrl+alt+shift+u does not work in Sublime Text 3 on Ubuntu 14.04
    – Phrogz
    Commented Aug 17, 2016 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 Commented Sep 29, 2016 at 10:35
  • Does not work for me, Ubuntu 16.04, Sublime 3. CTRL-Shift-u works fine from Terminator, Firefox, etc.
    – Pointy
    Commented Apr 3, 2017 at 3:42
  • Works for me now on 20.04, thank you for the help.
    – Pointy
    Commented Jan 13, 2021 at 14:16
2

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.

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

The above solutions did not work for me on Ubuntu 22.04, using Sublime Build 4143.

The only solution that worked was to repeat the keybinding in the user keybinding, ommiting the "command":

{ "keys": ["ctrl+shift+u"] }

It won't show the underline "u" like other editors do, though. It will still print the correct character after entering the number and hitting the space key.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .