Emacs 中如何生成注释

一些 mode 中是有快捷键生成函数或变量注释的,但是没有的情况大家一般是怎么生成的? 比如底下这种格式

/**
 * BarChart.
 */

export default class Bar {

  /**
   * Construct with the given `config`.
   */

  constructor (options) {
    this.set(options)
    this.init()
  }

  /**
   * Set configuration options.
   */

  set (options) {
    Object.assign(this, defaults, options)
  }

请不要用图片贴代码。

谢谢指正,一时捉急

2 个赞

你可以写个 snippet 来生成注释吧?

Thanks, 搞定