From 0f75b2ad2e23107f8112b6dcd4785eeef6cc34aa Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 20 Jun 2024 05:56:58 +0200 Subject: Merging upstream version 2:9.1.0496. Signed-off-by: Daniel Baumann --- runtime/pack/dist/opt/comment/doc/comment.txt | 23 +++++++++++++++-------- runtime/pack/dist/opt/comment/doc/tags | 8 ++++++++ 2 files changed, 23 insertions(+), 8 deletions(-) create mode 100644 runtime/pack/dist/opt/comment/doc/tags (limited to 'runtime/pack/dist/opt/comment/doc') diff --git a/runtime/pack/dist/opt/comment/doc/comment.txt b/runtime/pack/dist/opt/comment/doc/comment.txt index e2bf755..25bd067 100644 --- a/runtime/pack/dist/opt/comment/doc/comment.txt +++ b/runtime/pack/dist/opt/comment/doc/comment.txt @@ -1,4 +1,4 @@ -*comment.txt* For Vim version 9.1. Last change: 2024 Apr 26 +*comment.txt* For Vim version 9.1. Last change: 2024 Jun 04 VIM REFERENCE MANUAL @@ -7,6 +7,8 @@ Commenting and un-commenting text. ============================================================================== +See |comment-install| on how to activate this package. + The comment.vim package, allows to toggle comments for a single line, a range of lines or a selected text object. It defines the following mappings: @@ -21,20 +23,25 @@ gcG to comment/uncomment from current line till the end of a buffer *v_gc* {Visual}gc to comment/uncomment the highlighted lines. -The plugin uses the buffer-local 'commentstring' option value to add or remove +This plugin uses the buffer-local 'commentstring' option value to add or remove comment markers to the selected lines. Whether it will comment or un-comment depends on the first line of the range of lines to act upon. When it matches a comment marker, the line will be un-commented, if it doesn't, the line will -be commented out. Blank and empty lines are not touched. - -If the mapping does not seem to work, chances are high, that this particular -filetype is either not detected by Vim or the filetype plugin does not set the -'commentstring' option. +be commented out. Blank and empty lines are ignored. + +The comment marker will always be padded with blanks whether or not the +'commentstring' value contains whitespace around "%s". + +If the mapping does not seem to work (or uses wrong comment markers), it might +be because of several reasons: +- the filetype is not detected by Vim, see |new-filetype|, +- filetype plugins are not enabled, see |:filetype-plugin-on| or +- the filetype plugin does not set the (correct) 'commentstring' option. You can simply configure this using the following autocommand (e.g. for legacy Vim script): > - autocmd Filetype vim :setlocal commentstring="\ %s + autocmd Filetype vim :setlocal commentstring="%s This example sets the " as start of a comment for legacy Vim Script. For Vim9 script, you would instead use the "#" char: > diff --git a/runtime/pack/dist/opt/comment/doc/tags b/runtime/pack/dist/opt/comment/doc/tags new file mode 100644 index 0000000..ec3569e --- /dev/null +++ b/runtime/pack/dist/opt/comment/doc/tags @@ -0,0 +1,8 @@ +b:comment_first_col comment.txt /*b:comment_first_col* +comment.txt comment.txt /*comment.txt* +g:comment_first_col comment.txt /*g:comment_first_col* +gcG comment.txt /*gcG* +gcc comment.txt /*gcc* +gcip comment.txt /*gcip* +o_gc comment.txt /*o_gc* +v_gc comment.txt /*v_gc* -- cgit v1.2.3