pombreda / vcscommand

Automatically exported from code.google.com/p/vcscommand
0 stars 0 forks source link

Lightweight detection of VCSCommandVCSType #75

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
While there is "VCSCommandEnableBufferSetup", I just want to setup 
b:VCSCommandVCSType (for use with 
git://github.com/tomtom/quickfixsigns_vim.git).

Therefore I am using the following in my vimrc currently, but think that it 
would be better to provide this functionality out of the box:

    au BufRead * try | call VCSCommandGetVCSType(bufnr('%')) | catch /No suitable plugin/ | endtry 

Maybe something like a new command "VCSCommandSetupVCSType" so that I could use 
something like:

    au BufRead * VCSCommandSetupVCSType

Original issue reported on code.google.com by dhahler@gmail.com on 23 Feb 2011 at 4:45

GoogleCodeExporter commented 9 years ago
Why do you need to detect the type before using a vcscommand command on the 
buffer?

Original comment by bob.hies...@gmail.com on 23 Feb 2011 at 4:53

GoogleCodeExporter commented 9 years ago
This is used by https://github.com/tomtom/quickfixsigns_vim to add annotations, 
like only if the vcs type is defined for a buffer, it will pull and add the 
additional information.

See 
https://github.com/tomtom/quickfixsigns_vim/blob/master/autoload/quickfixsigns/v
csdiff.vim for the handling of this.

It looks to me like vcscommand itself cannot provide all the information 
required by quickfixsigns, or could it?
Then it would make more sense to make use of vcscommand completely from 
quickfixsigns.

Original comment by dhahler@gmail.com on 23 Feb 2011 at 5:06