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

Re: C/C++ editing, quickfix menu

Expand Messages
  • Antoine J. Mechelynck
    ... From: Gary Johnson To: vim Sent: Friday, April 30, 2004 9:10 AM Subject: Re: C/C++ editing, quickfix menu
    Message 1 of 9 , Apr 30 4:58 AM
    View Source
    • 0 Attachment
      ----- Original Message -----
      From: "Gary Johnson" <garyjohn@...>
      To: "vim" <vim@...>
      Sent: Friday, April 30, 2004 9:10 AM
      Subject: Re: C/C++ editing, quickfix menu
      [...]

      > Since you're on Windows and probably do not have 'make' available,
      [...]

      Such sweeping statements are not always warranted. Turbo C for Dos used to
      come with a "Make" utility, and so does the BCC command-line compiler for
      Windows. I'm sure there are others.

      Regards,
      Tony.
    • Juergen Salk
      ... I have introduced the following mappings for this: nmap :make :botright cwindow imap :make :botright cwindow I.e.
      Message 2 of 9 , Apr 30 5:42 AM
      View Source
      • 0 Attachment
        * jonah <jonahgoldstein@...> [040429 18:35]:

        > How do I set up vim with my command line C/C++
        > compiler for the edit, compile, test cycle?
        >
        > When I get compiler errors, I'd like them to be routed
        > back to vim and displayed in the quickfix window.

        I have introduced the following mappings for this:

        nmap <F10> :make<CR>:botright cwindow<CR><CR>
        imap <F10> <Esc>:make<CR>:botright cwindow<CR><CR>

        I.e. pressing F10 builds the program and displays a full width
        quickfix window at the bottom of the screen. I have to use
        »:botright« here, because I got used to have a vertical split
        taglist window on the r.h.s, which is too narrow for the quickfix
        window.

        > I'm on windows XP.

        I'm on Linux. ;-)

        Best regards - Juergen

        --
        GPG A997BA7A | 87FC DA31 5F00 C885 0DC3 E28F BD0D 4B33 A997 BA7A
      • Luc Hermitte
        ... VC comes with NMAKE DM C/C++ also comes with a make program GCC can come with make -- Luc Hermitte http://hermitte.free.fr/vim/
        Message 3 of 9 , Apr 30 6:16 AM
        View Source
        • 0 Attachment
          * On Fri, Apr 30, 2004 at 01:58:00PM +0200, Antoine J. Mechelynck <antoine.mechelynck@...> wrote:
          > > Since you're on Windows and probably do not have 'make' available,
          >
          > Such sweeping statements are not always warranted. Turbo C for Dos
          > used to come with a "Make" utility, and so does the BCC command-line
          > compiler for Windows. I'm sure there are others.

          VC comes with NMAKE
          DM C/C++ also comes with a make program
          GCC can come with make

          --
          Luc Hermitte
          http://hermitte.free.fr/vim/
        • jonah
          ... And so does cygwin, which is what I use. J
          Message 4 of 9 , Apr 30 9:28 AM
          View Source
          • 0 Attachment
            > VC comes with NMAKE
            > DM C/C++ also comes with a make program
            > GCC can come with make

            And so does cygwin, which is what I use.

            J
          • Luc Hermitte
            ... Then you are probably using GCC (cygwing special). BTW, if you are using the win32 version of Vim, you will be interrested by:
            Message 5 of 9 , Apr 30 10:04 AM
            View Source
            • 0 Attachment
              * On Fri, Apr 30, 2004 at 09:28:14AM -0700, jonah <jonahgoldstein@...> wrote:
              > > [...]
              > > GCC can come with make
              >
              > And so does cygwin, which is what I use.

              Then you are probably using GCC (cygwing special).

              BTW, if you are using the win32 version of Vim, you will be interrested
              by:
              <http://vim.sourceforge.net/scripts/script.php?script_id=722>
              which I've just updated, and may be also by:
              <http://www.vim.org/tips/tip.php?tip_id=381>
              (-> <http://hermitte.free.fr/cygwin/cyg-wrapper.sh>)

              In conjunction with:
              <http://vim.sourceforge.net/scripts/script.php?script_id=727>
              I use the attached "directory-plugin" to help me with test programs
              made of one file only. It will be easy to use it with projects, we will
              just have to chage %< and #< to a global variable like b:cpp_project for
              instance.

              HTH,

              --
              Luc Hermitte
              http://hermitte.free.fr/vim/c.php
            • jonah
              ... Luc, I m actually using Borland bcc32, because I m writing windows apps. I couldn t tell whether or not your script was still needed or if it would still
              Message 6 of 9 , Apr 30 10:52 AM
              View Source
              • 0 Attachment
                > Then you are probably using GCC (cygwing special).
                >
                > BTW, if you are using the win32 version of
                > Vim, you will be interrested
                > by:
                >
                > <http://vim.sourceforge.net/scripts/script.p
                > hp?script_id=722>
                > which I've just updated, and may be also by:
                > <http://www.vim.org/tips/tip.php?tip_id=381>

                Luc,

                I'm actually using Borland bcc32, because I'm writing
                windows apps. I couldn't tell whether or not your
                script was still needed or if it would still work.

                Thanks,
                Jonah
              • Luc Hermitte
                ... Then, you won t need the script. Its purposes is to convert the paths we get from cygwin programs (like gcc) into windows paths. However, I guess there is
                Message 7 of 9 , Apr 30 12:41 PM
                View Source
                • 0 Attachment
                  * On Fri, Apr 30, 2004 at 10:52:01AM -0700, jonah <jonahgoldstein@...> wrote:
                  > I'm actually using Borland bcc32, because I'm writing windows apps. I
                  > couldn't tell whether or not your script was still needed or if it
                  > would still work.

                  Then, you won't need the script. Its purposes is to convert the paths
                  we get from cygwin programs (like gcc) into windows paths.

                  However, I guess there is a bcc compiler-plugin on sourceforge. It could
                  interrest you.

                  (You will found cyg-wrapper.sh useful only if you launch win32-vim from
                  cygwin's bash.)

                  Regards.
                  --
                  Luc Hermitte
                  http://hermitte.free.fr/vim/
                Your message has been successfully submitted and would be delivered to recipients shortly.