Difference between revisions of "Abbreviations plugin"

From Code::Blocks
m
m (Formatting.)
 
Line 17: Line 17:
 
* 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 31: 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 43: 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 51: 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 61: 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 75: 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 93: 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 101: 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 111: 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 118: 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 125: 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 132: 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 139: 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 149: 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 163: 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 170: 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 177: 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 184: 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 191: 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 198: 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 206: 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·(|)
{
····
};