]> Sergey Matveev's repositories - codecomm.git/blob - doc/codecomm.txt
3817355d32a3d6ae507640d669aca7382973c435
[codecomm.git] / doc / codecomm.txt
1 *codecomm.txt*  Code comments preparation helper
2
3 OVERVIEW                                              *codecomm-overview*
4
5 Sometimes you need to comment some software source code and send it via
6 email. How do you reference to commit, filepath and exact lines in the
7 code there? This plugin helps you to do that.
8
9 CONFIGURATION                                           *codecomm-config*
10
11 The only option for the Vim plugin is the placement of temporary file
12 with aggregated comments. By default it is /tmp/codecomm.txt.
13 You can override /tmp with $TMPDIR environment variable and the whole
14 file path with: >
15     let g:codecomm_file = "/another/path.txt"
16
17 PLUGIN USAGE                                             *codecomm-usage*
18
19 * Open necessary commit using Fugitive (:Gedit) and file inside it.
20   If you won't use Fugitive, then commit hash won't be set in the
21   message, but everything should work the same way anyway
22 * Visually select a bunch of code lines you want to comment
23 * Press <Leader>cc or call :{range}CodeComm command
24 * You will see an additional window with your selection
25 * Add necessary comment message below ----- >8 ----- line
26 * Save buffer and exit
27 * Comment window will be closed, saving your consolidated changes
28   in g:codecomm_file
29 * To wipe out all your comments you can call :CodeCommClear
30 * To edit comments you can call :CodeCommEdit
31
32 CODECOMM FILE FORMAT                                     *codecomm-format*
33 >
34     -----# 2 [                            ec77b1f6b | src/pyderasn.py ]-----
35       79 def tag_encode(num, klass=TagClass.universal, form=TagForm.primitive):
36       80     if num < 31:
37       81         # [XX|X|.....]
38       82         return int2byte(klass.value | form.value | num)
39       83     # [XX|X|11111][1.......][1.......] ... [0.......]
40       84     return int2byte(klass.value | form.value | 31) + ...
41       85
42     ---------------------------------- >8 ----------------------------------
43     Here goes my comment.
44
45 Header contains:
46
47 * Comment's number (#2 in example above)
48 * Optional commit's hash (ec77b1f6b)
49 * Full path to commented file inside repository
50
51 LICENCE                                                *codecomm-license*
52
53 Copyright (C) 2017-2020 Sergey Matveev <stargrave@stargrave.org>
54
55 This program is free software: you can redistribute it and/or modify
56 it under the terms of the GNU General Public License as published by
57 the Free Software Foundation, version 3 of the License.
58
59 This program is distributed in the hope that it will be useful,
60 but WITHOUT ANY WARRANTY; without even the implied warranty of
61 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
62 GNU General Public License for more details.
63
64 You should have received a copy of the GNU General Public License
65 along with this program.  If not, see <http://www.gnu.org/licenses/>.
66
67  vim: filetype=help