Created
April 29, 2021 19:30
-
-
Save dvogel/8ebf7020d4ee8e709e6034f6aef5f024 to your computer and use it in GitHub Desktop.
vim-commentary-empty-comment-confusion.tf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# vim: noexpandtab tabstop=2 shiftwidth=2 softtabstop=2 commentstring=#\ %s | |
# This is a repro case for the commentary plugin dealing with commenting visual | |
# blocks in which there is an existing "empty" comment. I am expecting to be | |
# able to comment all lines of the `resource` block. | |
# If I place my cursor on `resource` and pressing `VGgc` then | |
# there is no space between `resource` and the new comment hash at the | |
# beginning of the line. | |
# If I remove the "empty" comment on line 19 then the visual block commenting | |
# works as expected. | |
# start vim as: vim -Nu NONE | |
# then run packadd commentary | |
# place your cursor on the line below, then press VGgc -- you will have no space between the hash at the start of the line and `resource` | |
resource aws_subnet a-subnet { | |
# this is the first line of a comment | |
# | |
# this line is awesome: | |
cidr_block = "10.0.0.0/24" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment