In fact, it was not that simple on my computer (could this be
Windows-related?).

The error file would only be created if i ran
perl -MVi::QuickFix=C:/quickfix_errors.err /my/program
from an external console
(but not from inside Vim, with :!perl -MVi::QuickFix=C:/quickfix_errors.err
/my/program)
which i don't like, as i'm trying to avoid having to switch from Vim to an
external console.

:make > C:/quickfix_errors.err
wouldn't create the file either.
The only thing that works for me is to have the
use Vi::QuickFix 'C:/quickfix_errors.err'
in my script, and then do
:make.

It's not my ideal solution, but it works well enough for me.


On 14 July 2012 10:17, mascip <[email protected]> wrote:

> Thank you Mark.
> Unfortunately, i didn't understand the vim-addon-actions documentation.
>
> But you made me understand enough in your message : when i was typing :cf,
> it wasn't executing :cfirst, as i was expecting, but :cfile instead. Now i
> can confirm that :cfirst indicates the first compilation error, from the
> same list as :cnext and :cprevious. But it is not supposed to jump to the
> error. :cfile is supposed to jump to the error, and what i needed was just
> to specify the error file as an argument.
>
> So, for those who would have the same problem, i had to choose the error
> file path with
>
> use Vi::QuickFix 'C:/quickfix_errors.err';
> or with
> :!perl _MVI::QuickFix=C:/quickfix_errors.err
> Then i just have to do
> :cfile C:/quickfix_errors.err
> and it jumps to the first error ! And then, :cn and :cp jump to the next
> and previous errors.
> Perfect !
>
> Apparently, it was just the default error file path which wasn't right. I
> think it was just not the same when i was writing it with :make, and
> reading it with :cfile. By specifying it in both directions, it works =)
>
> Now i just have to make my own mappings to make this all faster and easier.
>
>
>
>
>
> On 13 July 2012 20:55, Marc Weber <[email protected]> wrote:
>
>> I personally have written github.com/MarcWeber/vim-addon-actions for
>> that.
>> Make sure to read its documentation, it also contains a list of related
>> work:
>>
>>   SingleCompile : Let user compile or run a single source file
>> conveniently
>>   http://www.vim.org/scripts/script.php?script_id=3115
>>
>>   Quickrun:
>>   http://www.vim.org/scripts/script.php?script_id=3146
>>   http://github.com/thinca/vim-quickrun/blob/master/plugin/quickrun.vim
>>
>>   Compile:
>>   http://www.vim.org/scripts/script.php?script_id=3462
>>
>>
>> There may be more, try vim.org/search.php
>>
>> In the end they all do the same:
>>
>> write a file, set error format, load using cfile or the like.
>>
>> :compiler perl
>>
>> is the standard vim way.
>>
>> > :make
>>
>> :make > file.err
>>
>> is what you're looking for.
>>
>> > Then :copen opens the Quickfix List window, where i can read the list
>> of my
>> > (intentional) compilation errors.
>> Yes, it opens the quickfix window, but does not load the error list, see
>> cfile.
>>
>> > E40 : Can't open error file error.err
>> Don't understand this. Must be a Vim default I never cared about.
>>
>> Marc Weber
>>
>> --
>> 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
>>
>
>
>
> --
>
> [email protected]
> http://lesrikikibians.fr
>
>


-- 

[email protected]
http://lesrikikibians.fr

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

Reply via email to