Ваші коментарі

It's not just TextEdit but every text box in OSX that has this behavior. As such it's a little strange when it doesn't work in Sublime Text.
You can use view.settings().set("command_mode",True) to stop text from being echoed into the buffer... and... I don't know how you'd actually grab the keypresses other than having a keybinding + plugin for each key, which wouldn't be super hard but would be super annoying.
I know three things: the file format is JSON, JavaScript has no integer types, and when you want to get integers using View.settings().get(), you have to use int() on the result.
That doesn't explain why the number gets rounded a bit when it gets written back to the file, though.
I do know that if you change your color scheme the user file prefs file gets rewritten. When it gets rewritten it appears that the lines in the file also get sorted alphabetically.
This is to avoid 0-length searches? I just pushed a change that does that... :P
I think strip is still needed, because if you have a line that's only whitespace, then selecting that whole line (without the newline) will pass the len(sel) == len(view.word(sel)) check.
I'm not sure I understand the question? Maybe it's because I didn't add the strip change before I committed and pushed...
Regardless, strip is now actually actually in there, and I also changed it so it only searches when you've got an entire word selected rather than when you've got a certain number of characters selected.
Pushed. The number of characters a selection needs to be (>2) isn't a user pref, because I was lazy or whatever, but it's there. I also use sublime.LITERAL instead of re.escape—I'm a bit embarrassed to admit that I didn't know that flag existed.
Oh no way! I thought all the OP_* flags were for View.find_all. Oops!
Thanks! Makes my life easy. :)
I've changed it so it strip()s and checks the selection length, but it turns out that re.escape is the most worthless function in the world... I need to find another way to escape the strings before I push it to github. Just a moment...