-
-
Notifications
You must be signed in to change notification settings - Fork 210
Open
Description
If I have an "empty" comment line inside a visual block, gc eats the space preceding %s in my commentstring (or b:commentary_format). I've captured this in a gist but, I will illustrate the before and after here.
Visually selecting this entire block and commenting (with commentstring=#\ %s):
resource aws_subnet a-subnet {
# this line is awesome:
cidr_block = "10.0.0.0/24"
}
Yields the properly indented block:
# resource aws_subnet a-subnet {
# # this line is awesome:
# cidr_block = "10.0.0.0/24"
# }
However, if I introduce an empty comment line like so:
resource aws_subnet a-subnet {
# this is the first line of a comment
#
# this line is awesome:
cidr_block = "10.0.0.0/24"
}
Then visually selecting the entire block and commenting it yields:
#resource aws_subnet a-subnet {
# # this is the first line of a comment
# #
# # this line is awesome:
# cidr_block = "10.0.0.0/24"
#}
This is true regardless of whether that "empty" comment line has a trailing space.
Metadata
Metadata
Assignees
Labels
No labels