-
-
Notifications
You must be signed in to change notification settings - Fork 214
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dash lost when removing comments #92
Comments
Also, with |
chrisbra
added a commit
to chrisbra/vim-commentary-1
that referenced
this issue
Aug 24, 2017
If the text is not consistently commented like this: using gcc will remove the leading - on the first line. That is, because in the first for loop, the l will be set to not include the leading slash, however after the first iteration, it will be overwritten and contain '# ' (e.g. 2 chars). Then on uncommenting, the first two characters will be unconditionally removed. Fix this, by remembering the shortest match to remove. references tpope#92
chrisbra
added a commit
to chrisbra/vim-commentary-1
that referenced
this issue
Oct 18, 2017
If the text is not consistently commented like this: using gcu will remove the leading - on the first line. (`:set cms=#%s`) That is, because in the first for loop, the l will be set to not include the leading slash, however after the first iteration, it will be overwritten and contain '# ' (e.g. 2 chars). Then on uncommenting, the first two characters will be unconditionally removed. Fix this, by remembering the shortest match to remove. references tpope#92
chrisbra
added a commit
to chrisbra/vim-commentary-1
that referenced
this issue
Oct 18, 2017
If the text is not consistently commented like this: #- Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor # incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis # nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. # Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu # fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in # culpa qui officia deserunt mollit anim id est laborum. using gcu will remove the leading - on the first line. (`:set cms=#%s`) That is, because in the first for loop, the l will be set to not include the leading slash, however after the first iteration, it will be overwritten and contain '# ' (e.g. 2 chars). Then on uncommenting, the first two characters will be unconditionally removed. Fix this, by remembering the shortest match to remove. references tpope#92
Closed
This appears to have been fixed by by89f43af18692d22ed999c3097e449f12fdd8b299. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Start with: (
:se cms=#%s
)Now, use
gcu
orgcip
to destroy the dashgcc
worksI noticed this while working with yaml files. The position of the dash seems important. In the last line it doesn't do anything
The text was updated successfully, but these errors were encountered: