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

Re: Customizing the Build functionality

Expand Messages
  • Frank Hellenkamp
    Hi, ... I usually just stay in the root of the project-folder (I don t change the working directory), so the PWD is the same folder, where the Makefile is, so
    Message 1 of 4 , Aug 23, 2011
      Hi,

      > I use a project folder hierarchy where the Project folder contains the
      > Makefile and Doxyfile files. Then the source files are in Project/src,
      > the intermediate build products are in Project/build and the doxygen
      > generated files are in Project/docs.
      >
      > When I'm editing a source file (ie. Project/src/main.cpp) and use the
      > "Build" command (or :make), I get an error that no Makefile can be
      > located. Is there a way to have set the Build command to run make in
      > the Project directory without having to change directories first?


      I usually just stay in the root of the project-folder (I don't change the working directory), so the PWD is the same folder, where the Makefile is, so you can use make as intended.

      This should fix your problem.


      The other reason I do this is "sessions":

      I autosave my sessions in the current working directory (this is from my vimrc):

      " save session on losing focus
      au FocusLost *
      \ :exe "mks! _vimsession.vis"

      " also save colorscheme
      au FocusLost *
      \ :call writefile(['set bg='.&bg, 'color '.colors_name], '_vimsessionx.vim')

      So when I want to open my project, i just type:

      :so ~/path-to-project/_vimsession.vis

      And all project-files I worked on are opened.
      I also have an automator-workflow to do this by doubleclicking on the .vis-file.


      Best

      Frank

      --
      frank hellenkamp | interface designer
      solmsstra├če 7 | 10961 berlin

      +49.30.49 78 20 70 | tel
      +49.176.32 13 88 89 | mbl
      +49.3212.100 35 22 | fax
      jonas@...

      http://depage.net | bureau
      http://depagecms.net | content management
      http://immerdasgleiche.de | read
      http://everydayisexactlythesame.net | see

      --
      You received this message from the "vim_mac" maillist.
      Do not top-post! Type your reply below the text you are replying to.
      For more information, visit http://www.vim.org/maillist.php
    Your message has been successfully submitted and would be delivered to recipients shortly.