Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

c++ snippets

  • Loading branch information...
commit e6560fcb826d170bdd10e3929609de2d7dac3cc9 1 parent 642d926
Jun Wu authored
Showing with 14 additions and 1 deletion.
  1. +14 −1 .vim/snippets/cpp.snippets
15 .vim/snippets/cpp.snippets
View
@@ -35,6 +35,19 @@ for (__typeof($1.begin()) ${2:it} = ${1:m}.begin(); $2 != $1.end(); ++$2) {
}${0}
endsnippet
-snippet sort "sort(...)" !b
+snippet sort "sort(vector)" !b
sort(${1:v}.begin(), $1.end());${0}
endsnippet
+
+snippet sorta "sort(array)" !b
+sort(${1:a}, $1 + sizeof($1) / sizeof($1[0]));${0}
+endsnippet
+
+snippet nextp "next_permutation(vector)" !
+next_permutation(${1:v}.begin(), $1.end());${0}
+endsnippet
+
+snippet nextpa "next_permutation(vector)" !
+next_permutation(${1:a}, $1 + sizeof($1) / sizeof($1[0]));${0}
+endsnippet
+
Please sign in to comment.
Something went wrong with that request. Please try again.