*codecomm.txt* Code comments preparation helper OVERVIEW *codecomm-overview* Sometimes you need to comment some software source code and send it via email. How do you reference to commit, filepath and exact lines in the code there? This plugin helps you to do that. CONFIGURATION *codecomm-config* The only option for the Vim plugin is the placement of temporary file with aggregated comments. By default it is /tmp/codecomm.txt. You can override /tmp with $TMPDIR environment variable and the whole file path with: > let g:codecomm_txt = "/another/path.txt" let g:codecomm_ctr = "/another/path.ctr" PLUGIN USAGE *codecomm-usage* * Open necessary commit using Fugitive (:Gedit) and file inside it. If you won't use Fugitive, then commit hash won't be set in the message, but everything should work the same way anyway * Visually select a bunch of code lines you want to comment * Press cc or call :{range}CodeComm command * You will see an additional window with your selection * Add necessary comment message below ----- >8 ----- line * Save buffer and exit * Comment window will be closed, saving your consolidated changes in g:codecomm_file * To wipe out all your comments you can call :CodeCommClear * To edit comments you can call :CodeCommEdit CODECOMM FILE FORMAT *codecomm-format* > -----# 2 [ ec77b1f6b | src/pyderasn.py ]----- 79 def tag_encode(num, klass=TagClass.universal, form=TagForm.primitive): 80 if num < 31: 81 # [XX|X|.....] 82 return int2byte(klass.value | form.value | num) 83 # [XX|X|11111][1.......][1.......] ... [0.......] 84 return int2byte(klass.value | form.value | 31) + ... 85 ---------------------------------- >8 ---------------------------------- Here goes my comment. Header contains: * Comment's number (#2 in example above) * Optional commit's hash (ec77b1f6b) * Full path to commented file inside repository LICENCE *codecomm-license* Copyright (C) 2017-2024 Sergey Matveev This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 3 of the License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . vim: filetype=help