Questions tagged [plugin-vim-commentary]

Questions about vim-commentary a plugin that ease commenting and un-commenting code sections

Filter by
Sorted by
Tagged with
1 vote
0 answers
20 views

How to use different comment string for yaml blocks inside markdown files?

Many markdown implementations allow for a leading yaml configuration block like so: --- title: "My title" date: 2023-12-29 --- ## Heading Some markdown text With the vim commentary plugin,...
joelostblom's user avatar
2 votes
1 answer
364 views

How to comment html in php file in vim?

I use this plugin for comments. Plug 'tpope/vim-commentary' And when I comment html code in php I get /* <div class="our-photos"> */ /* <h2 class="our-photos__main-title"...
serii 's user avatar
  • 77
0 votes
0 answers
58 views

Marking/Annotating lines with symbols (with external storage)

When I audit code I perform a lot of annotations/mark lines. (what audited, by whom, if we have open issue, etc etc...). When I work with code I would like to mark lines (both individually and ranges),...
Grzegorz Wierzowiecki's user avatar
1 vote
2 answers
2k views

How to remap vim-commentary commands?

I have downloaded the vim-commentary plugin for commenting in vim. I was trying to remap the default shortcuts for the plugin so as to use ctrl+/ for commenting and remove commenting (default is gc). ...
Cs_rlm's user avatar
  • 11
2 votes
2 answers
2k views

Adding new filetypes with vim commentary

I'm trying to add include an unsupported filetype, gf, with vim commentary. The comments are simple, just prepend -- to any line, as in the Haskell tradition. According to the vim-commentary git, ...
Warrick Macmillan's user avatar
1 vote
1 answer
380 views

Comments for github flavored markdown with vim-commentary

vim-commentary is a great plugin for commenting and uncommenting lines. However if some filetype isn't supported, as per documentation, one can do the following: (see FAQ) autocmd FileType apache ...
mahbubweb's user avatar
  • 592
2 votes
1 answer
538 views

How can I use a plugin mapping in my own mapping?

I often repeat the following commands when I edit code: yy - yank the line gcc - comment out the line (so that I can visually see all the changes later) p - paste back the copied version what I will ...
Horror Vacui's user avatar
5 votes
1 answer
2k views

How to add JavaScript and JSX comments in the same .js file

I've been using Neovim to do the majority of my dev work for most of 2018 however something that has eluded me is being able to quickly toggle JSX comments {/* JSX */} and regular Javascript ...
ipatch's user avatar
  • 1,879
4 votes
2 answers
4k views

vim comment out every line of text containing a pattern using the 'global' command

In my file containing LaTeX source code, I wish to comment out all the lines matching a pattern (specifically, the pattern that I am interested in is \draw, including the \ character). I have magic ...
Dr Krishnakumar Gopalakrishnan's user avatar
0 votes
2 answers
2k views

How can I change/delete comments easily?

For commenting and uncommenting I now use the vim-commentary plugin, also the NERD commenter can be used as mentioned in: How to comment out a set of lines which are selected in visual mode? I would ...
agold's user avatar
  • 225
1 vote
2 answers
477 views

Comment line into a box and undo

What I want I want create a mapping which comments a line into a box, for example textline shall be transformed to " ############################################################################## "...
cbaumhardt's user avatar
  • 2,119