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

unable to override <leader>M mapping #185

Open
mpareja opened this issue Feb 4, 2020 · 2 comments
Open

unable to override <leader>M mapping #185

mpareja opened this issue Feb 4, 2020 · 2 comments

Comments

@mpareja
Copy link

mpareja commented Feb 4, 2020

Short description of the problem

The plugin maps <leader>M without checking if it was already mapped. This prevents users from easily overriding the mapping. I, for instance, would like to override the mapping to open in a new tab.

Steps to reproduce

  1. Update vmrc to include: map <silent> <Leader>M :tabnew +MagitOnly<CR>
  2. Restart VIM and hit <leader>M
  3. Unexpected: magit is not opened in a tab

Environment

I am using pathogen, so .vim/after/ftplugin doesn't work to easily address this.

  • vim: 8.0
  • current vimagit version: bf7b16e
  • ubuntu
  • terminal
@Amparose
Copy link

Amparose commented Apr 21, 2021

It would be better if users had more control over mapping this plugin. I would like to remove the default <leader>M mapping and set my own. Opening in a new tab, as above, would really useful. Others want this also.

@mckellygit
Copy link

mckellygit commented Apr 23, 2021

I've forked vimagit and hacked it up a bit to get all the things I like.
But would something like this work, maybe ?

autocmd FileType magit noremap <buffer> <Leader>M :tabnew +MagitOnly<CR>

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