Commit 625b0ae6 authored by Yuchen Deng's avatar Yuchen Deng Committed by Leandro T. C. Melo
Browse files

Snippets: Put the cursor in a more useful final position

e.g.
for (int $var$ = 0; $var$ < $total$; ++$var$) {
$$
}

In final, we need put the cursor at the $$ position.
This makes the code easier to write.

Change-Id: Ied1e6f6bc15277dae43d3052bfb2543124afcb82
Merge-request: 2207
Reviewed-on: http://codereview.qt-project.org/6165

Reviewed-by: default avatarLeandro T. C. Melo <leandro.melo@nokia.com>
parent 85cfc501
......@@ -26,38 +26,36 @@ public:
$name$() {}
};</snippet>
<snippet group="C++" trigger="do" id="cpp_do">do {
$$
} while ($condition$);</snippet>
<snippet group="C++" trigger="else" id="cpp_else" >else {
$$
}</snippet>
<snippet group="C++" trigger="else" id="cpp_elsewithif" complement="with if">else if ($condition$) {
$$
}</snippet>
<snippet group="C++" trigger="for" id="cpp_for">for (int $var$ = 0; $var$ &lt; $total$; ++$var$) {
$$
}</snippet>
<snippet group="C++" trigger="foreach" id="cpp_foreach">foreach ($var$, $container$) {
$$
}</snippet>
<snippet group="C++" trigger="if" id="cpp_if">if ($condition$) {
$$
}</snippet>
<snippet group="C++" trigger="if" id="cpp_ifandelse" complement="and else">if ($condition$) {
$$
} else {
}</snippet>
<snippet group="C++" trigger="namespace" id="cpp_namespace">namespace $name$ {
$$
}</snippet>
<snippet group="C++" trigger="try" id="cpp_trycatch" complement="and catch">try {
$$
} catch (...) {
}</snippet>
<snippet group="C++" trigger="using" id="cpp_usingnamespace" complement="namespace">using namespace $name$;</snippet>
<snippet group="C++" trigger="while" id="cpp_while">while ($condition$) {
$$
}</snippet>
</snippets>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment