简体   繁体   English

vim-snipmate 更改结束光标位置

[英]vim-snipmate change end cursor location

I have just started using vim-snipmate so i might be doing it the wrong way.我刚刚开始使用vim-snipmate所以我可能做错了。 I defined a custom snippet like我定义了一个自定义片段,如

snippet model
  const mongoose = require('mongoose');
  module.exports = mongoose.model('${1}',mongoose.Schema({
    ${2}
  }));

The problem is that till ${1} it all works fine but in ${2} i want to use some other of my snippets but the moment i use TAB it assumes the end of $2 and jumps to the end.问题是,直到${1}一切正常,但在${2}我想使用我的其他一些片段,但是当我使用TAB它假定$2的结尾并跳转到结尾。 How can i change that behaviour if it is possible.如果可能,我该如何改变这种行为。 Or am i going some wrong way of defining snippets in here ?或者我在这里定义片段的方式有误?

如果您想在该位置使用代码段,请将${2}更改${2} ${0}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM