Use snippets in vim
来源:互联网 发布:上海网页美工培训班 编辑:程序博客网 时间:2024/04/30 15:34
0. Introduce
Code snippet is much useful to speed up coding.It allows concentrating more on the main logic. It is code reuse for programmers.
1. Install
- Install vim. You may refer to this blog.
- If you have already vim installed, add below to .vimrc and PluginInstall.
Plugin 'SirVer/ultisnips'Plugin 'honza/vim-snippets'let g:UltiSnipsExpandTrigger="<tab>"let g:UltiSnipsJumpForwardTrigger="<c-b>"let g:UltiSnipsJumpBackwardTrigger="<c-z>"
2. How
After installation, everything is ready. Have a look at this gif:
Cool, HA?
Use three kinds of keys:
1. tab to trigger expand.
2. control+b to jump forward.
3. control+z to jump backward.
Of course, you can change them in vimrc.
3. More snippets
You can refer to here to find how many snippets you can use. They are also stored in ~/.vim/bundle/vim-snippets/snippets.
If you want to add you own snippets, create a folder named UltiSnips in ~/.vim/. And add you own snippets file in that folder. Refer to those examples to find how to write snippets.
0 0
- Use snippets in vim
- 【skill】Use snippets in vim
- use cscope in vim
- use python in vim script of ~/.vimrc
- How to use Terminal in Vim
- How to use marks in Vim
- TextMate-style snippets for Vim
- vim-snippets Ultisnips的写法
- Handling snippets in Flex Builder
- vim-use
- Use Vim
- Use Vim
- Pasting code with syntax coloring in emails use VIM
- Vim 中的snippets 插件 和 paste 冲突
- Working With Code Snippets In Sublime Text
- use vim effectively
- How to use VIM?
- Linux:vim basic use
- UNIX网络编程笔记 第七章 套接字选项
- 使用cairo绘制图形的部分函数总结
- objc runtime
- 设计模式
- Rsync
- Use snippets in vim
- React-Native初体验一(window环境下开发)
- 华信9月11日上课心得
- 使用FireFox插件RESTClient、HttpRequester模拟http(get post)请求
- N的阶乘的长度(斯特林)
- Linux下的V4L2的API编程总结
- 个人网站配置HTTPS
- MySql5.7 zip windows安装教程
- spring boot 学习笔记(005)提交json对象