corvofeng

Results 21 comments of corvofeng

![image](https://user-images.githubusercontent.com/12025071/74239914-d155cd00-4d13-11ea-8bf9-781428312a85.png) 只有$2是因为第二个VISUAL里面是空的哈, 留不留VISUAL都是可以的.

> Web 版我倒是没有考虑过,但是应该也不难,因为我觉着 `fs` 模块肯定是要适配一下的,对多数插件应该都没有影响。 我们用的fs模块是node的fs模块, 在浏览器中是不能用的吧

恩, 详细看了一下文档, 这里的VISUAL, 替换成TM_SELECTED_TEXT才是比较合适的 ![Peek 2020-02-15 11-54](https://user-images.githubusercontent.com/12025071/74581391-f2574000-4fe9-11ea-9a48-d581b7846739.gif) ![Peek 2020-02-15 11-55](https://user-images.githubusercontent.com/12025071/74581416-27fc2900-4fea-11ea-8eee-10c2f02c15e8.gif)

Vsnips的`!p`功能需要用`js`代码来写, 不能直接使用`Python`代码 可以参考这里: https://github.com/corvofeng/Vsnips/wiki/Vsnips-%E7%94%A8%E6%88%B7%E8%87%AA%E5%AE%9A%E4%B9%89js%E5%87%BD%E6%95%B0 https://github.com/corvofeng/Vsnips/wiki/Vsnips-%E7%A4%BA%E4%BE%8B%E7%89%87%E6%AE%B5

如果你的函数是通用的, 可以考虑提PR加到这里, 让所有用户都能使用 https://github.com/corvofeng/Vsnips/blob/master/src/script_tpl.ts

> 目前Vsnip插件默认包含的snippet里面有大量是用!p的声明,而且似乎很多都无法使用,请问是我的设置问题还是这个预制snippet文件本身就不能用呢? `!p`表示的是用 Python 解释器执行, VS Code 里面没法这么用, 需要重新编写一份 JavaScrip 代码用于执行, 类似 ![image](https://user-images.githubusercontent.com/12025071/139227153-8ea356de-6d31-497a-9b7f-3fe0996f3539.png) 有哪些是你认为比较需要的呢, 可以考虑默认支持.

![Peek 2019-11-28 21-08](https://user-images.githubusercontent.com/12025071/69809958-ccf63980-1225-11ea-8485-c3d37a4869f3.gif) ![Peek 2019-11-28 21-07](https://user-images.githubusercontent.com/12025071/69809967-d2ec1a80-1225-11ea-88e2-08cb45ce60db.gif)

I've encountered the same problem, I use this script to reload plasma after reboot. ``` systemctl --user restart plasma-plasmashell ```