How to comment multiple lines in nano at once?
Clash Royale CLAN TAG#URR8PPP
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty margin-bottom:0;
up vote
5
down vote
favorite
I can able to select multiple lines using Esc+A. After this, what shortcut(s) should I use to comment/uncomment the selected lines?
nano
add a comment |Â
up vote
5
down vote
favorite
I can able to select multiple lines using Esc+A. After this, what shortcut(s) should I use to comment/uncomment the selected lines?
nano
add a comment |Â
up vote
5
down vote
favorite
up vote
5
down vote
favorite
I can able to select multiple lines using Esc+A. After this, what shortcut(s) should I use to comment/uncomment the selected lines?
nano
I can able to select multiple lines using Esc+A. After this, what shortcut(s) should I use to comment/uncomment the selected lines?
nano
edited 2 days ago
asked 2 days ago
krk
454
454
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
5
down vote
accepted
Esc+3 will comment or uncomment the selected lines in the nano
editor. The default comment character used is #
(valid in many scripting languages).
The comment character may be modified by the comment
option in your ~/.nanorc
file. This is from the manual:
comment "string"
Use the given string for commenting and uncommenting lines. If the string contains a vertical bar or pipe character (
|
), this designates bracket-style comments; for example,"/*|*/"
for CSS files. The characters before the pipe are prepended to the line and the characters after the pipe are appended at the end of the line. If no pipe character is present, the full string is prepended; for example,"#"
for Python files. If empty double quotes are specified, the comment/uncomment functions are disabled; for example,""
for JSON. The default value is"#"
.
See also the nanorc(5)
manual on your system (man 5 nanorc
).
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
5
down vote
accepted
Esc+3 will comment or uncomment the selected lines in the nano
editor. The default comment character used is #
(valid in many scripting languages).
The comment character may be modified by the comment
option in your ~/.nanorc
file. This is from the manual:
comment "string"
Use the given string for commenting and uncommenting lines. If the string contains a vertical bar or pipe character (
|
), this designates bracket-style comments; for example,"/*|*/"
for CSS files. The characters before the pipe are prepended to the line and the characters after the pipe are appended at the end of the line. If no pipe character is present, the full string is prepended; for example,"#"
for Python files. If empty double quotes are specified, the comment/uncomment functions are disabled; for example,""
for JSON. The default value is"#"
.
See also the nanorc(5)
manual on your system (man 5 nanorc
).
add a comment |Â
up vote
5
down vote
accepted
Esc+3 will comment or uncomment the selected lines in the nano
editor. The default comment character used is #
(valid in many scripting languages).
The comment character may be modified by the comment
option in your ~/.nanorc
file. This is from the manual:
comment "string"
Use the given string for commenting and uncommenting lines. If the string contains a vertical bar or pipe character (
|
), this designates bracket-style comments; for example,"/*|*/"
for CSS files. The characters before the pipe are prepended to the line and the characters after the pipe are appended at the end of the line. If no pipe character is present, the full string is prepended; for example,"#"
for Python files. If empty double quotes are specified, the comment/uncomment functions are disabled; for example,""
for JSON. The default value is"#"
.
See also the nanorc(5)
manual on your system (man 5 nanorc
).
add a comment |Â
up vote
5
down vote
accepted
up vote
5
down vote
accepted
Esc+3 will comment or uncomment the selected lines in the nano
editor. The default comment character used is #
(valid in many scripting languages).
The comment character may be modified by the comment
option in your ~/.nanorc
file. This is from the manual:
comment "string"
Use the given string for commenting and uncommenting lines. If the string contains a vertical bar or pipe character (
|
), this designates bracket-style comments; for example,"/*|*/"
for CSS files. The characters before the pipe are prepended to the line and the characters after the pipe are appended at the end of the line. If no pipe character is present, the full string is prepended; for example,"#"
for Python files. If empty double quotes are specified, the comment/uncomment functions are disabled; for example,""
for JSON. The default value is"#"
.
See also the nanorc(5)
manual on your system (man 5 nanorc
).
Esc+3 will comment or uncomment the selected lines in the nano
editor. The default comment character used is #
(valid in many scripting languages).
The comment character may be modified by the comment
option in your ~/.nanorc
file. This is from the manual:
comment "string"
Use the given string for commenting and uncommenting lines. If the string contains a vertical bar or pipe character (
|
), this designates bracket-style comments; for example,"/*|*/"
for CSS files. The characters before the pipe are prepended to the line and the characters after the pipe are appended at the end of the line. If no pipe character is present, the full string is prepended; for example,"#"
for Python files. If empty double quotes are specified, the comment/uncomment functions are disabled; for example,""
for JSON. The default value is"#"
.
See also the nanorc(5)
manual on your system (man 5 nanorc
).
edited 2 days ago
answered 2 days ago
Kusalananda
100k13199311
100k13199311
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f460474%2fhow-to-comment-multiple-lines-in-nano-at-once%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password