FuzzyFilePath
FuzzyFilePath copied to clipboard
How to "replace_on_insert" on key binding, not auto_complete_trigger
Hey,
I've got a lil problem.
replace_on_insert
works like a charm when it's auto_complete_trigger
ed like:
{
"debug": false,
"exclude_folders": ["node_modules", "bower_components", "src_legacy", "dist"],
"additional_scopes": [
{
// es6 import from/import "*"
"scope": "string.quoted.double.js.fjsx15",
"auto": true,
"relative": false,
"base_directory": false,
"prefix": ["from", "import"],
"extensions": ["ts", "js", "html", "scss", "json"],
"replace_on_insert": [
["/src/", "~/"],
["\\.(js|ts)$", ""],
["([^.])\\/index$", "\\1"],
["^([\\/.]+)?\\/(bower_components|node_modules)\\/", ""]
]
}
]
}
"auto_complete_triggers":
[
{
"characters": "abcdefghijklmnopqrstuvwxyz",
"selector": "string.quoted.double.js.fjsx15"
}
],
but when I use the keyboard combo, the replace_on_insert doesn't apply, do you know why?
Actually no. I am using the default rule for this scope and the regex gets applied for absolute and relative insertions. Do you run on windows or get any error messages in the console?