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

Customize comma leader? #185

Open
justmytwospence opened this issue Aug 18, 2014 · 8 comments
Open

Customize comma leader? #185

justmytwospence opened this issue Aug 18, 2014 · 8 comments

Comments

@justmytwospence
Copy link

Is there any way to use another key instead of , as the Vmail leader key? Something like the spacebar would be much more comfortable for me personally.

@notalex
Copy link
Collaborator

notalex commented Aug 20, 2014

Vmail maps the leader key to ,. So you can simply remap the leader key to something else. See :h leader.

@justmytwospence
Copy link
Author

I already have let mapleader="\<Space>" in my vimrc, but it is overridden by vmail. I can't seem to set it manually either. Does it need to go in an ftplugin file perhaps?

@notalex
Copy link
Collaborator

notalex commented Aug 20, 2014

Yes. ftplugin should take precedence over vmail mappings. Also you would
need to check for a global variable g:loaded_vim. This will help you
avoid overwriting the leader key for non vmail windows. If you need help
with the exact script, let me know.

@notalex
Copy link
Collaborator

notalex commented Aug 20, 2014

Sorry, you actually do not need that global variable. The mapping should be set in a ftplugin for vmailMessageList. This is the first buffer that is loaded.

@justmytwospence
Copy link
Author

Still no luck. This is the contents of my vmailMessageList.vim:

call clearmatches()
let mapleader="\<Space>"

Pressing space still toggles "fullscreen". Is there something else that needs to be unmapped from the spacebar?

@notalex
Copy link
Collaborator

notalex commented Aug 20, 2014

Seems like I failed to understand mapleader correctly. As per :help mapleader,

Note that the value of "mapleader" is used at the moment the mapping is
defined. Changing "mapleader" after that has no effect for already defined
mappings.

So my proposed solution would not work. I will look for other alternatives.

@justmytwospence
Copy link
Author

Perhaps <LocalLeader>? I'm looking into it as well.

@WuTheFWasThat
Copy link

ever find a solution to this? it seems weird to me that vmail sets leader at all

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

3 participants