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

vim C++ tips

Expand Messages
  • Pavel Shevaev
    Folks, could you please suggest some links for C++ development with vim? Unfortunately after pretty much googling around I haven t found for C++ anything as
    Message 1 of 4 , Sep 2, 2007
    • 0 Attachment
      Folks, could you please suggest some links for C++ development with
      vim? Unfortunately after pretty much googling around I haven't found
      for C++ anything as comprehensive as, say, "vim for PHP programmers"
      by Adrei Zmievski(btw, almost everything mentioned in Andrei's slides
      is applicable to C++ as well, many thanks to him!)

      I think I know some basics(using ctags with taglist, cscope, A plugin
      etc) but I guess there should be more ;) For example, I guess there
      should be some tip how to simplify maintaining implementation and
      declaration of a function/method. It would be just great if changing
      args in the implementation would update them automatically in the
      header as well. And so on...

      Thanks for any links in advance!

      --
      Best regards, Pavel

      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_use" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • John Beckett
      ... I don t think the Vim Tips wiki is sufficiently finished to satisfy what you re after, but we hope you will eventually find what you want at:
      Message 2 of 4 , Sep 2, 2007
      • 0 Attachment
        Pavel Shevaev wrote:
        > Folks, could you please suggest some links for C++
        > development with vim?

        I don't think the Vim Tips wiki is sufficiently finished to satisfy what
        you're after, but we hope you will eventually find what you want at:

        http://vim.wikia.com/wiki/Category:C_plus_plus

        One way to find this is to visit any Vim Tips page (http://vim.wikia.com/)
        and click the Categories link. Then click the '+' next to VimTip (requires
        javascript), then select a category of interest.

        However, there are hundreds of tips that have not yet been categorised.
        Anyone able to help with that project should visit (please!):

        http://vim.wikia.com/wiki/Vim_Tips_Wiki:Category_guidelines

        John


        --~--~---------~--~----~------------~-------~--~----~
        You received this message from the "vim_use" maillist.
        For more information, visit http://www.vim.org/maillist.php
        -~----------~----~----~----~------~----~------~--~---
      • hermitte@free.fr
        Hello, ... There are two big suites of ftplugins for C&C++. I m maintening one of them [1] As far as I known, mine is the only one coming with functions able
        Message 3 of 4 , Sep 3, 2007
        • 0 Attachment
          Hello,

          Pavel Shevaev <pacha.shevaev@...> wrote:


          > Folks, could you please suggest some links for C++ development with
          > vim? Unfortunately after pretty much googling around I haven't found
          > for C++ anything as comprehensive as, say, "vim for PHP programmers"
          > by Adrei Zmievski(btw, almost everything mentioned in Andrei's slides
          > is applicable to C++ as well, many thanks to him!)

          There are two big suites of ftplugins for C&C++. I'm maintening one of them [1]
          As far as I known, mine is the only one coming with functions able to analyse
          C++ function signatures, determine the current scope, ...
          However it is quite intrusive as it imposes by default (i.e. it can be
          deactivated) the use of placeholder/markers, and many context-sensitive
          abbreviations. Not everybody like it.


          > I think I know some basics(using ctags with taglist, cscope, A plugin
          > etc) but I guess there should be more ;) For example, I guess there
          > should be some tip how to simplify maintaining implementation and
          > declaration of a function/method.

          :GOTOIMPL/MOVETOIMPL (with my suite ; there are still a few bugs)

          > It would be just great if changing args in the implementation
          > would update them automatically in the header as well.

          This problem is a problem I wish to solve. However, I don't know how to solve
          it. Not that I don't know how to fetch and recognize functions (I have already
          implemeted a kind of VimL API for analysing C++). The problem is I don't know
          what the end-vim-user (i.e. us) should type on its keyboard to mark the initial
          function, make the changes, and them propagate the modifications to the
          associated declaration (or definition).

          Any idea is welcomed.

          > And so on...

          As John pointed out, there is a section dedicated to C++ vim tips on vim.wikia.

          Regarding the other plugins I use for developping in C++, there is also:
          - EnhancedCommentify (for toggling comments)
          - a.vim
          - cvsmenu

          And also a few other plugins I'm maintening [2]
          - SearchInRuntime (for h/v spliting the current window and opening a file, from
          &path, identified by its name (wildcards accepted) => no need for any project
          brwoser)
          - local_vimrc (for having project settings ; a project is defined by a hierarchy
          of directories)
          - BuildToolsWrappers (for simplifiyng the merging of compiler plugins, and
          filtering compilation outputs)
          - Refactor (that I hope to release soon ; only /extract method/, /extract
          expression/, and /extract type/ are supported for the moment)


          [1] http://hermitte.free.fr/vim/ressources/lh-cpp.tar.gz (the lastest version of
          the VimL API for C++ is a bit different from the one in te archive)
          [2] http://hermitte.free.fr/vim/ressources/

          HTH,
          --
          Luc Hermitte
          http://hermitte.free.fr/vim/

          --~--~---------~--~----~------------~-------~--~----~
          You received this message from the "vim_use" maillist.
          For more information, visit http://www.vim.org/maillist.php
          -~----------~----~----~----~------~----~------~--~---
        • Pavel Shevaev
          ... How about marking some area in a header file with some tags which will be rewritten with function declarations taken from implementation each time the user
          Message 4 of 4 , Sep 3, 2007
          • 0 Attachment
            > Any idea is welcomed.

            How about marking some area in a header file with some tags which will
            be rewritten with function declarations taken from implementation each
            time the user types some special command?

            Something like this in header file:

            /*AUTO DECLARATIONS START*/
            ...
            /*AUTO DECLARATIONS END*/

            Say, once I type :imp2decl the current file's function declarations
            copied to the header, simply rewriting all contents of these special
            tags.

            > [1] http://hermitte.free.fr/vim/ressources/lh-cpp.tar.gz (the lastest version of
            > the VimL API for C++ is a bit different from the one in te archive)
            > [2] http://hermitte.free.fr/vim/ressources/

            Thank you very much for such a detailed answer, I'm definitely going
            to have a very close look at these resources.

            --
            Best regards, Pavel

            --~--~---------~--~----~------------~-------~--~----~
            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.