From 5af53f4d5edf2133ed79a0f845987f5179c64e6c Mon Sep 17 00:00:00 2001 From: Thomas Manning Date: Mon, 30 Dec 2019 19:52:01 +0000 Subject: [PATCH] Add docs for the ic text object This addresses https://github.com/tomtom/tcomment_vim/issues/255 and https://github.com/tomtom/tcomment_vim/issues/188. It also partially addresses https://github.com/tomtom/tcomment_vim/issues/237 (by making it clear that the functionality exists, even if it doesn't quite do what's being asked for there). --- doc/tags | 1 + doc/tcomment.txt | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/doc/tags b/doc/tags index 06e16f0..d8eaf19 100644 --- a/doc/tags +++ b/doc/tags @@ -56,4 +56,5 @@ tcomment-debug tcomment.txt /*tcomment-debug* tcomment-maps tcomment.txt /*tcomment-maps* tcomment-new-filetype tcomment.txt /*tcomment-new-filetype* tcomment-operator tcomment.txt /*tcomment-operator* +tcomment-textobject tcomment.txt /*tcomment-textobject* tcomment.txt tcomment.txt /*tcomment.txt* diff --git a/doc/tcomment.txt b/doc/tcomment.txt index a7cc627..fb49294 100644 --- a/doc/tcomment.txt +++ b/doc/tcomment.txt @@ -121,6 +121,14 @@ A secondary set of key maps is defined for normal and insert mode (see also __ :: :TComment _i :: :TCommentInline + *tcomment-textobject* + +A text object is also added for selecting an inner-comment: + + {operator}ic :: Operate on the inner comment. The mapping can be changed + using the `g:tcomment_textobject_inlinecomment` variable + or disabled by setting it to the empty string, `''`. + ----------------------------------------------------------------------- @@ -256,6 +264,10 @@ g:tcomment_mapleader_uncomment_anyway (default: 'g<') g:tcomment_mapleader_comment_anyway (default: 'g>') See |tcomment-operator|. + *g:tcomment_textobject_inlinecomment* +g:tcomment_textobject_inlinecomment (default: 'ic') + See |tcomment-textobject|. + *:TComment* :[range]TComment[!] ?ARGS... If there is a visual selection that begins and ends in the same line,