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

Doesn't work comment hotkey #20

Open
evilangel-ru opened this issue Feb 11, 2018 · 5 comments
Open

Doesn't work comment hotkey #20

evilangel-ru opened this issue Feb 11, 2018 · 5 comments

Comments

@evilangel-ru
Copy link

Couldn't understand how to use hotkey for comment command. Alt-/ from docs doesn't work. MacOs, iTerm2. I have tried to bind it to Ctrl-/ or Alt-m, but without any effect.

@dwatts1772
Copy link

+1

@Himujjal
Copy link

I have tried it with command:comment. Still to no avail. Went to the main comment.lua#106 and tried my luck there too. And still Ctrl-/ is not working.

I think Ctrl-/ is not bindable. Otherwise even the authors of comment would have had that as first choice considering in every other editor it is the default.

Let's upvote this issue to make that possible.

@olly-writes-code
Copy link

olly-writes-code commented Jun 9, 2020

" + 1" on this

@zyedidia
Copy link
Member

zyedidia commented Jun 9, 2020

It turns out that Ctrl-/ is not bindable, but on most terminals pressing it sends the same event code as pressing CtrlUnderscore, so you can just bind lua:comment.comment to CtrlUnderscore for the desired effect.

Regarding Alt bindings, on macOS, usually terminals do not send alt events by default. Here are instructions for enabling this:

  • iTerm2: choose "option acts as +Esc" under Preferences->Profiles->Keys.
  • Terminal.app: enable Use Option key as Meta key under Preferences->Profiles->Keyboard.

@ebrensi
Copy link

ebrensi commented Jul 8, 2020

{
    "CtrlUnderscore": "lua:comment.comment" 
}

gives me the desired "Ctrl-/" commenting. It might be necessary to restart Micro. Thanks!

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

6 participants