VIM技巧-Snippets

VIM SNIPPET

Universal

Trigger Explosion
date YYYY-MM-DD
ddate MM DD,YYYY
diso ISO format datetime
todo todo
uuid random
box box
bbox big box
fold fold head
foldc fold tail
foldp all fold
loremN text example
modeline vim modeline

Markdown

Trigger Explosion
sec head1
sec head2
sssec head3
par paragraph
spar sub praagraph
tabXY Create a table with scale of XxY
link Link to sth
img Image
ilc inline Code
cbl Code Block
refl Reference Link
* italics
** blod
*** blod italics
fnt FootNote
detail Details
pic alt

Java

Trigger Explosion
po protect
pu public
pr private
cl class
pcl public class
in interface
tc test class
ext extned
imp implements
\* comments
co constant
cos constant string
case case
elf else if
if if
def default
sw switch
el else
m method
v variable
d.al declaration ArrayList
d.hm declaration hashmap
d.hs declaration hashset
d.st declaration Stack
singlet singleton pattern
ab abstract
fi final
st static
sy synchronized
err error print
errf error printf
errl error println
as assert
ae assert equals
aae assert Equals
af aseert False
at assert True
ann assert NotNULL
an assert NULL
ass assert same
asns assert Not same
fa fail
ca catch
thr throw
ths throws
try try{} catch{}
tryf try catch finally
findall List.findall
findbyid Arrays.findById
/** javadoc
@au @author
@fi @file
@pa @param
@re @return
debug Logger.debug
error Logger.error
info Logger.info
warn Logger.warn
enfor for
for for
wh while
psvm public static void main
main same as psvm
sout System.out.println
serr System.err.println
print print
printf print message, agrs
println println
printlna println Arrays.toString()
set setter
get getter
re return
br break
t test
test same as t
Sc Scanner
action public static void xx()
rnf notFound
rbfin notFoundifNULL
rr redirect
ru unauthorized
unless unless ...
sleep try sleep catch
list Colletctions list
map Colletcions Map
set Collection Set
cn constructor
md method with javadoc
tc test case
jnt impirt junit
tt test throws

C

Trigger Explosion
def #define
#ifndef #ifndef ...
#if #if #endif
mark #pragma mark
main main()
for for loop
fori for(int i=)
fora for(a:A)
once header include once
fprintf ...
eli else if
printf ...
st struct
fun function{}
fund function declaration
head head info
func func header

CPP

Trigger Explosion
mian main()
begiend it begin -> end
cl class ...
forc for ...
ns namespace ...
readfile fread
vector std::vector<>
map std::map<>
tp tempate <typename ...>
cla header file
fnc function
boost_test BOOST_AUTO_TEST_CASE
boost_suite BOOST_AUTO_TEST_SUITE
boost_test_fixture BOOST_FIXTURE_TEST_CASE
boost_suite_fixture BOOST_FIXTURE_TEST_SUITE
posted @ 2021-08-26 09:30  司空亦墨  阅读(192)  评论(0编辑  收藏  举报