How to use a template in vim

前端 未结 7 1978
一个人的身影
一个人的身影 2020-12-08 02:40

This is really a newbie question - but basically, how do I enable a template for certain filetypes.

Basically, I just want the template to insert a header of sorts,

相关标签:
7条回答
  • 2020-12-08 03:32

    There exist many template-file expanders -- you'll also find there explanations on how to implement a rudimentary template-file expander.

    For my part, I'm maintaining the fork of muTemplate. For a simple start, just drop a {ft}.template file into {rtp}/template/. If you want to use any (viml) variable or expression, just do. You can even put vim code (and now even functions) into the template-file if you wish. Several smart decisions are already implemented for C++ and vim files.

    0 讨论(0)
提交回复
热议问题