Version 4.1 Fatal: split default snippets repository

This commit is contained in:
Shougo Matsushita 2014-01-11 16:29:00 +09:00
parent dcf2d8518c
commit 5dba6a034e
48 changed files with 43 additions and 4586 deletions

View File

@ -11,10 +11,15 @@ snipMate.vim or snippetsEmu.vim. But since you can choose snippets with the
have less trouble using them, because you do not have to remember each snippet
name.
Note: Default snippets are required! You must install them or disable runtime
snippets by `g:neosnippet#disable_runtime_snippets`.
Default snippets files are available in:
[neosnippet-snippets](https://github.com/Shougo/neosnippet-snippets)
Note: neocomplcache/neocomplete is NOT required! But recommended.
Extra snippets files are available in:
[neosnippet-snippets](https://github.com/Shougo/neosnippet-snippets)
[vim-snippets](https://github.com/honza/vim-snippets)
Installation
@ -28,16 +33,19 @@ required files into your `.vim` folder.
1. Install the
[neocomplcache](https://github.com/Shougo/neocomplcache.vim)/
[neocomplete](https://github.com/Shougo/neocomplete.vim) plugin first.
[neocomplete](https://github.com/Shougo/neocomplete.vim) and
[neosnippet-snippets](https://github.com/Shougo/neosnippet-snippets)
first.
2. Put files in your Vim directory (usually `~/.vim/` or
`%PROGRAMFILES%/Vim/vimfiles` on Windows).
### Vundle
### Vundle
1. Setup the [vundle](https://github.com/gmarik/vundle) package manager
2. Set the bundles for [Neocomplcache](https://github.com/Shougo/neocomplcache)
2. Set the bundles for [neocomplcache](https://github.com/Shougo/neocomplcache)
or [neocomplete](https://github.com/Shougo/neocomplete.vim)
And [Neosnippet](https://github.com/Shougo/neosnippet)
And [neosnippet](https://github.com/Shougo/neosnippet)
And [neosnippet-snippets](https://github.com/Shougo/neosnippet-snippets)
```vim
Bundle 'Shougo/neocomplcache'
@ -45,16 +53,18 @@ required files into your `.vim` folder.
Bundle 'Shougo/neocomplete'
Bundle 'Shougo/neosnippet'
Bundle 'Shougo/neosnippet-snippets'
```
3. Open up Vim and start installation with `:BundleInstall`
### Neobundle
### Neobundle
1. Setup the [neobundle](https://github.com/Shougo/neobundle.vim) package manager
2. Set the bundles for [Neocomplcache](https://github.com/Shougo/neocomplcache)
1. Setup the [neobundle](https://github.com/Shougo/neobundle.vim) package manager
2. Set the bundles for [neocomplcache](https://github.com/Shougo/neocomplcache)
or [neocomplete](https://github.com/Shougo/neocomplete.vim)
And [Neosnippet](https://github.com/Shougo/neosnippet)
And [neosnippet](https://github.com/Shougo/neosnippet)
And [neosnippet-snippets](https://github.com/Shougo/neosnippet-snippets)
```vim
NeoBundle 'Shougo/neocomplcache'
@ -62,6 +72,7 @@ required files into your `.vim` folder.
NeoBundle 'Shougo/neocomplete'
NeoBundle 'Shougo/neosnippet'
NeoBundle 'Shougo/neosnippet-snippets'
```
3. Open up Vim and start installation with `:NeoBundleInstall`
@ -73,7 +84,7 @@ required files into your `.vim` folder.
2. Add `neosnippet` to the list of addons in your vimrc:
```vim
call vam#ActivateAddons(['neosnippet'])
call vam#ActivateAddons(['neosnippet', 'neosnippet-snippets'])
```
. Installation will start automatically when you open vim next time.
@ -115,7 +126,7 @@ built-in ones, then you can set a path to the snippets with
the `g:neosnippet#snippets_directory` variable (e.g [Honza's
Snippets](https://github.com/honza/vim-snippets))
But if you enable g:neosnippet#enable_snipmate_compatibility, neosnippet will
But if you enable `g:neosnippet#enable_snipmate_compatibility`, neosnippet will
load snipMate snippets from runtime path automatically.
```vim

View File

@ -45,6 +45,12 @@ function! s:initialize_script_variables() "{{{
" Set runtime dir.
let runtime_dir = neosnippet#variables#runtime_dir()
let runtime_dir += split(globpath(&runtimepath, 'neosnippets'), '\n')
if empty(runtime_dir) && !g:neosnippet#disable_runtime_snippets
call neosnippet#util#print_error(
\ 'neosnippet default snippets cannot be loaded.')
call neosnippet#util#print_error(
\ 'You must install neosnippet-snippets or disable runtime snippets.')
endif
if g:neosnippet#enable_snipmate_compatibility
" Load snipMate snippet directories.
let runtime_dir += split(globpath(&runtimepath,

View File

@ -1,7 +1,7 @@
*neosnippet.txt*
The neo-snippet plugin contains snippet source
Version: 4.0
Version: 4.1
Author: Shougo <Shougo.Matsu@gmail.com>
License: MIT license {{{
Permission is hereby granted, free of charge, to any person obtaining
@ -54,10 +54,15 @@ Note: If you want to complete snippets, you must install neocomplcache
(https://github.com/Shougo/neocomplcache.vim) or
neocomplete(https://github.com/Shougo/neocomplete.vim).
Note: Default snippets are required! You must install them or disable runtime
snippets by |g:neosnippet#disable_runtime_snippets|.
Default snippets files are available in:
https://github.com/Shougo/neosnippet-snippets
Note: neocomplcache or neocomplete is NOT required! But recommended.
Extra snippets files are available in:
https://github.com/Shougo/neosnippet-snippets
https://github.com/honza/vim-snippets
Note: To enable context filetype feature, you must install
@ -744,5 +749,13 @@ Q: I want to delete markers when InsertLeave event.
A: You can use |:NeoSnippetClearMarkers| command. >
autocmd InsertLeave * NeoSnippetClearMarkers
Q: Why did you split default snippets?
A: Because, users should choose default snippet collection.
neosnippet has many forks, but almost forked users change default snippet
files.
https://github.com/Shougo/neosnippet.vim/network
If splitted default snippets, users can fork and change it easily.
==============================================================================
vim:tw=78:ts=8:ft=help:norl:noet:fen:noet:

View File

@ -1,7 +0,0 @@
snippet source-rubygems
options head
source :rubygems
snippet gem
options head
gem '${1}', '${2} >= 1.0'

View File

@ -1,25 +0,0 @@
# Global snippets
snippet date
options word
`strftime("%d %b %Y")`
snippet date_full
alias df
options word
`strftime("%Y-%m-%dT%H:%M:%S")`
snippet date_day
alias dd
options word
`strftime("%Y-%m-%d")`
snippet date_time
alias dt
options word
`strftime("%H:%M:%S")`
snippet lastmod
abbr Last modified time
alias lmod
Last Modified: `strftime("%Y-%m-%dT%H:%M:%S")`

View File

@ -1,265 +0,0 @@
snippet ec
#endinitclip
snippet inc
#include "${1}"
snippet br
break;
snippet ca
call(${1:#:frame});
snippet case
abbr ce
case ${1:#:expression} :
${1:TARGET}
snippet catch
abbr ch
catch ($1) {
$2
}
snippet class
class ${1:#:ClassName} {
var _${2};
function ${1}(${2}){
_${2} = ${2};${0}
}
}
snippet co
continue;
snippet dt
default :
${1:TARGET}
snippet de
delete ${1};
snippet do
do {
${1:TARGET}
} while (${2:#:condition});
snippet dm
duplicateMovieClip(${1:#:target}, ${2:#:newName}, ${3:#:depth});
snippet ei
else if (${1}) {
${2:TARGET}
}
snippet fori
abbr fi
for (var ${1} in ${2}){
${3:TARGET}
};
snippet for
abbr fr
for (var ${1} = 0; $1 < ${2}.length; $1++) {
${0:TARGET}
};
snippet fs
fscommand(${1:#:command}, ${2:#:paramaters});
snippet fn
function ${1}(${2}):${3}{
${0:TARGET}
};
snippet gu
getURL(${1});
snippet gp
gotoAndPlay(${1});
snippet gs
gotoAndStop(${1});
snippet if
if (${1}) {
${0:TARGET}
}
snippet il
ifFrameLoaded (${1}) {
${0:TARGET}
}
snippet ip
import ${1};
snippet it
interface ${1}{
${0:TARGET}
}
snippet lm
loadMovie(${1:url}, ${2:target}, ${3:method});
snippet ln
loadMovieNum(${1:url}, ${2:level}, ${3:method});
snippet lv
loadVariables(${1:url}, ${2:target}, ${3:method});
snippet vn
loadVariables(${1:url}, ${2:level}, ${3:method});
snippet mc
MovieClip
snippet nf
nextFrame();
snippet ns
nextScene();
snippet on
on (${1}) {
${2}
};
snippet oc
onClipEvent (${1}) {
${0:TARGET}
};
snippet pl
play();
snippet pf
pravFrame();
snippet ps
prevScene();
snippet pr
print(${1:#:target}, ${2:#:type});
snippet bn
printAsBitmapNum(${1:#:level}, ${2:#:type});
snippet pn
printNum(${1:#:level}, ${2:#:type});
snippet rm
removeMovieClip(${1:#:target});
snippet rt
return ${1};
snippet sp
setProperty(${1:#:target}, ${2:#:property}, ${3:#:value});
snippet sv
set(${1:#:name}, ${2:#:value});
snippet dr
startDrag(${1:#:target}, ${2:#:lockcenter}, ${3:#:l}, ${4:#:t}, ${5:#:r}, ${6:#:b} );
snippet st
stop();
snippet ss
stopAllSounds();
snippet sd
stopDrag();
snippet sw
switch ( ${1:#:condition} ) {
${0:TARGET}
}
snippet tt
tellTarget( ${1:#:target} ) {
${0:TARGET}
}
snippet th
throw ${1};
snippet tq
toggleHighQuality();
snippet tr
trace(${1:"$0"});
snippet ty
try {
${0:TARGET}
};
snippet um
unloadMovie(${1:#:target});
snippet un
unloadMovieNum(${1:#:level});
snippet vr
var ${1}:${2};
snippet wh
while (${1:#:condition}) {
${0:TARGET}
};
snippet wt
with (${1:#:target});
${0:TARGET}
};

View File

@ -1,22 +0,0 @@
snippet allow
AllowOverride ${1:#:AuthConfig} ${2:#:FileInfo} ${3:#:Indexes} ${4:#:Limit} ${5:#:Options}
snippet opt
Options ${1:#:All} ${2:#:ExecCGI} ${3:#:FollowSymLinks} ${4:#:Includes} ${5:#:IncludesNOEXEC} ${6:#:Indexes} ${7:#:MultiViews} ${8:#:SymLinksIfOwnerMatch}
snippet vhost
<VirtualHost ${1:example.org}>
ServerAdmin webmaster@${1}
DocumentRoot /www/vhosts/${1}
ServerName ${1}
ErrorLog logs/${1}-error_log
CustomLog logs/${1}-access_log common
</VirtualHost>
snippet dir
<Directory ${1:/Library/WebServer/}>
${0}
</Directory>

View File

@ -1,185 +0,0 @@
snippet script
script ${1:#:new_object}
on run
${2:TARGET}
end run
end script
snippet on
on ${1:#:functionName}(${2:#:arguments})
${3:TARGET}
end ${1}
snippet tell
tell ${1:#:app}
${0:TARGET}
end tell
snippet terms
using terms from ${1:#:app}
${0:TARGET}
end using terms from
snippet if
if ${1:true} then
${0:TARGET}
end if
snippet rept
abbr rep
repeat ${1} times}
${0:TARGET}
end repeat
snippet repwh
abbr rep
repeat while ${1:#:condition}
${0:TARGET}
end repeat
snippet repwi
abbr rep
repeat with ${1} in ${2}
${0:TARGET}
end repeat
snippet try
try
${0:TARGET}
on error
-- error handling
end try
snippet timeout
with timeout ${1:#:number} seconds
${0:TARGET}
end timeout
snippet con
considering ${1:#:case}
${0:TARGET}
end considering
snippet ign
ignoring ${1:#:application responses}
${0:TARGET}
end ignoring
snippet shell
${1:#:set shell_stdout to }do shell script ${3:"${2:#script}"}
without altering line endings
${0}
snippet delim
set oldDelims to AppleScript's text item delimiters
set AppleScript's text item delimiters to {"${1:,}"}
${0:#:TARGET}
set AppleScript's text item delimiters to oldDelims
snippet parent
prop parent : app "${1}"
snippet alert
display alert "${1:#:alert text}"
${2:#:message} "${3:#:message text}"
${4:#:as warning}
snippet dialog_OK
abbr dialog
display dialog "${1:#:text}"
${2:#:with icon} ${3:1}
buttons {"${4:OK}"} default button 1
snippet dialog_OK/Cancel
abbr dialog
display dialog "${1:#:text}"
${2:#:with icon}
buttons {"${3:Cancel}", "${4:OK}"}
default button "${4}"
set button_pressed to button returned of result
if button_pressed is "${4}" then
${5:#:TARGET}
else
-- action for cancel button goes here
end if
snippet dialog_OK/Cancel/Other
abbr dialog
display dialog "${1:#:text}"
${2:#:with icon}
buttons {"${3:Cancel}", "${4:Other Choice}", "${5:OK}"}
default button "${5}"
set button_pressed to button returned of result
if button_pressed is "${5}" then
${6:TARGET}
else if button_pressed is "${3}" then
-- action for cancel button goes here
else
-- action for other button goes here
end if
snippet dialog_TextFierld
abbr dialog
set the_result to display dialog "${1:#:text}"
default answer "${2:#:type here}"
${3:#:with icon}
buttons {"${4:Cancel}", "${5:OK}"}
default button "${5}"
set button_pressed to button returned of the_result
set text_typed to text returned of the_result
if button_pressed is "${5}" then
${6:#:TARGET}
else
-- action for cancel button goes here
end if
snippet choose_Applications
abbr choose
${1:#:set the_application to }choose application with prompt "${2:#:Choose an application:}"${3:#:with multiple selections allowed}
snippet choose_Files
abbr choose
${1:#:set the_file to }choose file with prompt "${2:#:Pick a file:}"
${3:#:default location path to home folder}
${4:#:with invisibles}
${5:#:with multiple selections allowed}
${6:#:with showing package contents}
snippet choose_Folders
abbr choose
${1:#:set the_folder to }choose folder with prompt "${2:#:Pick a folder:}"
${3:#:default location path to home folder}
${4:#:with invisibles}
${5:#:with multiple selections allowed}
${6:#:with showing package contents}
${0}
snippet choose_NewFile
abbr choose
${1:#:set the_filename to }choose file name with prompt "${2:#:Name this file:}"
default name "${3:untitled}" default location ${4:#:path to home folder}
snippet choose_URL
abbr choose
${1:#:set the_url to }choose URL showing ${2:Web} servers with editable URL
snippet choose_Color
abbr choose
${1:#:set the_color to }choose color default color ${2:{65536, 65536, 65536\}}
snippet choose_ItemFromList
abbr choose
set the_choice to choose from list ${1}"\}}

View File

@ -1,226 +0,0 @@
snippet article
alias @article
@article{${1:LABEL},
author = {${2}},
title = {${3}},
journal = {${4}},
year = {${5}},
memo = {volume, number, pages, month, note}
}
snippet book
alias @book
@book{${1:LABEL},
author/editor = {${2}},
title = {${3}},
publisher = {${4}},
year = {${5}},
memo = {volume, series, address, edition, month, note},
}
snippet booklet
alias @booklet
@booklet{${1:LABEL},
title = {${2}},
memo = {author, howpublished, address, month, year, note},
}
snippet inbook
alias @inbook
@inbook{${1:LABEL},
author/editor = {${2}},
title = {${3}},
chapter/pages = {${4}},
publisher = {${5}},
year = {${6}},
memo = {volume, series, address, edition, month, note},
}
snippet incollection
alias @incollection
@incollection{${1:LABEL},
author = {${2}},
title = {${3}},
booktitle = {${4}},
year = {${4}},
memo = {editor, pages, organization, publisher, address, month, note},
}
snippet inproceedings
alias @inproceedings @conference conference
@inproceedings{${1:LABEL},
author = {${2}},
title = {${3}},
booktitle = {${4}},
year = {${5}},
memo = {editor, volume, number, series, pages, address, month,
organization, publisher, note}
}
snippet manual
alias @manual
@manual{${1:LABEL},
title = {${2}},
memo = {author, organization, address, edition, month, year, note},
}
snippet mastersthesis
alias @mastersthesis
@mastersthesis{${1:LABEL},
author = {${2}},
title = {${3}},
school = {${4}},
year = {${5}},
memo = {address, month, note},
}
snippet misc
alias @misc
@misc{${1:LABEL},
memo = {author, title, howpublished, month, year, note},
}
snippet phdthesis
alias @phdthesis
@phdthesis{${1:LABEL},
author = {${2}},
title = {${3}},
school = {${4}},
year = {${5}},
memo = {address, month, note},
}
snippet proceedings
alias @proceedings
@proceedings{${1:LABEL},
title = {${2}},
year = {${3}},
memo = {editor, publisher, organization, address, month, note},
}
snippet techreport
alias @techreport
@techreport{${1:LABEL},
author = {${2}},
title = {${3}},
institution = {${4}},
year = {${5}},
memo = {type, number, address, month, note},
}
snippet unpublished
alias @unpublished
@unpublished{${1:LABEL},
author = {${2}},
title = {${3}},
note = {${4}},
memo = {month, year},
}
snippet address
address = {${1}},
${0}
snippet annote
annote = {${1}},
${0}
snippet author
author = {${1}},
${0}
snippet booktitle
booktitle = {${1}},
${0}
snippet crossref
crossref = {${1}},
${0}
snippet chapter
chapter = {${1}},
${0}
snippet edition
edition = {${1}},
${0}
snippet editor
editor = {${1}},
${0}
snippet eprint
eprint = {${1}},
${0}
snippet howpublished
howpublished = {${1}},
${0}
snippet institution
institution = {${1}},
${0}
snippet journal
journal = {${1}},
${0}
snippet key
key = {${1}},
${0}
snippet month
month = {${1}},
${0}
snippet note
note = {${1}},
${0}
snippet number
number = {${1}},
${0}
snippet organization
organization = {${1}},
${0}
snippet pages
pages = {${1}},
${0}
snippet publisher
publisher = {${1}},
${0}
snippet school
school = {${1}},
${0}
snippet series
series = {${1}},
${0}
snippet title
title = {${1}},
${0}
snippet type
type = {${1}},
${0}
snippet url
url = {${1}},
${0}
snippet volume
volume = {${1}},
${0}
snippet year
year = {${1}},
${0}

View File

@ -1,153 +0,0 @@
snippet if
abbr if () {}
if (${1:#:condition}) {
${0:TARGET}
}
snippet else
else {
${0:TARGET}
}
snippet elseif
else if (${1:#:condition}) {
${0:TARGET}
}
snippet ifelse
abbr if () {} else {}
if (${1:#:condition}) {
${2:TARGET}
} else {
${3}
}
snippet for
abbr for () {}
for (${1} = 0; $1 < ${2}; $1++) {
${0:TARGET}
}
snippet while
abbr while () {}
while (${1:#:condition}) {
${0:TARGET}
}
snippet do_while
alias do
do {
${0:TARGET:code}
} while (${1:#:condition});
snippet switch
abbr switch () {}
switch (${1:#:var}) {
case ${2:#:val}:
${0:TARGET}
break;
}
snippet function
alias func
abbr func() {}
${1:void} ${2:#:func_name}(${3:#:args}) {
${0:TARGET}
}
snippet struct
abbr struct {}
struct ${1:#:name} {
${0:TARGET:data}
};
# Typedef struct
snippet struct_typedef
typedef struct ${1:#:name} {
${0:TARGET:data}
};
snippet enum
abbr enum {}
enum ${1:#:name} {
${0:TARGET}
};
# hard-tab is necessary; C indent doesn't support this.
snippet main
int main(int argc, char const* argv[])
{
${0:TARGET}
return 0;
}
# #include <...>
snippet inc
alias #inc, #include
#include <${1:stdio}.h>${0}
# #include "..."
snippet inc2
alias #inc2, #include2
#include "${1}.h"${0}
snippet ifndef
alias #ifndef
abbr #ifndef ... #define ... #endif
#ifndef $1
#define ${1:#:SYMBOL}
#endif${0}
snippet def
alias #def, #define
#define
# Include-Guard
snippet once
abbr include-guard
#ifndef ${1:SYMBOL}
#define $1
${0:TARGET}
#endif /* end of include guard */
# Ternary conditional operator
snippet conditional
(${1:#:condition}) ? ${2:#:a} : ${3:#:b}
snippet typedef
typedef ${1:#:base_type} ${2:#:custom_type};
snippet printf
abbr printf("...\n", ...);
printf("${1}\n", ${2});
snippet fprintf
abbr fprintf(..., "...\n", ...);
fprintf(${1:stderr}, "${2}\n"${3});
snippet comment
alias /*
/* ${1:#:comment} */
${0}
snippet sizeof
alias size
sizeof(${0:TARGET})
snippet helloworld
#include <stdio.h>
int main(int argc, char const* argv[])
{
puts("hello, world!");
return 0;
}
snippet fopen
abbr fopen("...", "...");
fopen("${1:PATH}", "${2:MODE}");
${0:TARGET}
fclose(${3:FD});
snippet fgets
abbr fgets(row, length, file);
fgets(${0:ROW}, ${1:LENGTH}, ${2:FILE});

View File

@ -1,32 +0,0 @@
snippet defn-doc
abbr defn function "..." [...] ...
options head
(defn ${1:name}
"${2:doc}"
[${3}]
${0})
snippet try
abbr (try ... (catch ...
(try
${1}
(catch ${2:Exception} e ${3:nil}))
snippet ref-set
abbr (dosync (ref-set ...
options head
(dosync
(ref-set ${1:ref} ${2:value}))
# http://tnoda-clojure.tumblr.com/post/24969285880/clojure-scripting
snippet shebang
options head
#^:shebang '[
exec java -cp \`locate clojure- | grep -P "clojure-[\\d\\.]+\\.jar$" | tail -1\` clojure.main "\$0"
]
snippet warn
options head
(binding [*out* *err*]
(println ${0:TARGET}))

View File

@ -1,72 +0,0 @@
snippet req
${1:#:object} = require('$1')
snippet log
console.log ${0}
snippet unl
${1:#:action} unless ${2:#:condition}
snippet try
try
${1:TARGET}
catch ${2:#:error}
${3}
snippet if
if ${1:#:condition}
${0:TARGET}
snippet elif
else if ${1:#:condition}
${0:TARGET}
snippet ifte
if ${1:#:condition} then ${2:#:value} else ${3:#:other}
snippet ife
if ${1:#:condition}
${2:TARGET}
else
${3:#:body...}
snippet swi
switch ${1:#:object}
when ${2:#:value}
${0:TARGET}
snippet ^j
\`${1:javascript}\`
snippet forr
for ${1:#:name} in [${2:#:start}..${3:#:finish}]${4: by ${5:#:step\}}
${0:TARGET}
snippet forrex
for ${1:#:name} in [${2:#:start}...${3:#:finish}]${4: by ${5:#:step\}}
${0:TARGET}
snippet foro
for ${1:#:key}, ${2:#:value} of ${3:#:object}
${0:TARGET}
snippet fora
for ${1:#:name} in ${2:#:array}
${0:TARGET}
snippet fun
${1:#:name} = (${2:#:args}) ->
${0:TARGET}
snippet bfun
(${1:#:args}) =>
${0:TARGET}
snippet cla
abbr cla
options head
class ${1:#:ClassName}${2: extends ${3:#:Ancestor\}}
constructor: (${4:#:args}) ->
${5:TARGET}

View File

@ -1,99 +0,0 @@
include c.snip
# #include <...>
snippet inc
alias #inc, #include
#include <${1:iostream}>${0}
# #include "..."
snippet inc2
alias #inc2, #include2
#include "${1}"${0}
snippet template
abbr template <T>
template<typename ${1:T}>
snippet class
abbr class {}
class ${1:#:name} {
${2}
public:
$1(${3});
};
$1::$1($3) {
${0:TARGET}
}
snippet class-without-constructor
abbr class {}
class ${1:#:name} {
${2}
};
snippet try
abbr try catch
try {
${1:TARGET}
} catch (${2:e:xception}) {
${3}
}
# range based for ( C++11 feature )
snippet for_CPP11
abbr for (:) {}
for (${1:auto&& }${2:var} : ${3:container}) {
${0:TARGET}
}
# lambda expression ( C++11 feature )
snippet lambda
abbr [](){}
[${1}](${2})${3}{ ${4:TARGET} }
# scoped enumeration ( C++11 feature )
snippet enum_scoped
abbr enum struct {}
enum struct { ${1:TARGET} }
# static assert ( C++11 feature )
snippet static_assert
abbr static_assert(,"")
static_assert( ${1}, "${2}" );${0}
delete namespace
snippet namespace
abbr namespace {}
options head
namespace ${1:#:name} {
${0:TARGET}
} // namespace $1
snippet static_cast
abbr static_cast<>()
static_cast<${1}>(${2})${0}
snippet reinterpret_cast
abbr reinterpret_cast<>()
reinterpret_cast<${1}>(${2})${0}
snippet const_cast
abbr const_cast<>()
const_cast<${1}>(${2})${0}
snippet dynamic_cast
abbr dynamic_cast<>()
dynamic_cast<${1}>(${2})${0}
snippet helloworld
abbr #include<iostream> int main...
#include <iostream>
int main(int argc, char const* argv[])
{
std::cout << "hello, world!" << std::endl;
return 0;
}
snippet p
options head
std::cout << ${0:TARGET} << std::endl;

View File

@ -1,251 +0,0 @@
snippet background
alias bg
background:${1};${2}
snippet backattachment
alias ba
background-attachment:${1};${2}
snippet backcolor
alias bc
background-color:${1};${2}
snippet backimage
alias bi
background-image:${1};${2}
snippet backposition
alias bp
background-position:${1};${2}
snippet backrepeat
alias br
background-repeat:${1};${2}
snippet border
alias b
border:${1};${2}
snippet border-style
alias bs
border-style:${1};${2}
snippet border-color
alias bc
border-color:${1};${2}
snippet border-width
alias bw
border-width:${1};${2}
snippet border-bottom-width
alias bbw
border-bottom-width:${1};${2}
snippet border-top-width
alias btw
border-top-width:${1};${2}
snippet border-left-width
alias blw
border-left-width:${1};${2}
snippet border-right-width
alias brw
border-right-width:${1};${2}
snippet border-bottom-style
alias bbs
border-bottom-style:${1};${2}
snippet border-top-style
alias bts
border-top-style:${1};${2}
snippet border-left-style
alias bls
border-left-style:${1};${2}
snippet border-right-style
alias brs
border-right-style:${1};${2}
snippet border-bottom-color
alias bbc
border-bottom-color:${1};${2}
snippet border-top-color
alias btc
border-top-color:${1};${2}
snippet border-left-color
alias blc
border-left-color:${1};${2}
snippet border-right-color
alias brc
border-right-color:${1};${2}
snippet outline
alias ol
outline:${1};${2}
snippet outline-color
alias oc
outline-color:${1};${2}
snippet outline-style
alias os
outline-style:${1};${2}
snippet outline-width
alias ow
outline-width:${1};${2}
snippet color
alias c
color:${1};${2}
snippet direction
alias d
direction:${1};${2}
snippet letter-spacing
alias ls
letter-spacing:${1};${2}
snippet line-height
alias lh
line-height:${1};${2}
snippet text-align
alias ta
text-align:${1};${2}
snippet text-decoration
alias td
text-decoration:${1};${2}
snippet text-indent
alias ti
text-indent:${1};${2}
snippet text-transform
alias tt
text-transform:${1};${2}
snippet unicode-bidi
alias ub
unicode-bidi:${1};${2}
snippet white-space
alias ws
white-space:${1};${2}
snippet word-spacing
alias ws
word-spacing:${1};${2}
snippet font
alias f
font:${1};${2}
snippet font-family
alias ff
font-family:${1:"Times New Roman",Georgia,Serif};${2}
snippet font-size
alias fs
font-size:${1};${2}
snippet font-style
alias fs
font-style:${1};${2}
snippet font-weight
alias fw
font-weight:${1};${2}
snippet margin
alias m
margin:${1};${2}
snippet margin-bottom
alias mb
margin-bottom:${1};${2}
snippet margin-top
alias mt
margin-top:${1};${2}
snippet margin-left
alias ml
margin-left:${1};${2}
snippet margin-right
alias mr
margin-right:${1};${2}
snippet padding
alias p
padding:${1};${2}
snippet padding-bottom
alias pb
padding-bottom:${1};${2}
snippet padding-top
alias pt
padding-top:${1};${2}
snippet padding-left
alias pl
padding-left:${1};${2}
snippet padding-right
alias pr
padding-right:${1};${2}
snippet list-style
alias ls
list-style:${1};${2}
snippet list-style-image
alias lsi
list-style-image:${1};${2}
snippet list-style-position
alias lsp
list-style-position:${1};${2}
snippet list-style-type
alias lst
list-style-type:${1};${2}
snippet content
alias c
content:${1};${2}
snippet height
alias h
height:${1};${2}
snippet max-height
alias mah
max-height:${1};${2}
snippet max-width
alias maw
max-width:${1};${2}
snippet min-height
alias mih
min-height:${1};${2}
snippet min-width
alias miw
min-width:${1};${2}
snippet width
alias w
width:${1};${2}

View File

@ -1,40 +0,0 @@
include c.snip
# Delete snippet depended on C.
delete struct
delete struct_typedef
delete enum
delete main
delete inc
delete inc2
delete Inc
delete Def
delete def
delete once
delete printf
delete fprintf
snippet foreach
abbr foreach() {}
foreach (${1:#:var}; ${2:#:list}) {
${3:TARGET}
}
snippet class
abbr class {}
class ${1:#:name} {
${2:TARGET}
}
snippet struct
abbr struct {}
struct ${1:#:name} {
${2:TARGET}
}
snippet enum
abbr enum {}
enum ${1:#:name} {
${2:TARGET}
}

View File

@ -1,21 +0,0 @@
snippet helloworld
options head
main(_) -> io:format("Hello, world!\n").
snippet -module
options head
-module(${0:module}).
snippet -export
options head
-export([${0:f/1}]).
snippet ioformat
options word
io:format("${1:~w~n}"${2:, []})
snippet main
options head
main(_) -> ${0}.

View File

@ -1,20 +0,0 @@
snippet ruby_print
abbr <%= %>
<%= ${1:TARGET} %>${2}
snippet ruby_code
abbr <% %>
<% ${1:TARGET} %>${2}
snippet ruby_print_nonl
abbr <%= -%>
<%= ${1:TARGET} -%>${2}
snippet ruby_code_nonl
abbr <% -%>
<% ${1:TARGET} -%>${2}
snippet comment
abbr <%# %>
<%# ${1:TARGET} %>${2}

View File

@ -1,51 +0,0 @@
snippet helloworld
abbr package main\nimport fmt...
options head
package main
import (
"fmt"
)
func main() {
fmt.Printf("Hello, world\n")
}
snippet func
abbr func ...() { ... }
options head
func ${1:fname}(${2}) ${3:int }{
${0:TARGET:return }
}
snippet import
options head
import (
"${1:fmt}"
)
${0:TARGET}
snippet package
options head
package ${1:main}
${0:TARGET}
snippet printf
options word
fmt.Printf("${1}\n"${2:})
snippet println
options word
fmt.Println(${0:TARGET})
snippet struct
options head
type ${1} struct {
${0:TARGET}
}
snippet interface
options head
type ${1} interface {
${0:TARGET}
}

View File

@ -1,29 +0,0 @@
snippet helloworld
options head
package ${1:com.github.ujihisa}
class ${2:TARGET} {
public static void main(String[] args) {
println("Hello world!")
}
}
snippet gradle
options head
apply plugin: 'groovy'
apply plugin: 'maven'
repositories {
mavenCentral()
${2:mavenLocal()}
}
dependencies {
compile 'org.codehaus.groovy:groovy-all:2.1.1'
//testCompile group: 'junit', name: 'junit', version: '4.+'
}
jar {
from configurations.compile.collect { it.isDirectory() ? it : zipTree(it) }
}
manifest.mainAttributes("Main-Class": "${1:com.github.`$USER`.}")

View File

@ -1,32 +0,0 @@
snippet import
abbr import qualified ... as ...
import qualified ${1} as ${2}
snippet importOnly
abbr import ... (...)
import ${1} (${2})
snippet language
abbr {-# LANGUAGE ... #-}
{-# LANGUAGE ${1} #-}
# hard-tab is necessary
snippet case
abbr case ... of
case ${1} of
${2} -> ${0}
snippet main
abbr main = do
main = do
${0}
snippet class
options head
class ${1:Class} ${2:a} where
${3:function} :: ${4:Type}
snippet instance
options head
instance ${1:Class} ${2:Type} where
${3:function} ${4:self} = ${0:TARGET}

View File

@ -1,301 +0,0 @@
snippet doctypetransitional
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
snippet doctypeframeset
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
snippet doctypestrict
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
snippet head
<head>
<meta http-equiv="content-type" content="text/html; charset=${1:utf-8}">
<title>${2}</title>
<style type="text/css">
${3}
</style>
${4}
</head>${5}
snippet metaauthor
<meta name="author" content="${1}">${2}
snippet keywords
<meta name="keywords" content="${1}">${2}
snippet metaothers
<meta name="others" content="${1}">${2}
snippet metagenerator
<meta name="generator" content="${1}">${2}
snippet metadescription
<meta name="description" content="${1}">${2}
snippet scriptcharset
<script type="text/javascript" charset="${1:UTF-8}">
${2:TARGET}
</script>${3}
snippet script
<script type="text/javascript">
${1:TARGET}
</script>${2}
snippet body
<body>
${1:TARGET}
</body>
snippet h
options word
<h${1:1}>${2}</h$1>${3}
snippet p
options word
<p>${1}</p>${2}
snippet br
options word
<br />
snippet hr
options word
<hr />
snippet comment
options word
<!--${1:TARGET}-->${2}
snippet b
options word
<b>${1:TARGET}</b>${2}
snippet small
options word
<small>${1:TARGET}</small>${2}
snippet strong
options word
<strong>${1:TARGET}</strong>${2}
snippet sub
options word
<sub>${1:TARGET}</sub>${2}
snippet sup
options word
<sup>${1:TARGET}</sup>${2}
snippet ins
options word
<ins>${1:TARGET}</ins>${2}
snippet del
options word
<del>${1:TARGET}</del>${2}
snippet em
options word
<em>${1:TARGET}</em>${2}
snippet bdo
options word
<bdo dir="${1:rtl}">${2:TARGET}</bdo>${3}
snippet pre
<pre>
${1:TARGET}
</pre>${2}
snippet blockquote
<blockquote>
${1}
</blockquote>
${2}
snippet link
abbr link stylesheet css
<link rel="${1:stylesheet}" href="${2}.css" type="text/css" media="${3:screen}" charset="utf-8">${4}
snippet alignl
text-align="left"
snippet alignr
text-align="right"
snippet alignc
text-align="center"
snippet bgcolor
bgcolor="${1}"${2}
snippet ahref
options word
<a href="${1}">${2:TARGET}</a>${3}
snippet ahref_blank
options word
<a href="${1}" target="_blank">${2:TARGET}</a>${3}
snippet ahref_parent
options word
<a href="${1}" target="_parent">${2:TARGET}</a>${3}
snippet ahref_top
options word
<a href="${1}" target="_top">${2:TARGET}</a>${3}
snippet aname
options word
<a name="${1}">${2:TARGET}</a>${3}
snippet framesetcols
<frameset cols="${1}">
${2:TARGET}
</frameset>${3}
snippet framesetrows
<frameset rows="${1}"
${2:TARGET}
</frameset>${3}
snippet iframe
options word
<iframe src="${1}"></iframe>${2}
snippet table
<table border="${1}">
${2:TARGET}
</table>${3}
snippet th
options word
<th>${1:TARGET}</th>${2}
snippet ulsquare
options word
<ul type="square">${1:TARGET}</ul>${2}
snippet ulcircle
options word
<ul type="circle">${1:TARGET}</ul>${2}
snippet uldisc
options word
<ul type="disc">${1:TARGET}</ul>${2}
snippet ol
options word
<ol>${1:TARGET}</ol>${2}
snippet olA
options word
<ol type="A">${1:TARGET}</ol>${2}
snippet ola
options word
<ol type="a">${1:TARGET}</ol>${2}
snippet olI
options word
<ol type="I">${1:TARGET}</ol>${2}
snippet oli
options word
<ol type="i">${1:TARGET}</ol>${2}
snippet li
options word
<li>${1:TARGET}</li>${2}
snippet dl
options word
<dl>${1:TARGET}</dl>${2}
snippet dt
options word
<dt>${1:TARGET}</dt>${2}
snippet dd
options word
<dd>${1:TARGET}</dd>${2}
snippet form
<form>
${1:TARGET}
</form>${2}
snippet inputtext
options word
<input type="text" name="${1:user}">${2}
snippet inputpassword
options word
<input type="password" name="${1:password}">${2}
snippet inputradio
options word
<input type="radio" name="${1}" value="value">${2}
snippet inputcheckbox
options word
<input type="checkbox" name="${1}">${2}
snippet textarea
<textarea rows="${1}" cols="${2}">
${3:TARGET}
</textarea>
${4}
snippet button
options word
<button>${1:TARGET}</button>${2}
snippet select
options word
<select>${1:TARGET}</select>${2}
snippet optgroup
<optgroup label="${1}">
${2:TARGET}
<optgroup>${3}
snippet option
options word
<option value="${1}">${2:TARGET}</option>${3}
snippet label
options word
<label>${1}: <input type="${2:TARGET}" /><label>${3}
snippet labelfor
options word
<label for="${1}:id">${2:TARGET}</label>${3}
snippet fiedset
options word
<fiedlset>${1:TARGET}</fiedset>${2}
snippet legend
options word
<legend>${1:TARGET}</legend>${2}
snippet id
options word
id="${1}"${2}
snippet class
options word
class="${1}"${2}
snippet pclass
options word
<p class="${1}">${2:TARGET}</p>${3}
snippet pid
options word
<p id="${1}">${2:TARGET}</p>${3}
snippet divid
options word
<div id="${1}">${2:TARGET}</div>${3}
snippet divclass
options word
<div class="${1}">${2:TARGET}</div>${3}
snippet img
options word
<img src="${1}">${2}
snippet div
options word
<div ${1:id="${2:someid\}"}>${3:TARGET}</div>${4}
snippet header
options word
<div class="header" role="header">
${1}
</div>
snippet main
options word
<div class="main" role="main">
${1}
</div>
snippet footer
options word
<div class="footer" role="contentinfo">
${1}
</div>

View File

@ -1,214 +0,0 @@
snippet class
class ${1} ${2:extends} ${3:#:Parent} ${4:implements} ${5:#:Interface} {
${0:TARGET}
}
snippet interface
interface ${1} ${2:extends} ${3:#:Parent} {
${0:TARGET}
}
snippet method
${1:void} ${2:#:method}(${3}) ${4:throws} {
${0:TARGET}
}
snippet var
${1:#:type} ${2:#:var}${3};
snippet const
static public final ${1:#:type} ${2:#:var} = ${3};${4}
snippet const_string
static public final String ${1:var} = "${2}";${4}
snippet assert
assert ${1:#:test} ${2:#:Failure message};${3}
snippet if
if (${1}) {
${2:TARGET}
}
snippet elif
alias elseif
else if (${1}) {
${2:TARGET}
}
snippet while
while (${1}) {
${2:TARGET}
}
snippet for
for (${1}; ${2}; ${3}) {
${4:TARGET}
}
snippet foreach
alias fore
for (${1} : ${2}) {
${3:TARGET}
}
snippet switch
switch (${1}) {
${2:TARGET}
}
snippet case
case ${1}:
${2:TARGET}
${0}
snippet br
break;
snippet default
alias de
default:
${0}
snippet try
try {
${0:TARGET}
} catch (${1:#:Exception} ${2:e}) {
${3:e.printStackTrace();}
}
snippet try_finally
try {
${0:TARGET}
} catch (${1:Exception} ${2:e}) {
${3:e.printStackTrace();}
} finally {
${4}
}
snippet catch
catch (${1:Exception} ${2:e}) {
${0:e.printStackTrace();}
}
snippet finally
finally {
${0:TARGET}
}
snippet th
throw ${0}
snippet sy
synchronized
snippet testclass
alias tc
public class ${1} extends ${2:TestCase} {
${0:TARGET}
}
snippet test
public void test${1:#:Name}() throws Exception {
${0:TARGET}
}
snippet import
alias imt
import ${1};
${0}
snippet j.u
java.util.
snippet j.i
java.io.
snippet j.b
java.beans.
snippet j.n
java.net
snippet j.m
java.math.
snippet main
public static void main(String[] args) {
${0}
}
snippet println
System.out.println(${1});${0}
snippet print
System.out.print(${1});${0}
#javadoc
snippet comment
/**
* ${0:TARGET}
*/
snippet author
@author ${0:$TM_FULLNAME}
snippet {code
{@code ${0}
snippet deprecated
@deprecated ${0:#:description}
snippet {docRoot
{@docRoot
snippet {inheritDoc
{@inheritDoc
snippet {link
{@link ${1:#:target} ${0:#:label}
snippet {linkplain
{@linkplain ${1:#:target} ${0:#:label}
snippet {literal
{@literal ${0}
snippet param
@param ${1:#:var} ${0:#:description}
snippet return
@return ${0:#:description}
snippet see
@see ${0:#:reference}
snippet serial
@serial ${0:#:description}
snippet sd
@serialField ${0:#:description}
snippet sf
@serialField ${1:#:name} ${2:#:type} ${0:#:description}
snippet since
@since ${0:#:version}
snippet throws
@throws ${1:#:class} ${0:#:description}
snippet {value
{@value ${0}
snippet version
alias ver
@version ${0:#:version}
snippet helloworld
options head
public class ${1:Hello} {
static public void main(String args[]) {
System.out.println("Hello, world!");
}
}

View File

@ -1,74 +0,0 @@
snippet :f
options head
${1:#:method_name}: function(${2:#:attribute}) {
${0:TARGET}
}
snippet function
abbr func
options word
function ${1:#:function_name}(${2:#:argument}) {
${0:TARGET}
}
snippet function2
abbr func2
options head
function ${1:function_name}(${2:argument}) {
${0:TARGET}
}
snippet proto
options head
${1:#:class_name}.prototype.${2:#:method_name} = function(${3:#:first_argument}) {
${0:TARGET}
};
snippet f
options word
function(${1}) { ${0:TARGET} };
snippet if
options head
if (${1:true}) {
${0:TARGET}
}
snippet if-else
abbr ife
options head
if (${1:#:condition}) {
${0:TARGET}
} else {
}
snippet for
options head
for (var ${1:i}=0; $1 < ${2:#:Things}.length; ++$1) {
${0:TARGET}
}
snippet forin
options head
for (var ${1:i} in ${2:#:Things}) {
${0:TARGET}
}
snippet key-value
abbr :,
options word
${1:#:value_name}: ${0:#:value},
#snippet key
#options word
# ${1:#:key}: "${2:#:value}"}${3:, }
snippet setTimeout-function
options head
setTimeout(function() { ${0} }, ${1:10});
snippet console-log
alias cl
options head
console.log(${0:TARGET});

View File

@ -1,21 +0,0 @@
snippet token_desc
options head
<token_desc> token{
${0:TARGET}
}
snippet left
options head
<left>{
${0:TARGET}
}
snippet grammar
options head
<grammar> grammar{
E<${1}>
: [${2}] ${3}
;
}
# vim: noexpandtab :

View File

@ -1,128 +0,0 @@
snippet comment
options word
{% comment %}${1:#:comment}{% endcomment %}
snippet raw
options word
{% raw %}${1:#:TARGET}{% endraw %}
snippet if
abbr if endif
options word
{% if ${1:#:condition} %}
${0:TARGET}
{% endif %}
snippet elseif
{% elseif ${1:#:condition} %}
${0:TARGET}
snippet ifelse
abbr if else endif
{% if ${1:#:condition} %}
${2:TARGET}
{% else %}
${3}
{% endif %}
snippet unless
abbr unless endunless
options word
{% unless ${1:#:TARGET} %}
${0:TARGET}
{% endunless %}
snippet case
abbr case when endcase
{% case ${1:#:condition} %}
{% when ${2:#:TARGET} %}
${3}
{% endcase%}
snippet else
{% else %}
${1:TARGET}
snippet when
{% when ${1:#:TARGET} %}
${0}
snippet cycle
options word
{% cycle ${1:#:TARGET} %}
snippet for
abbr for in endfor
options word
{% for ${1:#:var} in ${2:#:list} %}
${0:TARGET}
{% endfor%}
snippet tablerow
abbr tablerow in endtablerow
options word
{% tablerow ${1:#:var} in ${2:#:list} %}
${0:TARGET}
{% endtablerow %}
snippet assign
options word
{% assign ${1:#:var} = ${2:#:value} %}
snippet capture
options word
{% capture ${1:#:var} %}${2:#:TARGET}{% endcapture %}
snippet include
options word
{% include ${1:#:TARGET} %}
snippet output
abbr {{ }}
alias {{
options word
{{ ${1:#:TARGET} }}
snippet filter
abbr {{ | }}
alias {{
options word
{{ ${1:#:TARGET} | ${2:#:filter} }}
# Jekyll enhancements
snippet highlight
alias hl
options word
{% highlight ${1:#:TARGET} %}
${2:code}
{% endhighlight %}
snippet highlight_line
abbr Line number
alias hl_l
options word
{% highlight ${1:#:TARGET} linenos %}
${2:code}
{% endhighlight %}
snippet post_url
options word
{% post_url ${1:#:TARGET} %}
snippet gist
options word
{% gist `getreg('+')=='' ? '<\`0\`>' : getreg('+')` %}
snippet front-matter
abbr layout title category
alias ---
options head
---
layout: ${1}
title: ${2}
category: ${3}
---
${0}

View File

@ -1,41 +0,0 @@
# lua's indent plugin doesn't work well partly with markers. Use hard-tab for some of this snippet.
snippet func
abbr function name(args)...end
options word
function ${1:#:function_name}(${2:#:argument})
${0:TARGET}
end
snippet if
options head
if ${1:#:condition} then
${0:TARGET}
end
snippet for
options head
for ${2:i} = 0, ${1:#:Things} do
${0:TARGET}
end
snippet forin
options head
for ${2:k}, ${3:v} in ${1:ipairs(xs)} do
${0:TARGET}
end
snippet print_table
options head
abbr for k, v in ipairs(table) do
for k, v in ipairs(${1:table}) do
print(k, v)
end
snippet print
alias p
options head
print(${0:TARGET})
snippet comment
options head
[[${0:TARGET}]]

View File

@ -1,8 +0,0 @@
snippet CFLAGS
options head
CFLAGS=-Wall -g ${0: -llua -lzeromq}
snippet clean:
options head
clean:
rm -f ${0}

View File

@ -1,67 +0,0 @@
snippet link
abbr [link][]
options word
[${1:#:link_id}][]${2}
snippet linkid
abbr [link][id]
options word
[${1:#:link}][${2:id}]${3}
snippet linkurl
abbr [link](url)
options word
[${1:#:link}](http://${2:#:url})${3}
snippet linkemail
abbr [link](email)
options word
[${1:#:link}](mailto:${2:#:email})${3}
snippet linkurltitle
abbr [link](url "title")
options word
[${1:#:link}](${2:#:url} "${3:#:title}")${4}
snippet idurl
abbr [id]: url "title"
options word
[${1:#:id}]: http://${2:#:url} "${3:#:title}"
snippet idemail
abbr [id]: email "title"
options word
[${1:#:id}]: mailto:${2:#:url} "${3:#:title}"
snippet altid
abbr ![alt][id]
options word
![${1:#:alt}][${2:#:id}]${3}
snippet alturl
abbr ![alt](url)
options word
![${1:#:alt}](${2:#:url})${3}
snippet alturltitle
abbr ![alt](url "title")
options word
![${1:#:alt}](${2:#:url} "${3:#:title}")${4}
snippet emphasis1
abbr *emphasis*
options word
*${1}*${2}
snippet emphasis2
abbr _emphasis_
options word
_${1}_${2}
snippet strong1
abbr **strong**
options word
**${1}**${2}
snippet strong2
abbr __strong__
options word
__${1}__${2}
snippet code
abbr `code`
options word
\`${1}\`${2}

View File

@ -1,70 +0,0 @@
snippet ==
== ${1} ==
${2}
snippet ===
=== ${1} ===
${2}
snippet ====
==== ${1} ====
${2}
snippet =====
===== ${1} =====
${2}
snippet ======
====== ${1} ======
${2}
snippet [[
[[${1}]] ${2}
snippet ''
''${1}''
snippet '''
'''${1}'''
snippet '''''
'''''${1}'''''
snippet sy
<syntaxhighlight lang="${1}">
${2}
</syntaxhighlight>
snippet pre
<pre>
${1}
</pre>
snippet html
<html>
${1}
</html>
snippet nowiki
<nowiki>${1}</nowiki>
snippet tt
<tt>${1}</tt>
snippet blockquote
<blockquote>${1}</blockquote>
snippet ft
<!--
vim: filetype=mediawiki
-->
snippet {|
{|class="wikitable"
|+ ${1}
! ${2}
! ${3}
|-
| ${4}
| ${5}
|-
| ${6}
| ${7}
|-
|
|
|}

View File

@ -1,24 +0,0 @@
snippet helloworld
options head
print 'Hello world!'
snippet map
options word
[${0:TARGET} for ${1:x} in ${2:xs}]
snippet p
options head
moon.p ${0}
snippet defn
${1:f} = (${2:args}) ->
${0:TARGET}
snippet defm
options head
${1:f}: (${2:args}) =>
${0:TARGET}
snippet require
options head
${1:moon} = require '$1'

View File

@ -1,333 +0,0 @@
snippet sel
@selector(${1:#:method}:)
snippet imp
#import <${1:Cocoa/Cocoa.h}>
snippet Imp
#import "${1}}"
snippet log
abbr NSLog(...)
NSLog(@"${1}")
snippet cl
abbr Class
@interface ${1} : ${2:NSObject}
{
}
@end
@implementation ${1}
- (id)init
{
if((self = [super init]))
{${0}
}
return self;
}
@end
snippet cli
abbr ClassInterface
@interface ${1} : ${2:NSObject}
{${3}
}
${0}
@end
snippet clm
abbr ClassImplementation
@implementation ${1:object}
- (id)init
{
if((self = [super init]))
{${0}
}
return self;
}
@end
snippet cat
abbr Category
@interface ${1:NSObject} (${2:Category})
@end
@implementation ${1} (${2})
${0}
@end
snippet cati
abbr CategoryInterface
@interface ${1:NSObject)} (${2:Category)})
${0}
@end
snippet array
NSMutableArray *${1:#:array} = [NSMutableArray array];
snippet dict
NSMutableDictionary *${1:#:dict} = [NSMutableDictionary dictionary];
snippet bez
NSBezierPath *${1:#:path} = [NSBezierPath bezierPath];
snippet m
abbr Method
- (${1:#:id})${2:#:method}${3:(#:id)}${4:#:anArgument}
{
${0}
return nil;
}
snippet M
abbr Method
- (${1:#:id})${2:#:method}${3:(#:id)}${4:#:anArgument};
snippet cm
abbr ClassMethod
+ (${1:#:id})${2:#:method}${3:(#:id)}${4:#:anArgument}
{
${0}
return nil;
}
snippet icm
abbr InterfaceClassMethod
+ (${1:#:id})${0:#:method};
snippet sm
abbr SubMethod
- (${1:#:id})${2:#:method}${3:(#:id)}${4:#:anArgument}
{
${1} res = [super ${2:#:method}]
return res;
}
snippet mi
abbr MethodInitialize
+ (void)initialize
{
[[NSUserDefaults standardUserDefaults] registerDefaults:[NSDictionary dictionaryWithObjectsAndKeys:
${0}@"value", @"key",
nil]];
}
snippet obj
- (${1:#:id})${2:#:thing}
{
return ${2};
}
- (void)set${2}:(${1})aValue
{
${0}${1}old${2} = ${2};
${2} = [aValue retain];
[old${2} release];
}
snippet iobj
- (${1:#:id})${2:#:thing};
- (void)set${2}:(${1})aValue;
snippet str
- (NSString${$1: *)})${1:#:thing}
{
return ${2};
}
- (void)set${1}:(NSString${2: *})${3}
{
${3} = [${3} copy];
[${2} release];
${2} = ${3};
}
snippet istr
- (NSString${1: *)}${1:#:thing};
- (void)set${1}:(NSString${2: *})${2};
snippet cd
abbr CoreData
- (${1:#:id})${2:#:attribute}
{
[self willAccessValueForKey:@"$2"];
$1 value = [self primitiveValueForKey:@"$2"];
[self didAccessValueForKey:@"$2"];
return value;
}
- (void)set$2:($1)aValue
{
[self willChangeValueForKey:@"$2"];
[self setPrimitiveValue:aValue forKey:@"$2"];
[self didChangeValueForKey:@"$2"];
}
snippet karray
abbr KVCArry
- (void)addObjectTo${1:#:Things}:(${2:#:id})anObject
{
[${3}} addObject:anObject];
}
- (void)insertObject:($2)anObject in$1AtIndex:(unsigned int)i
{
[${3} insertObject:anObject atIndex:i];
}
- (${2})objectIn${1}AtIndex:(unsigned int)i
{
return [${3} objectAtIndex:i];
}
- (unsigned int)indexOfObjectIn${1}:(${2})anObject
{
return [${3} indexOfObject:anObject];
}
- (void)removeObjectFrom${1}AtIndex:(unsigned int)i
{
[${3} removeObjectAtIndex:i];
}
- (unsigned int)countOf${1}
{
return [${3} count];
}
- (NSArray${4: *}${1}
{
return ${3}
}
- (void)set${1}:(NSArray${4: *})new${1}
{
[${3} setArray:new${1}];
}
snippet iarray
abbr InterfaceAccessorsForKVCArray
- (void)addObjectTo${1:#:Things}:(${2:#:id})anObject;
- (void)insertObject:(${2})anObject in${1}AtIndex:(unsigned int)i;
- (${2})objectIn${1}AtIndex:(unsigned int)i;
- (unsigned int)indexOfObjectIn${1}:(${2})anObject;
- (void)removeObjectFrom${1}AtIndex:(unsigned int)i;
- (unsigned int)countOf${1};
- (NSArray${3: *})${1};
- (void)set${1}:(NSArray${3: *})new${1};
snippet acc
abbr PrimitiveType
- (${1:unsigned int})${2:#:thing}
{
return ${3};
}
- (void)set${2}:(${1:unsigned int})new${2}
{
${3} = new${2};
}
snippet iacc
abbr Interface:AccessorsForPrimitiveType
- (${1:unsigned int})${2:thing};
- (void)set${2}:($1)new${2};
snippet rdef
abbr ReadDefaultsValue
[[NSUserDefaults standardUserDefaults] objectForKey:${1:key}];
snippet wdef
abbr WriteDefaultsValue
[[NSUserDefaults standardUserDefaults] setObject:${1:object} forKey:${2:key}];
snippet ibo
abbr IBOutlet
IBOutlet ${1}${2: *}${3};
snippet syn
@synthesize ${1:#:property};
snippet bind
bind:@"${2:#:binding}" toObject:${3:observableController} withKeyPath:@"${4:keyPath}" options:${5:nil}
snippet reg
[[NSNotificationCenter defaultCenter] addObserver:${1:self} selector:@selector(${3}) name:${2:NSWindowDidBecomeMainNotification} object:${4:nil}];
snippet focus
[self lockFocus];
${0}
[self unlockFocus];
snippet forarray
unsigned int ${1:object}Count = [${2:array} count];
for(unsigned int index = 0; index < ${1}Count; index += 1)
{
${3:id} ${1} = [${2} objectAtIndex:index];
${0}
}
snippet alert
int choice = NSRunAlertPanel(@"${1:Something important!}", @"${2:Something important just happend, and now I need to ask you, do you want to continue?}", @"${3:Continue}", @"${4:Cancel}", nil);
if(choice == NSAlertDefaultReturn) // "${3:Continue}"
{
${0};
}
else if(choice == NSAlertAlternateReturn) // "${4:Cancel}"
{
}
snippet res
${1} Send ${2} to ${1}, if ${1} supports it}${3}
if ([${1:self} respondsToSelector:@selector(${2:someSelector:})])
{
[${1} ${3}];
}
snippet del
if([${1:[self delegate]} respondsToSelector:@selector(${2:selfDidSomething:})])
[${1} ${3}];
snippet format
[NSString stringWithFormat:@"${1}", ${2}]${0}
snippet save
[NSGraphicsContext saveGraphicsState];
${0}
[NSGraphicsContext restoreGraphicsState];
snippet thread
[NSThread detachNewThreadSelector:@selector(${1:#:method}:) toTarget:${2:#:aTarget} withObject:${3:#:anArgument}]
snippet pool
NSAutoreleasePool${TM_C_POINTER: *}pool = [NSAutoreleasePool new];
${0}
[pool drain];

View File

@ -1,77 +0,0 @@
snippet perl
#!/opt/local/bin/perl
use strict;
use warnings;
${1}
snippet sub
sub ${1:#:function_name} {
${2:TARGET}
}
snippet if
if (${1:#:condition}) {
${2:TARGET}
}
snippet ife
if (${1:#:condition}) {
${2:TARGET}
} else {
${3:#:else...}
}
snippet ifee
if (${1:#:condition}) {
${2:TARGET}
} elsif (${3}) {
${4:#:elsif...}
} else {
${5:#:else...}
}
snippet xif
${1:#:expression} if ${2:#:condition};
snippet while
abbr wh
while (${1:#:condition}) {
${2:TARGET}
}
snippet xwhile
abbr xwh
${1:#:expression} while ${2:#:condition};
snippet for
for (my $${1:#:var} = 0; $$1 < ${2:#:expression}; $$1++) {
${3:TARGET}
}
snippet fore
for ${1} (${2:#:expression}){
${3:TARGET}
}
snippet xfor
${1:#:expression} for @${2:#:array};
snippet unless
abbr un
unless (${1:condition}) {
${2:TARGET}
}
snippet xunless
abbr xun
${1:#:expression} unless ${2:#:condition};
snippet eval
eval {
${1:TARGET}
};
if ($@) {
${2:#:handle failure...}
}

View File

@ -1,276 +0,0 @@
snippet function
abbr public function () {}
${1:public }function ${2:#:FunctionName}(${3})
{
${4:TARGET}
}
snippet function_literal
options word
abbr function () {}
function (${1})${2: use } {
${3:TARGET}
}
snippet php
<?php
${1:TARGET}
snippet pecho
<?php echo ${1} ?>${0}
snippet echoh
<?php echo htmlentities(${1}, ENT_QUOTES, 'utf-8') ?>${0}
snippet pfore
<?$php foreach ($${1:#:variable} as $${2:#:key}${3: =>}): ?>
${0:TARGET}
<?php endforeach ?>
snippet pife
<?php if (${1:#:condition}): ?>
${2:TARGET}
<?php else: ?>
${0}
<?php endif ?>
snippet pif
<?php if (${1:#:condition}): ?>
${0:TARGET}
<?php endif ?>
snippet pelse
<?php else: ?>
snippet this
<?php $this->${0} ?>
snippet ethis
<?php echo $this->${0} ?>
snippet docc
/**
* ${3:#:undocumented class variable}
*
* @var ${4:#:string}
**/
${1:#:var} $${2};${0}
snippet docd
/**
* ${3:#:undocumented constant}
**/
define(${1} ${2});${0}
snippet docs
/**
* ${4:#:undocumented function}
*
* @return ${5:void}
* @author ${6}
**/
${1}function ${2}(${3});${0}
snippet docf
/**
* ${4:#:undocumented function}
*
* @return ${5:void}
* @author ${6}
**/
${1}function ${2}(${3})
{
${0:TARGET}
}
snippet doch
/**
* ${1}
*
* @author ${2}
* @version ${3}
* @copyright ${4}
* @package ${5:default}
**/
/**
* Define DocBlock
**/
snippet doci
/**
* ${2:#:undocumented class}
*
* @package ${3:default}
* @author ${4}
**/
interface ${1}
{
${0:TARGET}
} // END interface $1
snippet c
/**
* $0
*/
snippet class_with_constructor
/**
* ${1}
*/
class ${2:#:ClassName}${3:#:extends}
{
$5
function ${4:__construct}(${5:#:argument})
{
${0:# code...}
}
}
snippet class
class ${2:#:ClassName} {
${0:TARGET}
}
snippet def
${1}defined('${2}')${0}
snippet do
do {
${0:TARGET}
} while (${1:#:condition});
snippet if?
$${1:#:retVal} = (${2:#:condition}) ? ${3:#:a} : ${4:#:b};
snippet ifelse
if (${1:#:condition}) {
${2:TARGET}
} else {
${3:#:code...}
}
${0}
snippet if
if (${1:#:condition}) {
${0:TARGET}
}
snippet var_dump
options head
var_dump(${0:TARGET});
snippet echo
echo "${1:#:string}"${0};
snippet else
else {
${0:TARGET}
}
snippet elseif
elseif (${1:#:condition}) {
${0:TARGET}
}
snippet for
for ($${1:i}=${2:0}; $$1 < ${3}; $$1++) {
${0:TARGET}
}
snippet fore
foreach ($${1:#:variable} as $${2:#:key}${3: =>} $${4:#:value}) {
${0:TARGET}
}
snippet con
function __construct(${1})
{
${0:TARGET}
}
snippet here
<<<${1:HTML}
${2:TARGET:#:content here}
$1;
snippet inc
include '${1:#:file}';${0}
snippet inco
include_once '${1:#:file}';${0}
snippet array
$${1:#:arrayName} = array('${2}' => ${3} ${0});
snippet req
require '${1:#:file}';${0}
snippet reqo
require_once '${1:#:file}';${0}
snippet ret
return${1};${0}
snippet retf
return false;
snippet rett
return true;
snippet case
case '${1:#:variable}':
${0:#:code...}
break;
snippet switch
abbr sw
switch (${1:#:variable}) {
case '${2:#:value}':
${3:#:code...}
break;
${0}
default:
${4:#:code...}
break;
}
snippet throw
throw new ${1}Exception(${2:"${3:#:Error Processing Request}"}${4:});
${0}
snippet while
abbr wh
while (${1}) {
${0:TARGET}
}
snippet gloabals
\$GLOBALS['${1:#:variable}']${2: = }${3:#:something}${4:;}${0}
snippet cookie
\$_COOKIE['${1:#:variable}']
snippet env
\$_ENV['${1:#:variable}']
snippet files
\$_FILES['${1:#:variable}']
snippet get
\$_GET['${1:#:variable}']
snippet post
\$_POST['${1:#:variable}']
snippet request
\$_REQUEST['${1:#:variable}']
snippet server
\$_SERVER['${1:#:variable}']
snippet session
\$_SESSION['${1:#:variable}']

View File

@ -1,119 +0,0 @@
snippet class
abbr class Class(...): ...
options head
class ${1:#:name}(${2:#:object}):
def __init__(self, ${3}):
${0}
snippet classd
abbr class Class(...): "..."
options head
class ${1:#:name}(${2:#:object}):
"""${3:#:class documentation}"""
def __init__(self, ${4}):
"""${5:#:__init__ documentation}"""
${0}
snippet def
abbr def function(...): ...
options head
def ${1:#:name}(${2}):
${0:TARGET}
snippet defd
abbr def function(...): """..."""
options head
def ${1:#:name}(${2}):
"""${3:#:function documentation}"""
${0:TARGET}
snippet defm
abbr def method(self, ...): ...
options head
def ${1:#:name}(self, ${2}):
${0:TARGET}
snippet defmd
abbr def method(self, ...): "..."
options head
def ${1:#:name}(self, ${2}):
"""${3:#:method documentation}"""
${0:TARGET}
snippet elif
abbr elif ...: ...
options head
elif ${1:#:condition}:
${0}
snippet else
abbr else: ...
options head
else:
${0}
snippet fileidiom
abbr f = None try: f = open(...) finally: ...
options head
${1:f} = None
try:
$1 = open(${2})
${0:TARGET}
finally:
if $1:
$1.close()
snippet for
abbr for ... in ...: ...
options head
for ${1:#:value} in ${2:#:list}:
${0:TARGET}
snippet if
abbr if ...: ...
options head
if ${1:#:condition}:
${0:TARGET}
snippet ifmain
abbr if __name__ == '__main__': ...
alias main
options head
if __name__ == '__main__':
${0:TARGET}
snippet tryexcept
abbr try: ... except ...: ...
options head
try:
${1:TARGET}
except ${2:#:ExceptionClass}:
${3}
snippet tryfinally
abbr try: ... finally: ...
options head
try:
${1:TARGET}
finally:
${2}
snippet while
abbr while ...: ...
options head
while ${1:#:condition}:
${0:TARGET}
snippet with
abbr with open({file}) as :
options head
with open(${1:#:filename, mode}) as f:
${0:TARGET}
snippet filter
abbr [x for x in {list} if {condition}]
[$1 for ${1:x} in ${2:#:list} if ${3:#:condition}]
snippet print
options word
print(${0:TARGET})

View File

@ -1,164 +0,0 @@
snippet rr
abbr render
render
snippet ra
abbr render :action
render action:
snippet rc
abbr render :controller
render controller:
snippet rf
abbr render :file
render file:
snippet ri
abbr render :inline
render inline:
snippet rj
abbr render :json
render json:
snippet rl
abbr render :layout
render layout:
snippet rp
abbr render :partial
render partial:
snippet rt
abbr render :text
render text:
snippet rx
abbr render :xml
render xml:
snippet dotiw
abbr distance_of_time_in_words
distance_of_time_in_words
snippet taiw
abbr time_ago_in_words
time_ago_in_words
snippet re
abbr redirect_to
redirect_to
snippet rea
abbr redirect_to :action
redirect_to action:
snippet rec
abbr redirect_to :controller
redirect_to controller:
snippet rst
abbr respond_to
respond_to
snippet bt
abbr belongs_to
belongs_to
snippet ho
abbr has_one
has_one
snippet hm
abbr has_many
has_many
snippet habtm
abbr has_and_belongs_to_many
has_and_belongs_to_many
snippet co
abbr composed_of
composed_of
snippet va
abbr validates_associated
validates_associated
snippet vb
abbr validates_acceptance_of
validates_acceptance_of
snippet vc
abbr validates_confirmation_of
validates_confirmation_of
snippet ve
abbr validates_exclusion_of
validates_exclusion_of
snippet vf
abbr validates_format_of
validates_format_of
snippet vi
abbr validates_inclusion_of
validates_inclusion_of
snippet vl
abbr validates_length_of
validates_length_of
snippet vn
abbr validates_numericality_of
validates_numericality_of
snippet vp
abbr validates_presence_of
validates_presence_of
snippet vu
abbr validates_uniqueness_of
validates_uniqueness_of
snippet logd
abbr logger.debug
logger.debug
snippet logi
abbr logger.info
logger.info
snippet logw
abbr logger.warn
logger.warn
snippet loge
abbr logger.error
logger.error
snippet logf
abbr logger.fatal
logger.fatal
snippet action
abbr action:
action:
snippet co_
abbr co________:
co________:
snippet id
abbr id:
id:
snippet object
abbr object:
object:
snippet partial
abbr partial:
partial:

View File

@ -1,121 +0,0 @@
snippet quickstart
options head
===========================
${1:#:content_name}
===========================
.. contents :: contents_name
title1
====================================
subtitle1
-----------------------------------
subtitle2
-----------------------------------
subtitle3
-----------------------------------
title2
====================================
subtitle1
-----------------------------------
subtitle2
-----------------------------------
subtitle3
-----------------------------------
title3
====================================
subtitle1
-----------------------------------
subtitle2
-----------------------------------
subtitle3
-----------------------------------
snippet contnents
options head
.. contents :: ${1:#:contents_name}
snippet title
options head
${1:#:title}
====================================
snippet subtitle
options head
${1:#:subtitle}
-----------------------------------
snippet code_block
abbr code
options head
.. code-block :: ${1:#:filetype}
${2:#:content}
snippet link_raw
abbr link_as_raw
options head
\`${1:#:link}\`_
snippet link_label
abbr link_and_label
options head
\`${1:#:title} <${2:#:link}>\`_
snippet table_grid
abbr grid_table
options head
+------------------+------------+-----------------------+------------+
|${1:#:cel} | | | |
+==================+============+=======================+============+
| | | | |
+------------------+------------+-----------------------+------------+
| | | | |
+------------------+------------+-----------------------+------------+
snippet table_simple
abbr simple_table
options head
:${1:#:text}:
: :
: :
: :
snippet list
options head
-
-
-
-
snippet nested_list
options head
- ${1:#:text}
-
-
-
snippet caption
options head
[#]
snippet image
options head
.. image :: ${1:#:path}
snippet strong
options head
**${1:#:text}**

View File

@ -1,148 +0,0 @@
snippet if
abbr if ... end
if ${1:#:condition}
${2:TARGET}
end
snippet def
abbr def ... end
def ${1:#:method_name}{}
${2:TARGET}
end
snippet defrescue
alias defr
abbr def ... rescue ... end
def ${1:#:method_name}
${2:TARGET}
rescue ${3:#:StandardError} => ${4:error}
${5}
end
snippet do
abbr do ... end
do
${1:TARGET}
end
snippet dovar
abbr do |var| ... end
do |${1:#:var}|
${2:TARGET}
end
snippet block
abbr { ... }
{
${1:TARGET}
}
snippet blockvar
abbr {|var| ... }
{|${1:#:var}|
${2:TARGET}
}
snippet fileopen
abbr File.open(filename) do ... end
File.open(${1:#:filename}, '${2:#:mode}') do |${3:io}|
${0:TARGET}
end
snippet edn
abbr => end?
end
snippet urlencode
# coding: utf-8
require 'erb'
puts ERB::Util.url_encode '${1}'
snippet encoding
alias enc
# coding: utf-8
${0}
snippet each
options word
each {|${1:#:variable}| ${2} }
snippet each_do
options word
each do |${1:#:variable}|
${2}
end
snippet each_byte
options word
each_byte {|${1:#:variable}| ${2} }
snippet each_char
options word
each_char {|${1:#:variable}| ${2} }
snippet each_index
options word
each_index {|${1:#:variable}| ${2} }
snippet each_key
options word
each_key {|${1:#:variable}| ${2} }
snippet each_line
options word
each_line {|${1:#:variable}| ${2} }
snippet each_with_index
options word
each_with_index {|${1:#:variable}| ${2} }
snippet map
options word
map {|${1:#:variable}| ${2} }
snippet sort
options word
sort {|${1:#:variable}| ${2} }
snippet sort_by
options word
sort_by {|${1:#:variable}| ${2} }
snippet lambda
options word
-> (${1:#:args}) { ${2} }
snippet lambda-keyword
options word
lambda {|${1:#:args}| ${2} }
snippet main
options head
if __FILE__ == \$0
${0:TARGET}
end
# This idiom is only for legacy ruby such as 1.9.3
snippet filedir-legacy-compatibility
alias __dir__
abbr File.dirname(...)
File.dirname(File.expand_path(__FILE__))
snippet glob
options head
Dir.glob(${1:'**/*'}) do |fname|
${0:TARGET}
end
snippet case
abbr case ... when ... else ... end
options head
case ${1}
when ${2}
${3}
else
${4}
end
# vim:set et ts=2 sts=2 sw=2 tw=0:

View File

@ -1,74 +0,0 @@
snippet match
abbr match {\n case .. => ..
match {
case ${1} => ${0}
}
snippet try
abbr try {} catch { case ... }
options head
try {
${1:TARGET}
} catch {
case e${2:: Exception} => ${0}
}
snippet p
abbr println()
println(${1})
snippet pn
abbr println('name, name)
println('${1:#:name}, $1)
snippet main
abbr def main(args: Array[String]) {
options head
def main(args: Array[String]) {
${0:TARGET}
}
snippet hello
abbr object HelloWorld { def main(...) }
options head
object HelloWorld {
def main(args: Array[String]) {
println("Hello, world!")
}
}
snippet object
options head
object ${1:X} {
${0:TARGET}
}
snippet should-scalatest
options word
should {
"${1}" in {
${0:TARGET}
}
}
snippet akka-actor
options head
import akka.actor.{ActorSystem, Actor, ActorLogging, Props}
object ${1:X} {
def props(${2}) = Props(new X($2))
}
class $1($2) extends Actor with ActorLogging {
def receive = {
case e =>
${0:TARGET:println(e)}
}
}
snippet package
options head
package `substitute(substitute(expand('%:h'), '^src/main/scala/', '', ''), '/', '.', 'g')`
# scala's indent plugin doesn't work well. use hard-tab for this snippet.
# vim: set noexpandtab :

View File

@ -1,20 +0,0 @@
snippet cond
(cond
((${1}) ${2})
(${0:else}))
snippet case
(case ${1}
((${2}) ${3})
(${0:else}))
# gauche specific
snippet gauche-testsuite
abbr (use gauche.test)(test-start ...
options head
(use gauche.test)
(test-start "${1}.scm")
(load "$1.scm")
(test* "${2}" ${3:expected} ${4:actual})

View File

@ -1,89 +0,0 @@
snippet if
if [ ${1:#:condition} ]; then
${0:TARGET}
fi
snippet el
else
${0:TARGET}
snippet elif
elif [ ${1:#:condition} ]; then
${0:TARGET}
snippet for
for ${1:i} in ${2:#:words}; do
${0:TARGET}
done
snippet while
alias wh
while ${1:#:condition} ; do
${0:TARGET}
done
snippet until
until ${1:#:condition} ; do
${0:TARGET}
done
snippet here
alias h
<<${1}
${0:TARGET}
snippet env
#!/usr/bin/env ${1}
snippet tmp
${1:TMPFILE}="mktemp -t ${2:untitled}"
trap "rm -f '$${1}'" 0 # EXIT
trap "rm -f '$${1}'; exit 1" 2 # INT
trap "rm -f '$${1}'; exit 1" 1 15 # HUP TERM
${0}
snippet function
alias func
${1:#:name}()
{
${0:TARGET}
}
snippet match-regexp
abbr =~
options head
if [[ $${1:string} =~ ${2:^regexp.*} ]]; then
${0}
fi
snippet assign
abbr var-assign
options head
${1:name}="${2:something}"
snippet case
options head
case "$${1:{name}}" in
${2:pattern*})
${0}
;;
*)
${3:echo "$$1\} Didn't match anything"}
esac
snippet warn
options head
echo "${0:TARGET}" 1>&2
snippet abort
options head
echo "${0:TARGET}" 1>&2
exit 1
# vim: set noexpandtab :

View File

@ -1,9 +0,0 @@
snippet snippet
abbr snippet abbr options <snippet code>
alias snip
options head
snippet ${1:#:trigger}
abbr ${2:#:abbr}
options head
${3:#:TARGET}

View File

@ -1,30 +0,0 @@
snippet CREATE TABLE
abbr CREATE TABLE { ... }
options head
CREATE TABLE ${1:cities} (
${0:name varchar(80), country_name text}
);
DROP TABLE $1;
snippet CREATE INDEX
abbr CREATE INDEX ... ON ... ( ... )
options head
CREATE INDEX ${1:_name} ON ${2:cities} (${3:name});
snippet INSERT
abbr INSERT INTO ... VALUES ( ... )
options head
INSERT INTO ${1:cities}
VALUES (${0:'Vancouver', 'Canada'});
snippet SELECT
abbr SELECT * from ...
options head
SELECT ${1:*} FROM ${2:cities} ${0:WHERE name = 'Vancouver'};
snippet TRANSACTION
alias BEGIN TRANSACTION
options head
BEGIN TRANSACTION;
${0:TARGET}
COMMIT;

View File

@ -1,6 +0,0 @@
snippet Host
options head
Host ${1:name}
HostName $1.${2:domain}
Port ${3}
${4:User }

View File

@ -1,355 +0,0 @@
snippet mathexpression
alias $
abbr $ expression $
$${1:#:expression}$${2}
# ========== ENVIRONMENT ==========
snippet begin
alias \begin
\begin{${1:#:type}}
${2:TARGET}
\end{$1}
snippet list
alias \begin{list} \list
\begin{list}
${1:TARGET}
\end{list}
snippet quotation
alias \begin{quotation} \quotation
\begin{quotation}
${1:TARGET}
\end{quotation}
snippet description
alias \begin{description} \description
\begin{description}
\item ${1:TARGET}
\end{description}
snippet sloppypar
alias \begin{sloppypar} \sloppypar
\begin{sloppypar}
${1:TARGET}
\end{sloppypar}
snippet enumerate
alias \begin{enumerate} \enumerate
\begin{enumerate}
\item ${1:TARGET}
\end{enumerate}
snippet theindex
alias \begin{theindex} \theindex
\begin{theindex}
${1:TARGET}
\end{theindex}
snippet itemize
alias \begin{itemize} \itemize
\begin{itemize}
\item ${1:TARGET}
\end{itemize}
snippet titlepage
alias \begin{titlepage} \titlepage
\begin{titlepage}
${1:TARGET}
\end{titlepage}
snippet verbatim
alias \begin{verbatim} verb \verbatim
\begin{verbatim}
${1:TARGET}
\end{verbatim}
snippet verbatimtab
alias \begin{verbatimtab} \verbatimtab
\begin{verbatimtab}[${1:8}]
${2:TARGET}
\end{verbatim}
snippet trivlist
alias \begin{trivlist} \trivlist
\begin{trivlist}
${1:TARGET}
\end{trivlist}
snippet verse
alias \begin{verse} \verse
\begin{verse}
${1:TARGET}
\end{verse}
snippet table
alias \begin{table} \table
\begin{table}
${1:TARGET}
\end{table}
snippet thebibliography
alias \begin{thebibliography} \thebibliography
\begin{thebibliography}
${1:TARGET}
\end{thebibliography}
snippet tabbing
alias \begin{tabbing} \tabbing
\begin{tabbing}
${1:TARGET}
\end{tabbing}
snippet note
alias \begin{note} \note
\begin{note}
${1:TARGET}
\end{note}
snippet tabular
alias \begin{tabular} \tabular
\begin{tabular}{${1}}
${2:TARGET}
\end{tabular}
snippet overlay
alias \begin{overlay} \overlay
\begin{overlay}
${1:TARGET}
\end{overlay}
snippet array
alias \begin{array} \array
\begin{array}{${1}}
${2:TARGET}
\end{array}
snippet slide
alias \begin{slide} \slide
\begin{slide}
${1:TARGET}
\end{slide}
snippet displaymath
alias \begin{displaymath} \displaymath
\begin{displaymath}
${1:TARGET}
\end{displaymath}
snippet abstract
alias \begin{abstract} \abstract
\begin{abstract}
${1:TARGET}
\end{abstract}
snippet eqnarray
alias \begin{eqnarray} \eqnarray
\begin{eqnarray}
${1:TARGET}
\end{eqnarray}
snippet eqnarray*
alias \begin{eqnarray*} \eqnarray*
\begin{eqnarray*}
${1:TARGET}
\end{eqnarray*}
snippet appendix
alias \begin{appendix} \appendix
\begin{appendix}
${1:TARGET}
\end{appendix}
snippet equation
alias \begin{equation} \equation
\begin{equation}
${1:TARGET}
\end{equation}
snippet equation*
alias \begin{equation*} \equation*
\begin{equation*}
${1:TARGET}
\end{equation*}
snippet center
alias \begin{center} \center
\begin{center}
${1:TARGET}
\end{center}
snippet document
alias \begin{document} \document
\begin{document}
${1:TARGET}
\end{document}
snippet figure
alias \begin{figure} \figure
\begin{figure}
\begin{center}
\includegraphics[${1:width=}]{${2}}
\caption{${3}}
\label{${4}}
\end{center}
\end{figure}
snippet filecontents
alias \begin{filecontents} \filecontents
\begin{filecontents}
${1:TARGET}
\end{filecontents}
snippet lrbox
alias \begin{lrbox} \lrbox
\begin{lrbox}
${1:TARGET}
\end{lrbox}
snippet flushleft
alias \begin{flushleft} \flushleft
\begin{flushleft}
${1:TARGET}
\end{flushleft}
snippet flushright
alias \begin{flushright} \flushright
\begin{flushright}
${1:TARGET}
\end{flushright}
snippet minipage
alias \begin{minipage} \minipage
\begin{minipage}
${1:TARGET}
\end{minipage}
snippet picture
alias \begin{picture} \picture
\begin{picture}
${1:TARGET}
\end{picture}
snippet math
alias \begin{math} \math
\begin{math}
${1:TARGET}
\end{math}
snippet quote
alias \begin{quote} \quote
\begin{quote}
${1:TARGET}
\end{quote}
# ========== SECTION ==========
snippet \part
alias part \part{
\part{${1}}
${0:TARGET}
snippet \chapter
alias chapter \chapter{
\chapter{${1}}
${0:TARGET}
snippet \section
alias section \section{
\section{${1}}
${0:TARGET}
snippet \subsection
alias subsection \subsection{
\subsection{${1}}
${0:TARGET}
snippet \subsubsection
alias subsubsection \subsubsection{
\subsubsection{${1}}
${0:TARGET}
snippet \paragraph
alias paragraph \paragraph{
\paragraph{${1}}
${0:TARGET}
snippet \subparagraph
alias subparagraph \subparagraph{
\subparagraph{${1}}
${0:TARGET}
# ========== FONT ==========
snippet bfseries
alias \begin{bfseries} \bfseries
\begin{bfseries}
${1:TARGET}
\end{bfseries}
snippet mdseries
alias \begin{mdseries} \mdseries
\begin{mdseries}
${1:TARGET}
\end{mdseries}
snippet ttfamily
alias \begin{ttfamily} \ttfamily
\begin{ttfamily}
${1:TARGET}
\end{ttfamily}
snippet sffamily
alias \begin{sffamily} \sffamily
\begin{sffamily}
${1:TARGET}
\end{sffamily}
snippet rmfamily
alias \begin{rmfamily} \rmfamily
\begin{rmfamily}
${1:TARGET}
\end{rmfamily}
snippet upshape
alias \begin{upshape} \upshape
\begin{upshape}
${1:TARGET}
\end{upshape}
snippet slshape
alias \begin{slshape} \slshape
\begin{slshape}
${1:TARGET}
\end{slshape}
snippet scshape
alias \begin{scshape} \scshape
\begin{scshape}
${1:TARGET}
\end{scshape}
snippet itshape
alias \begin{itshape} \itshape
\begin{itshape}
${1:TARGET}
\end{itshape}
# ========== OTHERS ==========
snippet usepackage
alias \usepackage
\usepackage${1:[${2\}]}{${3}}
snippet ref
alias \ref
\ref{${1}}${0}
snippet label
alias \label
\label{${1}}${0}
snippet cite
alias \cite
\cite{${1}}${0}

View File

@ -1,228 +0,0 @@
snippet if
abbr if endif
options head
if ${1:#:condition}
${0:TARGET}
endif
snippet elseif
options head
elseif ${1:#:condition}
${0:TARGET}
snippet ifelse
abbr if else endif
options head
if ${1:#:condition}
${2:TARGET}
else
${3}
endif
snippet for
abbr for in endfor
options head
for ${1:#:var} in ${2:#:list}
${0:TARGET}
endfor
snippet while
abbr while endwhile
options head
while ${1:#:condition}
${0:TARGET}
endwhile
snippet function
abbr func endfunc
alias func
options head
function! ${1:#:func_name}(${2})
${0:TARGET}
endfunction
snippet try
abbr try endtry
options head
try
${1:TARGET}
catch /${2:#:pattern}/
${3}
endtry
snippet tryfinally
abbr try ... finally ... endtry
alias tryf
options head
try
${1:TARGET}
finally
${2}
endtry
snippet catch
abbr catch /pattern/
options head
catch ${1:/${2:#:pattern: empty, E484, Vim(cmdname):{errmsg\\}\}/}
snippet echomsg
alias log
options head
echomsg string(${1:TARGET})
snippet command
abbr command call function
options head
command! ${1:#:command_name} call ${2:#:func_name}
snippet customlist
abbr customlist complete function
options head
function! ${1:#:func_name}(arglead, cmdline, cursorpos)
return filter(${2:#:list}, 'stridx(v:val, a:arglead) == 0')
endfunction
snippet augroup
abbr augroup with autocmds
options head
augroup ${1:#:augroup_name}
autocmd!
autocmd ${2:#:event}
augroup END
snippet redir
abbr redir => var
options head
redir => ${1:#:var}
${2::TARGET}
redir END
snippet NeoBundle
alias neobundle
abbr NeoBundle ''
NeoBundle '`getreg('+')=='' ? '<\`0\`>' : getreg('+')`'${0}
snippet NeoBundleLazy
alias neobundlelazy
abbr NeoBundleLazy ''
NeoBundleLazy '`getreg('+')=='' ? '<\`0\`>' : getreg('+')`', {
\ 'autoload' : {
\ ${0}
\ }}
snippet bundle_hooks
abbr neobundle hooks
let s:hooks = neobundle#get_hooks('${1}')
function! s:hooks.on_source(bundle)
${0}
endfunction
unlet s:hooks
snippet autoload
abbr autoload func endfunc
alias afunction afunc
options head
function! `substitute(matchstr(neosnippet#util#expand('%:p:r'), '/autoload/\zs.*$'), '/', '#', 'g')`#${1:#:func_name}(${2:#:args})
${0}
endfunction
snippet save_cpoptions
abbr let s:save_cpo = &cpo | set cpo&vim
alias s:save_cpo cpoptions
options head
let s:save_cpo = &cpo
set cpo&vim
${0}
let &cpo = s:save_cpo
unlet s:save_cpo
snippet g:loaded
abbr if exists('g:loaded_{plugin-name}')
alias loaded
options head
if exists('g:loaded_${1}')
finish
endif
${0}
let g:loaded_$1 = 1
snippet modeline
abbr " vim: {modeline}
" vim: ${0:foldmethod=marker}
snippet undo_ftplugin
abbr if !exists('b:undo_ftplugin')
alias b:undo_ftplugin
if !exists('b:undo_ftplugin')
let b:undo_ftplugin = ''
endif
${1}
let b:undo_ftplugin .= '
\ | setlocal ${2:#:option_name1< option_name2<...}
\'
snippet python
alias py
options head
abbr python <<EOF | EOF
python << EOF
${0}
EOF
snippet python3
alias py3
options head
abbr python3 <<EOF | EOF
python3 << EOF
${0}
EOF
snippet lua
options head
abbr lua <<EOF | EOF
lua << EOF
${0}
EOF
snippet save_pos
options head
abbr use pos save
let pos_save = getpos('.')
try
${0}
finally
call setpos('.', pos_save)
endtry
snippet save_register
options head
abbr use register save
let save_reg_$1 = getreg('${1}')
let save_regtype_$1 = getregtype('$1')
try
${0}
finally
call setreg('$1', save_reg_$1, save_regtype_$1)
endtry
snippet save_option
options head
abbr use option save
let $1_save = &${1}
let &$1 = ${2}
try
${0}
finally
let &$1 = $1_save
endtry
snippet p
abbr debug-echomsg
options head
echomsg string([${0:TARGET}])

View File

@ -1,35 +0,0 @@
snippet vital_of_without_let
abbr vital#of('...')
vital#of('${1:#:vital_name}')
snippet vital_of
abbr let s:V = vital#of('...')
options head
let ${1:s:V} = vital#of('${2:#:vital_name}')
snippet vital_import_without_let
abbr import
${1:s:V}.import('${2:Module}')
snippet vital_import
abbr let s:M = s:V.import('...')
options head
let ${1:s:M} = ${2:s:V}.import('${3:#:module_name}')
snippet vital_load_without_call
abbr s:V.load('...')
${1:s:V}.load('${2:#:module_name}')
snippet vital_load
abbr call s:V.load('...')
options head
call ${1:s:V}.load('${2:#:module_name}')
# FAQ
# Q. Why does this snip file has verbose prefix "vital_" for everything?
# A. Because it's vital.vim specific but this snip is available in any vim
# filetype buffers.
#
# Q. Why didn't provide X/X_with_Y instead of X_without_Y/X?
# A. To show what is encouraged. Programmers usually assume that they should
# always use shorter name of functions, so this snip followed the convention.

View File

@ -1,4 +0,0 @@
snippet sl
abbr => ls?
ls

View File

@ -1,7 +0,0 @@
include html
snippet xhtml
<html xmlns="http://www.w3.org/1999/xhtml">
${1:TARGET}
</html>