aptend

Results 70 comments of aptend

看起来是 '【' -> '【' + '】' 没有正常工作,但我的机器上没有复现相同的问题。 ![sample](https://user-images.githubusercontent.com/49832303/190850490-89723180-0595-4c06-8031-6689f401d36b.gif) 其他两侧插入的规则的情况呢,比如 `'k' -> 'k' + 'k'` 能出现 `k所选词语k` 吗? 另外可以提供一下你目前的规则配置和所装的插件列表?不清楚是不是和其他插件有冲突

感觉很可能是输入法的问题,从视频上看,输入法在输入 【 前已经将选中区域置空了,然后再输入 【,这会命中 '【|' -> '【|】' 规则,于是出现成对的【】。 @tyf2018 你可以到插件目录下把的 data.json 里面的 debug 字段改为 true ,重启 obsidian,然后在 obsidian 的调试台(ctrl-shift-i) 确定下字符输入的过程 选中区域再输入 【,成功转换后只会打印类似这样的两行记录 ![image](https://user-images.githubusercontent.com/49832303/190858989-a0417f4d-bbb8-493d-8884-2d925bdf32f0.png)

> 另外这是控制台中的截图 ![image](https://user-images.githubusercontent.com/56342788/190880895-fc5d0da1-77ad-4d45-9a01-1a620aa50b23.png) 这里确实是先插入了一个空格,完成内容替换后才触发 ’【|' -> '【|】' 的…… 你平时输入【不会插入空格是吧?我觉得大概率是的,不然你也不用这输入法了 😂 , 如果是这样,我还没想到这个空格的原理是什么,但感觉插件好像不好处理,暂时没什么想法

Thanks for the question, but the answer is no, regex replacing is not supported yet. And I think what you want may be this https://github.com/Gru80/obsidian-regex-replace

Yeah, I do have a plan for that, but there are some technical problems in implementing it efficiently. I will think about it, please stay tuned.

The main issue is performance. A regex pattern can match a long text, so how much text should be extracted to be parsed when typing a char? The entire line...

Leaving a comment here as a reminder. One possible way is first to ignore all captures, combine all patterns into one state machine, and walk the input string through it...

Sorry for the delay. I'm working on this recently and I have a question to discuss. In your example, `r/obsidian` is wanted to be recognized by `(r/.*)` as typing, right?...

It seemed that I didn't make myself clear. The feature we want is `automatically replace text as I'm typing`, as you said. Now let's imagine that the plugin allows us...

So you are comfortable with adding a specific suffix, like `. `, to trigger the replacement, right? And what does `only look at text the user had just typed` mean,...