Tuesday, April 6, 2010

How to keep the full path of the search result in quickfix window?

Hi,

I am using the findstr /f:file.txt /n pattern in my script to search
the pattern. After the system the search results
have the full path of the file name. However, after dump the result to
quickfix window, some of the files are only displayed as relative
path. Does anyone know how to fix this?

Here is the command that I am using:
let files = 'c:\cscope.files'
let scmd = 'findstr /f:'.files . ' /n ' . a:pattern
let search_result = system(scmd)

exe "redir! > " . tmpfile
silent echon search_result
redir END
exe "silent! cgetfile " . tmpfile

When I debug the code and echo the search_result, it contains the full
path of the results. However, in the quickfix, some files are only
displayed without the complete path.

Thanks

Frank

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

To unsubscribe, reply using "remove me" as the subject.

No comments: