Re: change filenames before vim reads buffer
Hi again, and thanks for your quick responses. I am using the addition of an extra filter on the makeprg, as suggested. Here's what I use (I'm setting it buffer local, for other reasons): let &l:makeprg = &makeprg . ' $* \| sed -e "{ s/\(\w\)\:\\\/\/cygdrive\/\1\//;s/\\\/\//g }"' which converts X:\ to /cygdrive/X/ and all \ to /. Thanks again, Tom.
Re: change filenames before vim reads buffer
Hello, Tom Whittock <[EMAIL PROTECTED]> wrote: > I'm running the vim under cygwin, and have set up my build process to > execute via :make. This is great, but the build process reports > filenames in DOS format, not the cygwin /cygdrive/* way. This means > that when a quickfix command runs, vim will be asked to open > "C:\dev\test.cpp", when I already have "/cygdrive/c/dev/test.cpp" > open, and this causes issues for me. > > Is there any way I can insert my own handler in between the quickfix > jump and buffer reading so that I can fix up the filename? Moreso, > could I do this in general so that if I to "C:\dev\test.cpp", vim > will interpret that in the cygwin manner? I am in the opposite situation: I execute cygwin compilers from win32-gvim. I'm maintening a filter-plugin that transforms *nix paths into win32 paths. It should be easy to do adapt the perl script to do the contrary. It can be found in compiler/BTW/cygwin.pl which is bundled into: http://hermitte.free.fr/vim/ressources/lh-BTW.tar.gz (This vim plugin works, but it is still is alpha stage :-() HTH, -- Luc Hermitte http://hermitte.free.fr/cygwin/ http://hermitte.free.fr/vim/
Re: change filenames before vim reads buffer
Tom Whittock schrieb: Hi. I'm running the vim under cygwin, and have set up my build process to execute via :make. This is great, but the build process reports filenames in DOS format, not the cygwin /cygdrive/* way. This means that when a quickfix command runs, vim will be asked to open "C:\dev\test.cpp", when I already have "/cygdrive/c/dev/test.cpp" open, and this causes issues for me. Is there any way I can insert my own handler in between the quickfix jump and buffer reading so that I can fix up the filename? Moreso, could I do this in general so that if I to "C:\dev\test.cpp", vim will interpret that in the cygwin manner? Thanks, Tom. :h quickfix-valid [...] | Filtering messages | | If you have a compiler that produces error messages that do not fit in | the format string, you could write a program that translates the error | messages into this format. You can use this program with the ":make" | command by changing the 'makeprg' option. For example: | :set mp=make\ \\\|&\ error_filter | The backslashes before the pipe character are required to avoid it to | be recognized as a command separator. The backslash before each space | is required for the set command. Just a try, Andy -- EOF ___ Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de
change filenames before vim reads buffer
Hi. I'm running the vim under cygwin, and have set up my build process to execute via :make. This is great, but the build process reports filenames in DOS format, not the cygwin /cygdrive/* way. This means that when a quickfix command runs, vim will be asked to open "C:\dev\test.cpp", when I already have "/cygdrive/c/dev/test.cpp" open, and this causes issues for me. Is there any way I can insert my own handler in between the quickfix jump and buffer reading so that I can fix up the filename? Moreso, could I do this in general so that if I to "C:\dev\test.cpp", vim will interpret that in the cygwin manner? Thanks, Tom.