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

Add a keymap in the close overlay #31

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mattiasdrp
Copy link
Contributor

This map allows to bind a keybind to the closed overlay to open it with a key when inside it without having to bind a key to ts-fold-open that would need to be global

This map allows to bind a keybind to the closed overlay to open it with
a key when inside it without having to bind a key to `ts-fold-open`
that would need to be global
Copy link
Member

@jcs090218 jcs090218 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you elaborate more on this PR? I personally do not use TAB key to open up a folding node. Wonder if there is a strong reason to this? Thanks! 🚀

(defvar ts-fold-close-keymap-default
(let ((map (make-sparse-keymap)))
(define-key map (kbd "TAB") 'ts-fold-open)
map))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can use defvar-local here? And get rid of the make-local-variable part.

@jcs090218 jcs090218 added the enhancement New feature or request label Sep 3, 2022
@chookity-pokk
Copy link
Contributor

Can you elaborate more on this PR? I personally do not use TAB key to open up a folding node. Wonder if there is a strong reason to this? Thanks! 🚀

Not the person who wrote the code, but I also did that when I first saw the folded code. I think it's because that's how org mode handles their folding.

@mattiasdrp
Copy link
Contributor Author

Sorry, forgot to answer. Thanks @chookity-pokk for the wake-up comment. Yes, that's because that's how org mode uses it and I got used to it.

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

Successfully merging this pull request may close these issues.

None yet

3 participants