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

Feature request: inline comment support #1138

Open
8 tasks done
sersorrel opened this issue Mar 30, 2020 · 0 comments
Open
8 tasks done

Feature request: inline comment support #1138

sersorrel opened this issue Mar 30, 2020 · 0 comments

Comments

@sersorrel
Copy link

sersorrel commented Mar 30, 2020

debug info
{
  "atom": "1.45.0",
  "platform": "linux",
  "release": "4.15.0-91-generic",
  "vmpVersion": "1.36.4",
  "vmpConfig": {
    "charactersToAddSpaceOnSurround": [
      "(",
      "{",
      "[",
      "<"
    ],
    "stayOnVerticalMotion": false,
    "useSmartcaseForSearch": true
  }
}

Checklist

You have to check all before open issue.

  • Provide your environment info clipped by Vim Mode Plus: Clip Debug Info command.
  • Try with latest Atom and latest vim-mode-plus.
  • Pick a descriptive and non-ambiguous subject
  • Express "what" you want(feature? config option?, behavior change?) in short sentence(not long!).
  • Contrast current behavior if you want to change current behavior, with sample text, operation(keystroke) and result.
  • Include real use case so that maintainer can understand "why" you need help.
  • Include Atom(atom --version), vim-mode-plus version, and OS version(e.g. macOS Sierra 10.12.3).
    • $ atom --version
      Atom    : 1.45.0
      Electron: 4.2.7
      Chrome  : 69.0.3497.128
      Node    : 10.11.0
      
    • vim-mode-plus 1.36.4
    • Ubuntu 18.04
  • If keybinding issue, Read this.

I set up a mapping similar to vim-commentary:

"atom-text-editor.vim-mode-plus:not(.insert-mode)":
  "g c": "vim-mode-plus:toggle-line-comments"

however, this doesn't work well (obviously) for if you have part of a line selected and you want to insert a block comment without commenting out the rest of the line.

tcomment supports inline comments, where only part of the line is commented out – could vim-mode-plus also support this?

i.e. having some visual-mode selection of less than a full line and pressing gc would use a block comment to comment just the selection out, rather than a line comment.

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

1 participant