Difference between revisions of "Abbreviations plugin"

From Code::Blocks
m
m
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]].
 
* 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==
Line 31: Line 32:
 
<div style="margin-left: 2em;">
 
<div style="margin-left: 2em;">
 
<source lang="cpp">
 
<source lang="cpp">
#ifndef $(Guard·token)
+
#ifndef·$(Guard·token)
#define $(Guard·token)
+
#define·$(Guard·token)
  
 
|
 
|

Revision as of 20:24, 20 November 2011

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·(|)
{
····
};