Questions tagged [block-comment]

A multiple-line comment in computer code.

A multiple-line comment in computer code.

10 questions
147
votes
6 answers

How to comment multiple lines at once?

How can I select a bunch of text and comment it all out? Currently I go to the first line, go to insert mode then type # left-arrowdown-arrow and then I repeat that sequence, perhaps saving a few keystrokes by using the . repeat feature to do each…
Michael Durrant
  • 41,213
  • 69
  • 165
  • 232
17
votes
5 answers

vimrc - how to block comment?

I don't want to comment lines of text in a text file or code. I am looking for inserting block comments in a .vimrc file. To insert a single line comment " is used, for example: " remove spaces and tabs as well at the end of line automatically…
mtk
  • 26,802
  • 35
  • 91
  • 130
15
votes
1 answer

What does (arg: n) in the command prompt mean?

On Codecademy's Command Line Course, when trying to use the keyboard shortcut Alt+Shift+# (which is supposed to comment the current line) in the command prompt, it switches the prompt from $ to (arg: 3) instead of adding a dash at the beginning of…
user331380
  • 153
  • 1
  • 5
8
votes
1 answer

Change inside comments with Vim

Is there a way to change inside of a comment with Vim? I know you can change inside brackets and quotes with i] and i". For example, If you are on a quote you can press, ci"my new textESC And this will replace the text inside of the quote with the…
Tyler Durden
  • 5,411
  • 16
  • 57
  • 96
3
votes
2 answers

Passing Argument to Comment in .sh script

I am a beginner in the use of .sh scripts so please excuse my ignorance. This is my problem: To submit my jobs to our cluster the corresponding submit file has to contain a "slurm header" and looks something like this. #!/bin/sh # ########## Begin…
stollenm
  • 133
  • 1
  • 5
2
votes
0 answers

How to exclude programs from writing to RAM block cache? (e.g. media player)

When playing back huge video files, the media player ravenously consumes disk cache and thus kicks out blocks cached by other programs. Not to confuse with LinuxAteMyRam.com. I would like the media player just to read the video files without the…
neverMind9
  • 1,680
  • 2
  • 18
  • 38
2
votes
2 answers

how to use SED to replace comments within a comments section

Assume that I have a file that starts with the following /********************************************************* blah blah blah blah blah blah blah blah blah *********************************************************/ …
Chan
  • 23
  • 1
  • 5
0
votes
0 answers

Capturing comment character from matching pattern

I would like to pick out lines from a file matching # Mode: org # can be any comment character for the programming language of the file. Rather than #, in could also be any of ; or !, with any preceeding number of spaces using a bash…
Vera
  • 1,173
  • 4
  • 17
0
votes
1 answer

Prepend two lines containing comments and URLs before specific line in python-scripts using sed

In some of my python-scripts, I've put the line if __name__ == '__main__' in order to make the content only be executed, when the script is run itself as main-script (as opposed to being imported, see this explanation). As I've found that out just…
Andreas L.
  • 275
  • 1
  • 3
  • 9
0
votes
1 answer

How to comment out LaTeX code in Gedit?

I am not sure if it is supported but cannot find it. OS: Debian 8.5
Léo Léopold Hertz 준영
  • 6,788
  • 29
  • 91
  • 193