![Release](https://camo.githubusercontent.com/44875f675634bf0b01982c8c74f7748e6ff574ddbe938ae84f1c85a1841f7f04/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f79616e7164302f76696d66696c65732e737667)
This is a collection of my personal snippets in Vim.
Make sure the Vim plug-in SirVer/ultisnips is installed and accessable in your Vim editor.
If you use Vundle.vim, it is like this:
Plugin 'SirVer/ultisnips'
Plugin 'yanqd0/snippets-for-vim'
UltiSnips
is the default path of SirVer/ultisnips If you changed that, make sure UltiSnips
is always included in your vimrc
.
let g:UltiSnipsSnippetDirectories = [
\ "your_personal_snippets_directory",
\ "UltiSnips"
\ ]
Trigger |
Description |
helloworld |
A basic "Hello world!" demo |
function |
A function block |
if |
if block |
ife |
if else block |
ifi |
if elseif block |
ifie |
if elseif else block |
todo |
# TODO comment |
fixme |
# FIXME comment |
xxx |
# XXX comment |
Trigger |
Description |
helloworld |
A basic "Hello world!" demo |
class |
A public class, named after file |
iclass |
A inner class |
interface |
A interface |
if |
if () {} block |
ife |
if () {} else () {} block |
ifi |
if () {} else if () {} block |
ifie |
if () {} else if () {} else {} block |
do |
do {} while (); block |
while |
while () {} block |
for |
for () {} block |
tryc |
try {} catch() {} block |
tryf |
try {} finally {} block |
trycf |
try {} catch() {} finally {} block |
sync |
synchronized () {} block |
todo |
// TODO comment |
fixme |
// FIXME comment |
xxx |
// XXX comment |
Trigger |
Description |
helloworld |
A basic "Hello world!" demo |
#! |
#! block, file header |
main |
main block |
class |
A new class |
if |
if block |
ife |
if else block |
ifi |
if elif block |
ifie |
if elif else block |
while |
while block |
for |
for in block |
trye |
try except block |
tryf |
try finally block |
tryef |
try except finally block |
todo |
# TODO comment |
fixme |
# FIXME comment |
xxx |
# XXX comment |
Trigger |
Description |
helloworld |
A basic "Hello world!" demo |
#! |
#! block, file header |
function |
A function block |
if |
if block |
ife |
if else block |
ifi |
if elif block |
ifie |
if elif else block |
case |
case esac block |
select |
select do done block |
until |
until do done block |
while |
while do done block |
for |
for do done block |
todo |
# TODO comment |
fixme |
# FIXME comment |
xxx |
# XXX comment |
Trigger |
Description |
snip |
Add a new snippet. |
glob |
Add a global block. |
Trigger |
Description |
MIT |
Add a MIT License full text. |
Apache2 |
Add an Apache License 2.0 full text. |
#Apache2 |
Add a # comment header of Apache2 . |
/*Apache2 |
Add a /* comment */ header of Apache2 . |
!-Apache2 |
Add a <!-- comment --> header of Apache2 . |
GPLv2 |
Add a GNU General Public License Version 2 full text. |
#GPLv2 |
Add a # comment header of GPLv2 . |
/*GPLv2 |
Add a /* comment */ header of GPLv2 . |
!-GPLv2 |
Add a <!-- comment --> header of GPLv2 . |
GPLv3 |
Add a GNU General Public License Version 3 full text. |
#GPLv3 |
Add a # comment header of GPLv3 . |
/*GPLv3 |
Add a /* comment */ header of GPLv3 . |
!-GPLv3 |
Add a <!-- comment --> header of GPLv3 . |
![License](https://camo.githubusercontent.com/b75ce0a4bcc15adbf276416644ee7f9877dc236331dd3986cda353cf4bd5be9c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f79616e7164302f736e6970706574732d666f722d76696d2e737667)
The MIT License (MIT)
Copyright (c) 2016 yanqd0@outlook.com