]> Sergey Matveev's repositories - codecomm.git/blob - doc/codecomm.txt
0156332533c5e2592c25ba40c89b08aa8c5a6207
[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. You can
13 override it in your .vimrc: >
14     let g:codecomm_file = "/another/path.txt"
15
16 PLUGIN USAGE                                             *codecomm-usage*
17
18 * Open necessary commit using Fugitive (:Gedit) and file inside it
19 * Visually select a bunch of code lines you want to comment
20 * Press <Leader>cc (usually "\cc") or call :CodeComm command
21   specifying the range
22 * You will see an additional window with your code
23 * Add necessary comment message below ----- >8 ----- line
24 * Either press <CR> in normal mode, or save buffer and exit
25 * Comment window will be closed, saving your consolidated changes
26   in temporary file
27 * To wipe out all your comments either call :CodeCommClear or remove
28   that temporary file)
29
30 CODECOMM FILE FORMAT                                     *codecomm-format*
31 >
32     -----# 2 [                            ec77b1f6b | src/pyderasn.py ]-----
33       79 def tag_encode(num, klass=TagClass.universal, form=TagForm.primitive):
34       80     if num < 31:
35       81         # [XX|X|.....]
36       82         return int2byte(klass.value | form.value | num)
37       83     # [XX|X|11111][1.......][1.......] ... [0.......]
38       84     return int2byte(klass.value | form.value | 31) + ...
39       85
40     ---------------------------------- >8 ----------------------------------
41     Here goes my comment.
42
43 Header line contains:
44
45 * Comment's serial number (#2 in example above)
46 * Optional commit's hash (ec77b1f6b)
47 * Full path to commented file inside repository
48
49 LICENCE                                                *codecomm-license*
50
51 Copyright (C) 2017-2020 Sergey Matveev <stargrave@stargrave.org>
52
53 This program is free software: you can redistribute it and/or modify
54 it under the terms of the GNU General Public License as published by
55 the Free Software Foundation, version 3 of the License.
56
57 This program is distributed in the hope that it will be useful,
58 but WITHOUT ANY WARRANTY; without even the implied warranty of
59 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
60 GNU General Public License for more details.
61
62 You should have received a copy of the GNU General Public License
63 along with this program.  If not, see <http://www.gnu.org/licenses/>.
64
65  vim:filetype=help