Comments (10)
根据后缀名,比如后缀名是sh
就会加载sh.snippets
from k-vim.
你好,我刚试了一下我只有将all.snippets
直接替换成比如c.snippets
才会有补全效果
from k-vim.
准确来说不是后缀名……而是Vim所识别的filetype
,如果filetype是c的话,就会加载c.snippets
from k-vim.
UltiSnips这个,配置了一份snippets集合 https://github.com/honza/vim-snippets
里面有对应代码片段,默认会自动加载对应类型的文件
all.snippets对所有类型文件生效
确认下是否都安装成功
from k-vim.
恩...我想我都有安装成功,filetype
类型检测也确认打开了,也手动设置过,不管filetype
是什么,它好像只会加载all.snippets
,其他的.snippets
都没有加载的样子
from k-vim.
确认下你是否是正常安装结束
默认安装后使用应该是正常的,python/golang等都正常
c的我也测试过,例如输入def按自动转#define
有没有改了什么配置?
" 代码片段快速插入
Bundle 'SirVer/ultisnips'
" 代码片段资源,需要学习
" Snippets are separated from the engine. Add this if you want them:
Bundle 'honza/vim-snippets'
let g:UltiSnipsExpandTrigger = "<tab>"
let g:UltiSnipsJumpForwardTrigger = "<tab>"
" 定义存放代码片段的文件夹 .vim/additional_snippets下,使用自定义和默认的,将会的到全局,有冲突的会提示
let g:UltiSnipsSnippetDirectories=["additional_snippets", 'UltiSnips']
from k-vim.
刚刚重新安装了一次,确认安装成功,配置是相同的,不过还是不会正常加载应该加载的类型,另外请问一下
let g:UltiSnipsSnippetDirectories=["additional_snippets", 'UltiSnips']
中的"additional_snippets"
为代码片段的文件夹那第二个'UltiSnips'
指的是什么呢(?)
from k-vim.
会将.vim目录下所有名字叫"additional_snippets", 'UltiSnips' 的目录下的文件加载进来
去看下 UltiSnips 插件的文档吧,看能不能解决
搞不定的话,换snipmate这个插件试试
from k-vim.
好的,感谢
from k-vim.
遇到同样的问题,不知道是否已经解决
from k-vim.
Related Issues (20)
- 如何修改 flake8 中最大行为 80 的设置? HOT 6
- mac安装完,无法正确代码提示 HOT 2
- k-vim + k-tmux 显示冲突 HOT 1
- 鼠标复制黏贴,貌似会一直缩进 HOT 3
- 插件推荐 HOT 1
- mac mini,安装完k-vim后键盘无法无法输入 HOT 4
- 为什么我在执行“PlugInstall”的时候,总会卡在"vim-ctrlspace: remote: Compressing",其他的插件都显示“Already installed”
- 请问怎么关闭语法检查啊,就是两个大于号 >> HOT 2
- 大神能不能集成下 gtags/cscope 的插件进来 HOT 2
- 如何不重启vim关闭YCM的Diagnostics HOT 1
- 行前面有#号怎么去掉?
- 无鼠标模式下(set mouse-=a)鼠标滚轮无法移动光标
- 更新了mac catalina后不能工作了,vim打开后就直接卡死了 卸载重新安装也解决不了 HOT 1
- 为什么不集成 ctags 到k-vim里面来呢 HOT 1
- 如何固定左侧的NERD_TREE, 使用t打开新的多个tab,每个都能够看到 NERD_TREE
- support coc.vim
- 9.3 CHANGE LOG
- airline显示不正常 HOT 4
- .ts文件应该如何配置 HOT 3
- 配置怎么把相对行号改为绝对行号
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from k-vim.