Loading ...
Sorry, an error occurred while loading the content.

Git and Vim

Expand Messages
  • alecthegeek (Alec Clews)
    G Day, I m a little confused on the recommended approach for using git version control under vim. a) Vim 7.2 ships with a bunch of git specific scripts from
    Message 1 of 8 , Feb 2, 2009
    • 0 Attachment
      G'Day,

      I'm a little confused on the recommended approach for using git
      version control under vim.

      a) Vim 7.2 ships with a bunch of git specific scripts from Tim Pope
      (git-vim).
      However I cannot find any documentation that makes sense to me
      b) The VCS plugin does have some documentation and is mentioned on
      this list.

      Do I use both of these? or only one? git-vim looks more official as
      it's
      shipped with base vim, but no docs?

      Where should I look for more detailed advice and documents.

      Many Thanks
      --
      Alec Clews
      Personal <alec.clews@...> Melbourne, Australia.
      Jabber: alecclews@... PGPKey ID: 0x9BBBFC7C
      Blog http://alecthegeek.wordpress.com/

      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_use" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • Tony Mechelynck
      ... Ships with Vim? Where? I don t see any. Best regards, Tony. -- ROBIN: The what? ARTHUR: The Holy Hand Grenade of Antioch. Tis one of the sacred relics
      Message 2 of 8 , Feb 2, 2009
      • 0 Attachment
        On 03/02/09 02:30, alecthegeek (Alec Clews) wrote:
        > G'Day,
        >
        > I'm a little confused on the recommended approach for using git
        > version control under vim.
        >
        > a) Vim 7.2 ships with a bunch of git specific scripts from Tim Pope
        > (git-vim).
        > However I cannot find any documentation that makes sense to me
        > b) The VCS plugin does have some documentation and is mentioned on
        > this list.
        >
        > Do I use both of these? or only one? git-vim looks more official as
        > it's
        > shipped with base vim, but no docs?
        >
        > Where should I look for more detailed advice and documents.
        >
        > Many Thanks
        > --
        > Alec Clews
        > Personal<alec.clews@...> Melbourne, Australia.
        > Jabber: alecclews@... PGPKey ID: 0x9BBBFC7C
        > Blog http://alecthegeek.wordpress.com/

        Ships with Vim? Where? I don't see any.


        Best regards,
        Tony.
        --
        ROBIN: The what?
        ARTHUR: The Holy Hand Grenade of Antioch. 'Tis one of the sacred relics
        Brother Maynard always carries with him.
        ALL: Yes. Of course.
        ARTHUR: (shouting) Bring up the Holy Hand Grenade!
        "Monty Python and the Holy Grail" PYTHON (MONTY)
        PICTURES LTD

        --~--~---------~--~----~------------~-------~--~----~
        You received this message from the "vim_use" maillist.
        For more information, visit http://www.vim.org/maillist.php
        -~----------~----~----~----~------~----~------~--~---
      • alecthegeek (Alec Clews)
        On Feb 3, 5:17 pm, Tony Mechelynck ... On Windows: ./vim72/ftplugin/git.vim ./vim72/ftplugin/gitcommit.vim
        Message 3 of 8 , Feb 2, 2009
        • 0 Attachment
          On Feb 3, 5:17 pm, Tony Mechelynck <antoine.mechely...@...>
          wrote:
          > On 03/02/09 02:30, alecthegeek (Alec Clews) wrote:
          >
          > > I'm a little confused on the recommended approach for using git
          > > version control under vim.
          >
          > > a) Vim 7.2 ships with a bunch of git specific scripts from Tim Pope
          > > (git-vim).
          > > However I cannot find any documentation that makes sense to me
          > > b) The VCS plugin does have some documentation and is mentioned on
          > > this list.
          >
          > > Do I use both of these? or only one? git-vim looks more official as
          > > it's
          > > shipped with base vim, but no docs?
          >
          > > Where should I look for more detailed advice and documents.
          >
          > Ships with Vim? Where? I don't see any.

          On Windows:

          ./vim72/ftplugin/git.vim
          ./vim72/ftplugin/gitcommit.vim
          ./vim72/ftplugin/gitconfig.vim
          ./vim72/ftplugin/gitrebase.vim
          ./vim72/ftplugin/gitsendemail.vim
          ./vim72/indent/gitconfig.vim
          ./vim72/syntax/git.vim
          ./vim72/syntax/gitcommit.vim
          ./vim72/syntax/gitconfig.vim
          ./vim72/syntax/gitrebase.vim
          ./vim72/syntax/gitsendemail.vim


          and also on Linux using vim71 (/usr/share/vim/vim71/... on Ubuntu
          8.10)


          -- Alec
          --~--~---------~--~----~------------~-------~--~----~
          You received this message from the "vim_use" maillist.
          For more information, visit http://www.vim.org/maillist.php
          -~----------~----~----~----~------~----~------~--~---
        • Tony Mechelynck
          ... Those are just to _edit_ git files, not to _use_ git. My surprise came from the fact that I thought you meant Vim came with scripts meant to build Vim
          Message 4 of 8 , Feb 2, 2009
          • 0 Attachment
            On 03/02/09 07:35, alecthegeek (Alec Clews) wrote:
            > On Feb 3, 5:17 pm, Tony Mechelynck<antoine.mechely...@...>
            > wrote:
            >> On 03/02/09 02:30, alecthegeek (Alec Clews) wrote:
            >>
            >>> I'm a little confused on the recommended approach for using git
            >>> version control under vim.
            >>> a) Vim 7.2 ships with a bunch of git specific scripts from Tim Pope
            >>> (git-vim).
            >>> However I cannot find any documentation that makes sense to me
            >>> b) The VCS plugin does have some documentation and is mentioned on
            >>> this list.
            >>> Do I use both of these? or only one? git-vim looks more official as
            >>> it's
            >>> shipped with base vim, but no docs?
            >>> Where should I look for more detailed advice and documents.
            >> Ships with Vim? Where? I don't see any.
            >
            > On Windows:
            >
            > ./vim72/ftplugin/git.vim
            > ./vim72/ftplugin/gitcommit.vim
            > ./vim72/ftplugin/gitconfig.vim
            > ./vim72/ftplugin/gitrebase.vim
            > ./vim72/ftplugin/gitsendemail.vim
            > ./vim72/indent/gitconfig.vim
            > ./vim72/syntax/git.vim
            > ./vim72/syntax/gitcommit.vim
            > ./vim72/syntax/gitconfig.vim
            > ./vim72/syntax/gitrebase.vim
            > ./vim72/syntax/gitsendemail.vim

            Those are just to _edit_ git files, not to _use_ git. My surprise came
            from the fact that I thought you meant Vim came with scripts meant to
            build Vim with git, the way it comes with A-A-P scripts. Similarly, the
            cobol.vim scripts are not a COBOL tutorial and the html.vim scripts are
            not an HTML tutorial.

            Best regards,
            Tony.
            --
            Christian, n.:
            One who believes that the New Testament is a divinely inspired
            book admirably suited to the spiritual needs of his neighbor. One who
            follows the teachings of Christ in so far as they are not inconsistent
            with a life of sin.

            --~--~---------~--~----~------------~-------~--~----~
            You received this message from the "vim_use" maillist.
            For more information, visit http://www.vim.org/maillist.php
            -~----------~----~----~----~------~----~------~--~---
          • Alec Clews
            ... [deletia] ... Sorry - I m guess I m not explaining myself correctly. I m looking for documentation and advice on the Vim plugins, not git itself. From what
            Message 5 of 8 , Feb 2, 2009
            • 0 Attachment
              Tony Mechelynck wrote:
              > On 03/02/09 07:35, alecthegeek (Alec Clews) wrote:
              >
              >> On Feb 3, 5:17 pm, Tony Mechelynck<antoine.mechely...@...>
              >> wrote:
              >>
              >>> On 03/02/09 02:30, alecthegeek (Alec Clews) wrote:
              >>>
              >>>
              >>>> I'm a little confused on the recommended approach for using git
              >>>> version control under vim.
              >>>> a) Vim 7.2 ships with a bunch of git specific scripts from Tim Pope
              >>>> (git-vim).
              >>>> However I cannot find any documentation that makes sense to me
              >>>> b) The VCS plugin does have some documentation and is mentioned on
              >>>> this list.
              >>>> Do I use both of these? or only one? git-vim looks more official as
              >>>> it's
              >>>> shipped with base vim, but no docs?
              >>>> Where should I look for more detailed advice and documents.
              >>>>
              >>> Ships with Vim? Where? I don't see any.
              >>>
              >> On Windows:
              >>
              >> ./vim72/ftplugin/git.vim
              >>
              [deletia]
              > Those are just to _edit_ git files, not to _use_ git. My surprise came
              > from the fact that I thought you meant Vim came with scripts meant to
              > build Vim with git, the way it comes with A-A-P scripts. Similarly, the
              > cobol.vim scripts are not a COBOL tutorial and the html.vim scripts are
              > not an HTML tutorial.
              >

              Sorry - I'm guess I'm not explaining myself correctly. I'm looking for
              documentation and advice on the Vim plugins, not git itself.

              From what you say I think I should be using the VCS plugin as well as
              the git syntax files.

              Thanks

              --
              Alec Clews
              Personal <alec.clews@...> Melbourne, Australia.
              Jabber: alecclews@... PGPKey ID: 0x9BBBFC7C
              Blog http://alecthegeek.wordpress.com/


              --~--~---------~--~----~------------~-------~--~----~
              You received this message from the "vim_use" maillist.
              For more information, visit http://www.vim.org/maillist.php
              -~----------~----~----~----~------~----~------~--~---
            • alecthegeek (Alec Clews)
              On Feb 3, 12:30 pm, alecthegeek (Alec Clews) ... I ve written a small vim tip to summarise what I think is currently the situation
              Message 6 of 8 , Feb 3, 2009
              • 0 Attachment
                On Feb 3, 12:30 pm, "alecthegeek (Alec Clews)" <aleccl...@...>
                wrote:
                > I'm a little confused on the recommended approach for using git
                > version control under vim.

                I've written a small vim tip to summarise what I think is currently
                the situation with git and vim.

                http://vim.wikia.com/wiki/Using_Git_from_Vim


                Does anyone have any improvements or alternatives?

                Thanks

                --Alec
                --~--~---------~--~----~------------~-------~--~----~
                You received this message from the "vim_use" maillist.
                For more information, visit http://www.vim.org/maillist.php
                -~----------~----~----~----~------~----~------~--~---
              • Markus Heidelberg
                ... I personally prefer using git directly on the command line instead of wrapper Vim commands. So for viewing two versions of a file with vimdiff I
                Message 7 of 8 , Feb 3, 2009
                • 0 Attachment
                  alecthegeek (Alec Clews), 03.02.2009:
                  >
                  > On Feb 3, 12:30 pm, "alecthegeek (Alec Clews)" <aleccl...@...>
                  > wrote:
                  > > I'm a little confused on the recommended approach for using git
                  > > version control under vim.
                  >
                  > I've written a small vim tip to summarise what I think is currently
                  > the situation with git and vim.
                  >
                  > http://vim.wikia.com/wiki/Using_Git_from_Vim
                  >
                  >
                  > Does anyone have any improvements or alternatives?

                  I personally prefer using git directly on the command line instead of
                  wrapper Vim commands. So for viewing two versions of a file with vimdiff
                  I occasionally use git-difftool, which is included in git's source tree
                  under contrib/difftool/.

                  It has the advantage, that you can pass any git-diff option to it.
                  I don't know how flexible the corresponding VCScommand command is.

                  There is also git-mergetool, which is also shipped with git releases. It
                  can be used to solve merge conflicts and starts Vim with 3 buffers in
                  diff mode.

                  Markus


                  --~--~---------~--~----~------------~-------~--~----~
                  You received this message from the "vim_use" maillist.
                  For more information, visit http://www.vim.org/maillist.php
                  -~----------~----~----~----~------~----~------~--~---
                • Bob Hiestand
                  On Tue, Feb 3, 2009 at 11:07 AM, Markus Heidelberg ... It s flexible. You can specify default parameters to be passed by setting the VCSCommandGitDiffOpt
                  Message 8 of 8 , Feb 3, 2009
                  • 0 Attachment
                    On Tue, Feb 3, 2009 at 11:07 AM, Markus Heidelberg
                    <markus.heidelberg@...> wrote:
                    >
                    > alecthegeek (Alec Clews), 03.02.2009:
                    >>
                    >> On Feb 3, 12:30 pm, "alecthegeek (Alec Clews)" <aleccl...@...>
                    >> wrote:
                    >> > I'm a little confused on the recommended approach for using git
                    >> > version control under vim.
                    >>
                    >> I've written a small vim tip to summarise what I think is currently
                    >> the situation with git and vim.
                    >>
                    >> http://vim.wikia.com/wiki/Using_Git_from_Vim
                    >>
                    >>
                    >> Does anyone have any improvements or alternatives?
                    >
                    > I personally prefer using git directly on the command line instead of
                    > wrapper Vim commands. So for viewing two versions of a file with vimdiff
                    > I occasionally use git-difftool, which is included in git's source tree
                    > under contrib/difftool/.
                    >
                    > It has the advantage, that you can pass any git-diff option to it.
                    > I don't know how flexible the corresponding VCScommand command is.

                    It's flexible. You can specify default parameters to be passed by
                    setting the VCSCommandGitDiffOpt variable, and you can override those
                    options at any point by putting them on the command line.

                    That is, you can do things like:

                    :VCSDiff

                    ... to use the default options, and compare against the index.

                    :VCSDiff --cached HEAD~

                    ... to compare the index against the HEAD's parent.

                    Thank you,

                    bob

                    --~--~---------~--~----~------------~-------~--~----~
                    You received this message from the "vim_use" maillist.
                    For more information, visit http://www.vim.org/maillist.php
                    -~----------~----~----~----~------~----~------~--~---
                  Your message has been successfully submitted and would be delivered to recipients shortly.