C++NamespaceTool
Simple C++ namespace refactoring package for Sublime Text 2 & 3
Details
Installs
- Total 18K
- Win 10K
- Mac 2K
- Linux 6K
Mar 26 | Mar 25 | Mar 24 | Mar 23 | Mar 22 | Mar 21 | Mar 20 | Mar 19 | Mar 18 | Mar 17 | Mar 16 | Mar 15 | Mar 14 | Mar 13 | Mar 12 | Mar 11 | Mar 10 | Mar 9 | Mar 8 | Mar 7 | Mar 6 | Mar 5 | Mar 4 | Mar 3 | Mar 2 | Mar 1 | Feb 28 | Feb 27 | Feb 26 | Feb 25 | Feb 24 | Feb 23 | Feb 22 | Feb 21 | Feb 20 | Feb 19 | Feb 18 | Feb 17 | Feb 16 | Feb 15 | Feb 14 | Feb 13 | Feb 12 | Feb 11 | Feb 10 | Feb 9 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 0 | 1 | 0 | 0 | 1 | 1 | 1 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 2 | 1 | 0 | 1 | 0 |
Mac | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Linux | 1 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 2 | 1 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 |
Readme
- Source
- raw.githubusercontent.com
C++NamespaceTool is a simple C++ namespace refactoring package for Sublime Text 2 & 3.
Installation
C++NamespaceTool can be installed using Package Control with the Install Package option.
Description
In C++ programming, writing using namespace std
is considered a bad practice. The preferred way is to either explicitly state somewhere at the top which functions, classes, and types are used with using namespace::word
statements or to explicitly type the namespace (usually std
) at each occurence of the word. Sometimes, starting with one of the options, the programmer may want to convert to the other option. C++NamespaceTool is designed with the goal of automating this task.
Usage
The shortcut is Ctrl-Shift-R
on all platforms (Right-click->Refactor namespace
should also appear and do exactly the same work when C++ files are open). When using
statements are selected, activating the tool will convert the selected using
statements to inline namespace::word
format. When inline namespace::word
items are selected, activating the tool will convert all occurences of the selected items into just word
and put a using
statement at the top of the file.
Example usage:
Using the keyboard shortcut:
Using the right-click context menu:
Configuration
You can add namespaces besides std (warning: sub-namespaces are not supported at the moment), and file extensions for the right-click menu item to appear (most frequently seen file extensions are already in the configuration file) here: Preferences -> Package Settings -> C++NamespaceTool->Settings
.
You can also change the shortcut key here: Preferences -> Package Settings -> C++NamespaceTool->Key Bindings
.
Contact
You can leave bug reports, feature requests, or comments using the issues section.
Thanks!
Thank you for your interest in this package!