On Thursday, March 7, 2013 9:43:46 AM UTC-6, FlashBurn wrote:
> On Wednesday, March 6, 2013 5:16:31 PM UTC-5, Ben Fritz wrote:
> > On Wednesday, March 6, 2013 3:49:11 PM UTC-6, FlashBurn wrote:
> > > 
> > > I think I know where the problem is.
> > > It is the spaces in the path. The error.err file is created. But when vim 
> > > tries to open there it sees spaces in it, that's why it can't open it. 
> > > The solution, I decided to use is the 8dot3 path. Thanks for the help 
> > > everyone.
> > 
> > That's an acceptable workaround, I think. But maybe it should be supported 
> > if it actually isn't. I personally avoid using paths with spaces whenever 
> > possible, especially now that I'm on Windows 7 and can use C:\Users instead 
> > of "C:\Documents and Settings".
> > 
> > To make it even nicer for yourself, Vim can automatically build the 8.3 
> > path for you. See:
> > 
> > :help fnamemodify()
> > :help filename-modifiers
> 
> Well, I keep finding more problems with my script. It turns out it works find 
> if there are no errors during compilation. Once compiler detects and error 
> during compilation something interesting is happening. It tries to open the 
> error.err file and generates the following error:
> shell returned2
> E303: Unable to open swap file for "and 
> Settings\user\Projects\MyProject\trunk\src\myfile.c
> "and Settings\user\Projects\MyProject\trunk\src\myfile.c,60 Error"[New 
> DIRECTORY]
> 
> Does anybody know what is going on and how I can fix it? Any help is 
> appreciated.
> 
> Here is my project setup script:
> 
> Here is my modified script, using Ben's advice for 8dot3 file path generation.
> " Setup the project home directory.
> let s:project_path = 'C:\Documents and Settings\user\Projects\MyProject\trunk'
> let s:project_path_8dot3 = fnamemodify(s:project_path, ':8')
> 
> " Setup the project home directory.
> let s:vim_project_path = fnameescape(s:project_path)
> set cd=s:project_path_8dot3

As Gary mentioned, this "set cd=" line is NOT doing what you seem to think it 
is doing. Fix this first, it looks like your make program is outputting paths 
with spaces, and I don't know whether Vim will be able to handle those very 
well.

> 
> " Setup make command.
> " 1. Use makefile from 'src\makefile'.
> " 2. Change to a 'src' directory before running make.
> let &makeprg = s:project_path_8dot3.'\tools\make.exe'
> let &makeprg .= ' -f '.s:project_path_8dot3.'\src\makefile'
> let &makeprg .= ' --directory '.s:project_path_8dot3.'\src'
> 
> " Setup the file where the output of ':make' will be redirected.
> let &makeef = s:project_path_8dot3.'\src\error.err'

You may need to set the 'errorformat' option as well.

If I were you, when I'm all done, I'd consider making this a compiler plugin. 
See :help write-compiler-plugin.

-- 
-- 
You received this message from the "vim_use" 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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to