Sublime Forum

Ctrl+BackSpace deletes all CJK characters forward

#1

For example, if I type in the line below, which contains some CJK characters:
あいうえお???abcdefg???啊波次的额佛歌|

The last vertical line | represents the position of the cursor.
And then when I hit Ctrl+BackSpace, the whole line will be deleted.

I have tried to modify the word_separators option in the Settings, adding some CJK characters like ‘の的?’, but nothing changes.

// Characters that are considered to separate words
    "word_separators": "./\\()\"'-:,.;<>~!@#$%^&*|+=[]{}`~?の的?",

What I want is to separate the CJK characters by some user-defined characters or dictionary files.

Would you please give me some useful suggestions?
Thanks!

0 Likes

CJK word detection and related issues
#2

Your configuration does work on my PC.


Personally, I am using

"word_separators": "./\\()\"'-:,.;<>~!@#$%^&*|+=[]{}`~?<>()[]{}「」『』〈〉《》【】‘’“”"+-*/,。、.‧・・·﹣:;~!?@#$%︿&|=",
0 Likes

#3

@jfcherng
Thanks for your feedback!
And that is what puzzles me the most.

One stranger thing is that, even after I delete some characters of the default settings, it still recognizes the deleted characters as word separators.
I have tried to restart Sublime and it still does not work.

My PC platform: Windows 10
Sublime version: Version 3.0, Build 3143

0 Likes

#4

I cannot reproduce this with a clean portable ST 3143 on my Win 7 x64 PC. :sweat:

0 Likes

#5

What does the ‘reproduce’ mean? Fail or work?

0 Likes

#6

Your configuration WORKS on my PC with a clean portable ST 3143.

0 Likes

#7

You may check which command is executed when you press Ctrl+Backspace.

  1. press Ctrl+` to open the ST console
  2. type sublime.log_commands(True) in the console and press Enter
  3. use Ctrl+Backspace to delete something
  4. see what command is executed from the console
  5. it should show command: delete_word {"forward": false}
0 Likes

#8

The command is the same with yours:
command: delete_word {"forward": false}

0 Likes

#9

Unfortunately, I do not know what’s wrong then. :frowning:

0 Likes

#10

I finally find the reason why the word_separators fails while I am editing the .tex files:
The default settings of LaTeX in the LaTeX.sublime-settings already has an setting of word_separators.
This will override the global settings of Sublime.

Just use PackageResourceViewer to open the LaTeX > LaTeX.sublime-settings, delete the word_separators setting, and then everything will work.

1 Like