C++NamespaceTool
Simple C++ namespace refactoring package for Sublime Text 2 & 3
Details
Installs
- Total 18K
- Win 10K
- Mac 2K
- Linux 5K
Jan 21 | Jan 20 | Jan 19 | Jan 18 | Jan 17 | Jan 16 | Jan 15 | Jan 14 | Jan 13 | Jan 12 | Jan 11 | Jan 10 | Jan 9 | Jan 8 | Jan 7 | Jan 6 | Jan 5 | Jan 4 | Jan 3 | Jan 2 | Jan 1 | Dec 31 | Dec 30 | Dec 29 | Dec 28 | Dec 27 | Dec 26 | Dec 25 | Dec 24 | Dec 23 | Dec 22 | Dec 21 | Dec 20 | Dec 19 | Dec 18 | Dec 17 | Dec 16 | Dec 15 | Dec 14 | Dec 13 | Dec 12 | Dec 11 | Dec 10 | Dec 9 | Dec 8 | Dec 7 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 0 | 1 | 1 | 0 | 0 | 1 | 0 | 2 | 1 | 0 | 1 | 1 | 0 | 0 | 2 | 0 | 0 | 2 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 0 | 1 | 0 | 2 | 1 | 0 | 0 | 0 | 0 | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
Mac | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 2 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Linux | 0 | 0 | 0 | 0 | 0 | 2 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 2 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 0 | 1 | 0 | 1 | 0 |
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!