Skip to content

Commit 8f01b27

Browse files
author
Fabian Schilf
committed
updated README
1 parent f19c900 commit 8f01b27

File tree

3 files changed

+41
-9
lines changed

3 files changed

+41
-9
lines changed

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@ install:
1010

1111
script:
1212
- python -m pytest -r tests/test_tokenizer.py
13-
- python -m pytest -r tests/test_parser.py
13+
- python -m pytest -r tests/test_parser.py
14+
- python -m pytest -r tests/test_generator.py

C++ Classhelper.sublime-settings

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,13 @@
88
// set to false if you want to use alternative header style
99
"use_pragma_once": true,
1010

11-
"newline_after_template": false,
12-
"newline_after_method": false,
13-
"place_cursor_between_brackets": false
11+
// inserts a newline after every template
12+
"newline_after_template": true,
13+
14+
// inserts newline after method definitions
15+
// curly brackets will be placed to the next line
16+
"newline_after_method": true,
17+
18+
// places the cursor inside the brackets, so you can directly start typing
19+
"place_cursor_between_brackets": true
1420
}

README.md

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Sublime Text Plugin for creating/generating C++ Classes.
44

5-
![Downloads](https://img.shields.io/packagecontrol/dt/C++%20Classhelper.svg?color=%233a9ff5&style=flat-square) ![GitHub release](https://img.shields.io/github/release/pr0grammr/cppclasshelper-sublime-text-plugin.svg?color=%2360ce52&style=flat-square) ![Travis (.com) branch](https://img.shields.io/travis/com/pr0grammr/cppclasshelper-sublime-text-plugin/feature%2Fgenerate-method-definitions.svg?style=flat-square)
5+
<a href="https://packagecontrol.io/packages/C%2B%2B%20Classhelper" target="_blank"><img src="https://img.shields.io/packagecontrol/dt/C++%20Classhelper.svg?color=%233a9ff5&style=flat-square"></a> <a href="https://github.com/pr0grammr/cppclasshelper-sublime-text-plugin/releases/latest"><img src="https://img.shields.io/github/release/pr0grammr/cppclasshelper-sublime-text-plugin.svg?color=%2360ce52&style=flat-square"></a> <img src="https://img.shields.io/travis/com/pr0grammr/cppclasshelper-sublime-text-plugin/feature%2Fgenerate-method-definitions.svg?style=flat-square">
66

77
## Installation
88

@@ -22,17 +22,42 @@ Copy the folder in the sublime text package directory. You'll find it by clickin
2222

2323
## Usage
2424

25+
26+
### Class generation
2527
Right-click on the folder in your sidebar, where you want to create your class and click `Create C++ Class`. Enter your classname without file extension in the input panel. After you entered the name, hit return. The sourcefile and headerfile for your class will now be created in the folder you clicked in the sidebar.
2628

27-
<img src="https://raw.githubusercontent.com/pr0grammr/cppclasshelper-sublime-text-plugin/master/preview.gif">
29+
<img src="https://raw.githubusercontent.com/pr0grammr/cppclasshelper-sublime-text-plugin/master/class-generation.gif">
30+
31+
### Class method generation
32+
33+
Since version **1.2.0** you are able to generate definitions for your class methods.
34+
35+
<img src="https://raw.githubusercontent.com/pr0grammr/cpp-classhelper-sublime-text-plugin/master/method-definition.gif">
36+
37+
Press <kbd>CTRL</kbd> + <kbd>SHIFT</kbd> + <kbd>P</kbd> to open command palette. Type in `C++ Classhelper - Generate Method Definition` and select the method you want to generate the definition.
2838

2939
## Settings
3040

3141
```javascript
3242
{
33-
"open_after_creation": true, // opens the class after creation
34-
"header_file_extension": "hpp", // file extension in which the headerfile is created (e.g.: hpp or h)
35-
"use_pragma_once": true // if set to false, alternative header style will be used
43+
// opens the class after creation
44+
"open_after_creation": true,
45+
46+
// file extension in which the headerfile is created (e.g.: hpp or h)
47+
"header_file_extension": "hpp",
48+
49+
// if set to false, alternative header style will be used
50+
"use_pragma_once": true
51+
52+
// inserts a newline after every template
53+
"newline_after_template": true,
54+
55+
// inserts newline after method definitions
56+
// curly brackets will be placed to the next line
57+
"newline_after_method": true,
58+
59+
// places the cursor inside the brackets, so you can directly start typing
60+
"place_cursor_between_brackets": true
3661
}
3762
```
3863

0 commit comments

Comments
 (0)