set defaults and fix a typo #1

Merged
merged 5 commits into from Sep 17, 2012

Conversation

Projects
None yet
2 participants
@bhenderson
Contributor

bhenderson commented Sep 15, 2012

I don't know if you intended this to be specifically for mutt, it seems like it, but I thought it would be helpful to set some defaults based off of the mutt config.

let me know what you think, thanks!

@caio

This comment has been minimized.

Show comment Hide comment
@caio

caio Sep 16, 2012

Owner

Hi Brian, thanks for your contribution!

I'm cherry-picking 6ed8e43 directly. As for the patches pertaining to explicit mutt support, I'd rather not merge them as is.

While I did create this plugin with mutt in mind, I use it for several other cases right now (setting g:qcc based on filetype and/or path.

I do think, however, that a default-to-mutt path increases the overall usefulness of the plugin. Could you refactor your code to do the following things if and only if g:qcc_query_command is not set?:

  1. Set g:qcc_query_command to your mutt -Q ... variant
  2. Set omnifunc properly

Basically, I like the idea, but I think it's best to keep it isolated (say, in a private load_defaults function or something) and make it run only if the user didn't set anything manually.

What do you think?

Cheers

Owner

caio commented Sep 16, 2012

Hi Brian, thanks for your contribution!

I'm cherry-picking 6ed8e43 directly. As for the patches pertaining to explicit mutt support, I'd rather not merge them as is.

While I did create this plugin with mutt in mind, I use it for several other cases right now (setting g:qcc based on filetype and/or path.

I do think, however, that a default-to-mutt path increases the overall usefulness of the plugin. Could you refactor your code to do the following things if and only if g:qcc_query_command is not set?:

  1. Set g:qcc_query_command to your mutt -Q ... variant
  2. Set omnifunc properly

Basically, I like the idea, but I think it's best to keep it isolated (say, in a private load_defaults function or something) and make it run only if the user didn't set anything manually.

What do you think?

Cheers

@bhenderson bhenderson closed this Sep 17, 2012

@bhenderson bhenderson reopened this Sep 17, 2012

@bhenderson

This comment has been minimized.

Show comment Hide comment
@bhenderson

bhenderson Sep 17, 2012

Contributor

I made omnifunc conditional. g:qcc_query_command is already set only if the user does not set it.

let me know if I missed something or if that was not what you were thinking.

I also left the doco wording up to you.

thanks!

Contributor

bhenderson commented Sep 17, 2012

I made omnifunc conditional. g:qcc_query_command is already set only if the user does not set it.

let me know if I missed something or if that was not what you were thinking.

I also left the doco wording up to you.

thanks!

@caio caio merged commit 74873cf into caio:master Sep 17, 2012

@caio

This comment has been minimized.

Show comment Hide comment
@caio

caio Sep 17, 2012

Owner

Merged on 6a406a9. Thanks!

I've moved the omnifunc setup up to only happen when guessing the query_command (see 692607d if interested).

On a sidenote, you might want to consider setting up your gitconfig to have your e-mail as it is in github so the commits point properly to you in future contributions.

Cheers

Owner

caio commented Sep 17, 2012

Merged on 6a406a9. Thanks!

I've moved the omnifunc setup up to only happen when guessing the query_command (see 692607d if interested).

On a sidenote, you might want to consider setting up your gitconfig to have your e-mail as it is in github so the commits point properly to you in future contributions.

Cheers

@bhenderson

This comment has been minimized.

Show comment Hide comment
@bhenderson

bhenderson Sep 17, 2012

Contributor

thanks for looking at it.

I did the len comparison because as you have it, any user configured omnifunc will get overritten by the plugin, but it's probably virtually the same.

thanks for the tip on the git config... I was using my work development box... I wonder if there is a way to have profiles or something.

Contributor

bhenderson commented Sep 17, 2012

thanks for looking at it.

I did the len comparison because as you have it, any user configured omnifunc will get overritten by the plugin, but it's probably virtually the same.

thanks for the tip on the git config... I was using my work development box... I wonder if there is a way to have profiles or something.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment