Ваші коментарі
This is actually a typical limitation of most regex implementations, because basic regex substitution really only works with the text chunks and has no built-in facility for doing computations against the text chunks. Arguably this is the right behavior for the regex standard, as it would otherwise have to embed a full-fledged programming language in the replacement syntax to account for any desired transforms.
Most modern programming languages -- like Python, which ST2 is written in -- will indeed allow you to apply custom functions to captured match-groups.
So, a more comprehensive solution might be to let us embed simple Python expressions in the ST2 "replace with" box that would let us perform computations as desired. For example, a syntax looking something like this might do the trick:
Search regex: (\d+)
Replace with: ${int($1) + 1}
In this example ST2 would recognize a special pattern of
${PYTHON_FUNCTION}
and implicitly give $n the value of the corresponding capture group within the function.
This approach could open up some very interesting possibilities for doing regex replacement...
${$1.upper()}
${max($1, $2)}
etc.
"word_separators": "/\\()\"'-:,;<>~!@#$%^&*|+=[]{}`~?",
{ "keys": ["escape", "g"], "command": "show_overlay", "args": {"overlay": "goto", "text": ":"}},
This makes "escape, g" perform "goto line". I just copied the command & args portion from the existing "ctrl+g" entry in the default .sublime-keymap file.
As far as I can tell this does not interfere with ST2's other uses of the Escape key.
For the cursor, the closest built-in option available seems to be setting this in your Preferences.sublime-settings:
"caret_style": "smooth",
"wide_caret": true,
Also you might want to check out the SublimeBlockCursor plugin, which tries to mimic a "real" block cursor.
However I would think this behavior could be mimicked with an ST2 plugin. Basically, when you run a certain plugin-command, the plugin would open a local HTML file in the system web browser which contains Javascript that handles the "browser side" live-updating of your ST2 buffer. On the ST2 side, the plugin would then write the contents of your current buffer out to a temp file whenever you stop typing (after a brief delay). The browser-side JS would check for modifications to this temp file every second, and whenever a change is detected, update the displayed page using DHTML insertion.
Служба підтримки клієнтів працює на UserEcho
{ "keys": ["ctrl+k", "ctrl+0"], "command": "unfold_all" },
{ "keys": ["ctrl+k", "ctrl+j"], "command": "unfold_all" },
I guess the Ctrl+J shortcut is the one that is shown in the dropdown menu because it's the last one in the file. I'm not sure why the Ctrl+J version is even in there.