zoukankan      html  css  js  c++  java
  • vim代码片段插件ultisnips的使用

    ultisnips是一个可以自动进行代码补全的插件,可以通过Vundle进行安装,要启用ultisnips,首先可以下面的配置信息写入到~/.vimrc

    " Track the engine.
    Plugin 'SirVer/ultisnips'
    
    " Snippets are separated from the engine. Add this if you want them:
    Plugin 'honza/vim-snippets'
    
    " Trigger configuration. Do not use <tab> if you use https://github.com/Valloric/YouCompleteMe.
    let g:UltiSnipsExpandTrigger="<c-b>"
    let g:UltiSnipsJumpForwardTrigger="<c-b>"
    let g:UltiSnipsJumpBackwardTrigger="<c-z>"
    
    " If you want :UltiSnipsEdit to split your window.
    let g:UltiSnipsEditSplit="vertical"
    

    请注意我这边设置通过ctrl+b触发代码补全,因为我已经安装了YouCompleteMe插件,所以能使用tab来触发补全
    配置完成后使用在vim中使用:PluginInstall安装插件
    我们也可以自己定义语法,格式如下:

    snippet 触发字符 ["代码片段说明" [参数]]
    代码片段内容
    endsnippet
    
  • 相关阅读:
    判断当前时间为星期几
    springboot+mysql数据源切换
    表单上传图片
    po,vo,bo,dto,dao解释
    生成电脑的SSH key
    单例模式
    事物的特性和隔离级别
    springAOP自定义注解讲解
    Spring依赖注入(DI)的三种方式
    redis持久化
  • 原文地址:https://www.cnblogs.com/zmichael/p/12286036.html
Copyright © 2011-2022 走看看