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 <Plug> map for users #12

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

Add a <Plug> map for users #12

wants to merge 1 commit into from

Conversation

graywh
Copy link

@graywh graywh commented Oct 2, 2012

If the user hasn't mapped to <Plug>MakeGreen, use <Leader>t.

@5long
Copy link
Contributor

5long commented Apr 2, 2013

It seems that the <Plug> mapping entry and <leader>t have been remove intentionally in #11. It's just the README that falls behind the code.

@graywh
Copy link
Author

graywh commented Apr 2, 2013

@5long I submitted this PR before the other one was accepted.

There wasn't a <Plug> map before--this PR adds one. It makes it easier for users to make their own map instead of the old default <Leader>t.

@5long
Copy link
Contributor

5long commented Apr 2, 2013

My bad for not noticing the time difference. The README must have tricked me.

Since there's now a :MakeGreen command, It's not that hard to map to it:

nmap ,t :MakeGreen<CR>
nmap ,t <Plug>MakeGreen " not too much of a difference IMHO
nmap ,r :MakeGreen %<CR> " Not easily achievable with mapping since mapping to <Plug> can't pass arguments.

But I do agree that adding back a default mapping would be easier for starters to begin with. And I suggest doing it less obstructively(i.e. don't override user's <leader>t) with <unique> like this: https://github.com/wincent/Command-T/blob/341d0e54822c72f32be1664f8bedc0cdbd2f87c0/plugin/command-t.vim#L36-L38

Besides, you might want to remove the trailing parentheses when mapping to a <Plug>. Example: https://github.com/tpope/vim-surround/blob/02199ea0080d744ec76b79d74ce56d51d25cf7ae/plugin/surround.vim#L561

@graywh
Copy link
Author

graywh commented Apr 2, 2013

The trailing () is a typo.

If the user hasn't mapped to <Plug>MakeGreen, use <Leader>t.
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

Successfully merging this pull request may close these issues.

2 participants