diff options
author | Jesse Luehrs <doy@tozt.net> | 2009-06-03 23:22:02 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2009-06-03 23:22:02 -0500 |
commit | 28ec8a4ecf3726f6caece1b7266f6e3dbaf3887c (patch) | |
tree | e4d2c4fc9db2eaa1aa2912328e046fca2d2d1a5f /vim/snippets | |
parent | fc1b78b39753a20a8aaf78fa8f353f0525cf6aec (diff) | |
download | conf-28ec8a4ecf3726f6caece1b7266f6e3dbaf3887c.tar.gz conf-28ec8a4ecf3726f6caece1b7266f6e3dbaf3887c.zip |
add c++ snippet for looping over a vector
Diffstat (limited to 'vim/snippets')
-rw-r--r-- | vim/snippets/cpp.snippets | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/vim/snippets/cpp.snippets b/vim/snippets/cpp.snippets index a10a88f..4a3b7c7 100644 --- a/vim/snippets/cpp.snippets +++ b/vim/snippets/cpp.snippets @@ -28,3 +28,10 @@ snippet cl private: ${3:/* data */} }; +# for loop with iterators +snippet forv + for (std::vector<${1:int}>::const_iterator ${2:it} = ${3:vec}.begin(); + $2 != $3.end(); + ++$2) { + ${4:/* code */} + } |