Difference between revisions of "Abbreviations plugin"

From Code::Blocks
m
m (Formatting.)
 
(3 intermediate revisions by the same user not shown)
Line 10: Line 10:
 
'''Abbreviations''' provides auto-completion (note that this has nothing to do with [[Code Completion plugin|code completion]]). It is invoked by the keyboard shortcut '''Ctrl-J''' after typing a keyword. (For more complex macros see the [[KeyMacs plugin]].)
 
'''Abbreviations''' provides auto-completion (note that this has nothing to do with [[Code Completion plugin|code completion]]). It is invoked by the keyboard shortcut '''Ctrl-J''' after typing a keyword. (For more complex macros see the [[KeyMacs plugin]].)
 
* The <code>|</code> (pipe) symbol will determine the location of the cursor.
 
* The <code>|</code> (pipe) symbol will determine the location of the cursor.
* Macros like <code>$(my macro)</code> can be added, and will ask for user substitution on use.
+
* Macros like <code>$(my·macro)</code> can be added, and will ask for user substitution on use.
 +
* Macros such as <code>$NOW</code> are replaced with their [[Variable expansion#Time and date|actual value]].
 +
''Note: spaces have been shown as ''<code>·</code>'' (dots) to aid visibility.''
  
 
==Included keywords==
 
==Included keywords==
 
* class
 
* class
 
<div style="margin-left: 2em;">
 
<div style="margin-left: 2em;">
<source lang="cpp">
+
<source lang="cpp" enclose="div">
 
class·$(Class·name)|
 
class·$(Class·name)|
 
{
 
{
Line 29: Line 31:
 
* guard
 
* guard
 
<div style="margin-left: 2em;">
 
<div style="margin-left: 2em;">
<source lang="cpp">
+
<source lang="cpp" enclose="div">
#ifndef $(Guard·token)
+
#ifndef·$(Guard·token)
#define $(Guard·token)
+
#define·$(Guard·token)
  
 
|
 
|
Line 41: Line 43:
 
* if
 
* if
 
<div style="margin-left: 2em;">
 
<div style="margin-left: 2em;">
<source lang="cpp">
+
<source lang="cpp" enclose="div">
 
if·(|)
 
if·(|)
 
····;
 
····;
Line 49: Line 51:
 
* ifb
 
* ifb
 
<div style="margin-left: 2em;">
 
<div style="margin-left: 2em;">
<source lang="cpp">
+
<source lang="cpp" enclose="div">
 
if·(|)
 
if·(|)
 
{
 
{
Line 59: Line 61:
 
* ife
 
* ife
 
<div style="margin-left: 2em;">
 
<div style="margin-left: 2em;">
<source lang="cpp">
+
<source lang="cpp" enclose="div">
 
if·(|)
 
if·(|)
 
{
 
{
Line 73: Line 75:
 
* ifei
 
* ifei
 
<div style="margin-left: 2em;">
 
<div style="margin-left: 2em;">
<source lang="cpp">
+
<source lang="cpp" enclose="div">
 
if·(|)
 
if·(|)
 
{
 
{
Line 91: Line 93:
 
* for
 
* for
 
<div style="margin-left: 2em;">
 
<div style="margin-left: 2em;">
<source lang="cpp">
+
<source lang="cpp" enclose="div">
 
for·(|;·;·)
 
for·(|;·;·)
 
····;
 
····;
Line 99: Line 101:
 
* forb
 
* forb
 
<div style="margin-left: 2em;">
 
<div style="margin-left: 2em;">
<source lang="cpp">
+
<source lang="cpp" enclose="div">
 
for·(|;·;·)
 
for·(|;·;·)
 
{
 
{
Line 109: Line 111:
 
* now
 
* now
 
<div style="margin-left: 2em;">
 
<div style="margin-left: 2em;">
<source lang="cpp">
+
<source lang="cpp" enclose="div">
 
$NOW
 
$NOW
 
</source>
 
</source>
Line 116: Line 118:
 
* nowl
 
* nowl
 
<div style="margin-left: 2em;">
 
<div style="margin-left: 2em;">
<source lang="cpp">
+
<source lang="cpp" enclose="div">
 
$NOW_L
 
$NOW_L
 
</source>
 
</source>
Line 123: Line 125:
 
* nowlu
 
* nowlu
 
<div style="margin-left: 2em;">
 
<div style="margin-left: 2em;">
<source lang="cpp">
+
<source lang="cpp" enclose="div">
 
$NOW_L_UTC
 
$NOW_L_UTC
 
</source>
 
</source>
Line 130: Line 132:
 
* nowu
 
* nowu
 
<div style="margin-left: 2em;">
 
<div style="margin-left: 2em;">
<source lang="cpp">
+
<source lang="cpp" enclose="div">
 
$NOW_UTC
 
$NOW_UTC
 
</source>
 
</source>
Line 137: Line 139:
 
* struct
 
* struct
 
<div style="margin-left: 2em;">
 
<div style="margin-left: 2em;">
<source lang="cpp">
+
<source lang="cpp" enclose="div">
 
struct·|
 
struct·|
 
{
 
{
Line 147: Line 149:
 
* switch
 
* switch
 
<div style="margin-left: 2em;">
 
<div style="margin-left: 2em;">
<source lang="cpp">
+
<source lang="cpp" enclose="div">
 
switch·(|)
 
switch·(|)
 
{
 
{
Line 161: Line 163:
 
* tday
 
* tday
 
<div style="margin-left: 2em;">
 
<div style="margin-left: 2em;">
<source lang="cpp">
+
<source lang="cpp" enclose="div">
 
$TDAY
 
$TDAY
 
</source>
 
</source>
Line 168: Line 170:
 
* tdayu
 
* tdayu
 
<div style="margin-left: 2em;">
 
<div style="margin-left: 2em;">
<source lang="cpp">
+
<source lang="cpp" enclose="div">
 
$TDAY_UTC
 
$TDAY_UTC
 
</source>
 
</source>
Line 175: Line 177:
 
* today
 
* today
 
<div style="margin-left: 2em;">
 
<div style="margin-left: 2em;">
<source lang="cpp">
+
<source lang="cpp" enclose="div">
 
$TODAY
 
$TODAY
 
</source>
 
</source>
Line 182: Line 184:
 
* todayu
 
* todayu
 
<div style="margin-left: 2em;">
 
<div style="margin-left: 2em;">
<source lang="cpp">
+
<source lang="cpp" enclose="div">
 
$TODAY_UTC
 
$TODAY_UTC
 
</source>
 
</source>
Line 189: Line 191:
 
* wdu
 
* wdu
 
<div style="margin-left: 2em;">
 
<div style="margin-left: 2em;">
<source lang="cpp">
+
<source lang="cpp" enclose="div">
 
$WEEKDAY_UTC
 
$WEEKDAY_UTC
 
</source>
 
</source>
Line 196: Line 198:
 
* while
 
* while
 
<div style="margin-left: 2em;">
 
<div style="margin-left: 2em;">
<source lang="cpp">
+
<source lang="cpp" enclose="div">
 
while·(|)
 
while·(|)
 
····;
 
····;
Line 204: Line 206:
 
* whileb
 
* whileb
 
<div style="margin-left: 2em;">
 
<div style="margin-left: 2em;">
<source lang="cpp">
+
<source lang="cpp" enclose="div">
 
while·(|)
 
while·(|)
 
{
 
{

Latest revision as of 21:43, 17 March 2012

Abbreviations
Abbrev.png
Developer(s):
Maintainer(s):
Version: 0.1

Abbreviations provides auto-completion (note that this has nothing to do with code completion). It is invoked by the keyboard shortcut Ctrl-J after typing a keyword. (For more complex macros see the KeyMacs plugin.)

  • The | (pipe) symbol will determine the location of the cursor.
  • Macros like $(my·macro) can be added, and will ask for user substitution on use.
  • Macros such as $NOW are replaced with their actual value.

Note: spaces have been shown as · (dots) to aid visibility.

Included keywords

  • class
class·$(Class·name)|
{
public:
····$(Class·name)();
····~$(Class·name)();
protected:
private:
};
  • guard
#ifndef·$(Guard·token)
#define·$(Guard·token)

|

#endif·//·$(Guard·token)
  • if
if·(|)
····;
  • ifb
if·(|)
{
····
}
  • ife
if·(|)
{
····
}
else
{
····
}
  • ifei
if·(|)
{
····
}
else·if·()
{
····
}
else
{
····
}
  • for
for·(|;·;·)
····;
  • forb
for·(|;·;·)
{
····
}
  • now
$NOW
  • nowl
$NOW_L
  • nowlu
$NOW_L_UTC
  • nowu
$NOW_UTC
  • struct
struct·|
{
····
};
  • switch
switch·(|)
{
case·:
····break;

default:
····break;
}
  • tday
$TDAY
  • tdayu
$TDAY_UTC
  • today
$TODAY
  • todayu
$TODAY_UTC
  • wdu
$WEEKDAY_UTC
  • while
while·(|)
····;
  • whileb
while·(|)
{
····
};