Questions tagged [comments]

Comments are programmer-readable annotations in source code which are ignored by the parser.

16 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5
votes
0answers
89 views

Comments pane for current buffer that you can jump to such as TODO:, WARN:, and NOTE:?

A while ago I used to use eclipse as my IDE, and I remember you could add TODO: some task, NOTE: some comment, WARN: some warning to your code, and it would appear in a particular pane for the current ...
4
votes
0answers
73 views

How to get bold comments in vim

I am trying to add bold comments to my vim files. What i mean, is to be able to get something like this: I saw other articles like this that allow to toggle bold comment. The proposed solutions from ...
3
votes
0answers
138 views

Formatting blocks of "commented out" text

I would like to be able to edit and format blocks of comments (in different markup and programming languages) as if the commenting characters (generally in the beginning of the lines) are ignored. ...
2
votes
1answer
120 views

vim and enhancedcommentify weird behavior for C

I am trying to use EnhancedCommentify plugin for vim and mostly using C. However I can't figure out the issue but when I comment/uncomment it uses (* ---- *) instead of /* ----- */. I tried to change ...
2
votes
0answers
31 views

Applying full auto-format to comments but not code

I am considering using Vim's auto-format feature (i.e., adding a to formatoptions). However, I can't seem to figure out a combination of options that will give me the configuration that I want. For ...
2
votes
0answers
52 views

Syntax highlighting depending on whether whole line is commented

Is it possible to have vim highlight folds differently depending on whether every line in a fold is only comments or whitespace? In that case, how?
2
votes
0answers
224 views

Possible to exclude comments from textwidth?

I recently discovered the textwidth setting, which lets me configure vim to insert a "smart" whitespace-delimited carriage return as I'm typing when my line of text exceeds my specified limit. Is ...
1
vote
0answers
205 views

Javascript syntax-highlight for JsDoc comments

I now use plugin vim-javascript just to have a nice syntax highlight for JsDoc comments in my Javascript files. vim-javascript provides nice colors highlight but it conflict with all parentheses ...
1
vote
1answer
125 views

Dynamically toggle formatoptions based on input

Question: Is there a way to control the indentation + comment leader input, when adding a new line? Details: I am trying to set formatoptions-=cro when inserting a new line (in specific syntax region)...
1
vote
0answers
178 views

Indentation in three piece comments in javascript

I use Vim 7.4.2149 and the plugin pangloss/vim-javascript for js indentation. I need to get comments like: /* * */ But instead I get: /* * * */ I'm not really interested in syntax ...
0
votes
0answers
24 views

How to make spell ignore all Comment groups?

I am using gruvbox color theme which wasn't showing spell mistakes in terminal so I had to overwrite SpellBad. My method of doing this is this: function! MyHighlights() abort hi SpellBad term=NONE ...
0
votes
0answers
36 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),...
0
votes
0answers
34 views

How can I highlight Doxygen comments in italics, in C?

Currently in my .vimrc is: " C specifics autocmd BufRead,BufNewFile *.h,*.c set filetype=c.doxygen " italic comments highlight Comment cterm=italic This results in italic highlighting for ...
0
votes
0answers
20 views

vim highlights the same occurence of a string and :nohl does not clear it

I have accidently pressed something and the string "#def" now always shows a white (as opposed to my regular dark) background: This occured while trying to comment out a function in python. ...
0
votes
0answers
42 views

Auto-insert C++ comment only on <shift+enter>

The comment auto-insert feature is often very helpful and otherwise very annoying, depending on the kind of comment I am writing. Is it possible to bind the auto-insertion of // exclusively to <...
0
votes
0answers
114 views

How do I get Vim (with TComment) to do proper block comments in OCaml?

(I have TComment installed, and I'm on NeoVim 0.4.0.) Given this code, for example: let mem key st = let is_matching_key = function | Positional _ -> false | Flag f -> f.name == key ...