Skip to content

Add a <Plug> map for users#12

Open
graywh wants to merge 1 commit intoreinh:masterfrom
graywh:patch-1
Open

Add a <Plug> map for users#12
graywh wants to merge 1 commit intoreinh:masterfrom
graywh:patch-1

Conversation

@graywh
Copy link
Copy Markdown

@graywh graywh commented Oct 2, 2012

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

@5long
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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