wyc9296

实现像 html li*3 这样自动展开的插件

  •  
  •   wyc9296 · Mar 7, 2024 · 2000 views
    This topic created in 824 days ago, the information mentioned may be changed or developed.

    html 的 Emmet abbreviation expansion 的功能很酷! 比如说输入ul>li*3,会自动展开成

    <ul>
    	<li> </li>
    	<li> </li>
    	<li> </li>
    </ul>
    

    最新正在给新语言写一个代码提示插件,想引入这个功能,但是不想要 html 的标记符号,只需要类似于将abc*3展开成abcabcabc就行了,貌似 code snippet 不支持(如果支持操作符或者内嵌 js 就好了)吧?兄弟们有没有办法,求!

    2 replies    2024-03-07 09:44:52 +08:00
    fyq
        1
    fyq  
       Mar 7, 2024
    可以去 emmet 的源码那里改改:

    https://github.com/emmetio/emmet

    Platform for new tools
    Dig into Emmet source code and re-use its modules to create your very own and unique actions.
    wyc9296
        2
    wyc9296  
    OP
       Mar 7, 2024
    @fyq 感谢大佬,只是有点难啊😂
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1160 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 23:11 · PVG 07:11 · LAX 16:11 · JFK 19:11
    ♥ Do have faith in what you're doing.