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

Block Comment Indentation #3765

Closed
AlJohri opened this issue Jan 14, 2016 · 4 comments
Closed

Block Comment Indentation #3765

AlJohri opened this issue Jan 14, 2016 · 4 comments

Comments

@AlJohri
Copy link

AlJohri commented Jan 14, 2016

Hi,

I opened this issue on jupyter notebook and wanted to follow up upstream here.

jupyter/notebook#954

Is there anyway to replicate the default comment indentation behavior from Sublime Text?

Essentially, if within a block, it indents the comment symbol. If containing the the start, end, or both of the block, it does not indent the comment symbol.

@vincentwoo
Copy link
Contributor

If you use the sublime keymap, this is default behavior. I made this change a while ago and it's pretty easy to port into your application as well: https://github.com/codemirror/CodeMirror/blob/master/keymap/sublime.js#L246

It's simply a matter of calling toggleComment with indent: true

@marijnh
Copy link
Member

marijnh commented Jan 18, 2016

Indeed, the feature exists, you just need to bind it differently.

@marijnh marijnh closed this as completed Jan 18, 2016
@jgerlach93
Copy link

and how exactly would this work?

@stdedos
Copy link

stdedos commented Jan 15, 2020

If you use the sublime keymap, this is default behavior. I made this change a while ago and it's pretty easy to port into your application as well: /keymap/sublime.js@master#L246

It's simply a matter of calling toggleComment with indent: true

How can you change the default keymap?

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

5 participants