Skip to content
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

'J' when joining two comment lines does not strip the leading comment indicator #9416

Open
lopopolo opened this issue Dec 30, 2024 · 1 comment

Comments

@lopopolo
Copy link

Describe the bug
When executing J in normal mode to join lines, vim strips leading comment indicators if we are joining a comment line to another comment line.

To Reproduce
Steps to reproduce the behavior:

Execute normal J on any of the following lines in a TOML file. The # should be stripped when joining.

# XXX: load-bearing unused dependency.
#
# `rustyline` improperly declares its minimum version on `log` as `0.4` despite
# requiring `>=0.4.5` to compile. Link in at least the minimum version here so
# cargo pulls in at least 0.4.5, e.g. when using `-Zminimal-versions`.
#
# Upstream has not been willing to merge a patch to fix this, so hack around it
# here.
#
# See: https://github.com/kkawakam/rustyline/pull/583

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.
If remapping-related, please attach log output: https://github.com/VSCodeVim/Vim#debugging-remappings.

neovim behavior:

Screen.Recording.2024-12-30.at.8.24.37.PM.mov

VSCodeVim behavior:

Screen.Recording.2024-12-30.at.8.25.12.PM.mov

Environment (please complete the following information):

  • Extension (VsCodeVim) version: 1.29.0
  • VSCode version: 1.96.2
  • OS: macOS Sequoia 15.2

Additional context
Add any other context about the problem here.

@simonsj
Copy link

simonsj commented Dec 31, 2024

I think this is a duplicate of #1352 which would require formatoptions + j -- formatoptions tracked in #5610.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants