[Hint] quickfix list in vim for follow up errors

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

[Hint] quickfix list in vim for follow up errors

Kunal Chauhan
Hi Team.

I am using the :make all from vim in my source code.
as the code has multiple warning and some error.

 Point is: if i do the clist it shows multiple lines of code with warning , but I want to follow up the error part only , with out scrolling so much in clist .
Is there will some nicer way of finding the error part easily of compilation via quickfixlist in large code base ?



Thanks
kunal

--
--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CACEFAc0tCfo4J-9WF3oWt8%3DQrhkHWCztfLe_FOyAWNOam6g7yg%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: [Hint] quickfix list in vim for follow up errors

Tony Mechelynck
On Sat, Jul 4, 2020 at 11:02 AM Kunal Chauhan <[hidden email]> wrote:

>
> Hi Team.
>
> I am using the :make all from vim in my source code.
> as the code has multiple warning and some error.
>
>  Point is: if i do the clist it shows multiple lines of code with warning , but I want to follow up the error part only , with out scrolling so much in clist .
> Is there will some nicer way of finding the error part easily of compilation via quickfixlist in large code base ?
>
>
>
> Thanks
> kunal

The :cn[ext] (go to next error) and :cN[ext] (go to previous error)
allow you to go to the next point in the source where the compiler
complained, evn if the quickfix list itself isn't displayed. Similarly
:cnf[ile] and :cNf[ile] (next and previous file), and :crew[ind] (go
to first error) and :clast (go to last error). If you don't mind
taking up three keys with and without Shift, you can even assign them
to keys, for example as follows:

        :map <F2> :cn<CR>
        :map <S-F2> :cN<CR>
        :map <F3> :cnf<CR>
        :map <S-F3> :cNf<CR>
        :map <F4> :crew<CR>
        :map <S-F4> :clast<CR>

The same mappings apply of curse in any quickfix list, i.e not only as
generated by :make but also by :helpgrep and :vimgrep

Best regards,
Tony.

--
--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CAJkCKXu3BXXRPDk0nnncKCo-HaG7CeuhS4mm2ZX%2BZymyTQ-DCQ%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: [Hint] quickfix list in vim for follow up errors

Gary Johnson-4
In reply to this post by Kunal Chauhan
On 2020-07-04, Kunal Chauhan wrote:
> Hi Team.
>
> I am using the :make all from vim in my source code.
> as the code has multiple warning and some error.
>
>  Point is: if i do the clist it shows multiple lines of code with warning , but
> I want to follow up the error part only , with out scrolling so much in clist .
> Is there will some nicer way of finding the error part easily of compilation
> via quickfixlist in large code base ?

I usually use the cfilter plugin for this.  It comes with Vim, so
you just need to enable it by putting

    packadd cfilter

in your vimrc.  See

    :help cfilter-plugin

Then you can filter your quickfix list to contain only errors with

    :Cfilter error

or remove all warnings with

    :Cfilter! warning

Those commands create new quickfix lists without affecting the
original list, you can return to the original list with

    :colder

HTH,
Gary

--
--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20200704152814.GA24359%40phoenix.
Reply | Threaded
Open this post in threaded view
|

Re: [Hint] quickfix list in vim for follow up errors

Kunal Chauhan
In reply to this post by Tony Mechelynck
Point is : as compiler is showing warning messages , so if user is only intrested to see the error messages
Then what are the ways?

On 4 Jul 2020 3:58 p.m., "Tony Mechelynck" <[hidden email]> wrote:
On Sat, Jul 4, 2020 at 11:02 AM Kunal Chauhan <[hidden email]> wrote:
>
> Hi Team.
>
> I am using the :make all from vim in my source code.
> as the code has multiple warning and some error.
>
>  Point is: if i do the clist it shows multiple lines of code with warning , but I want to follow up the error part only , with out scrolling so much in clist .
> Is there will some nicer way of finding the error part easily of compilation via quickfixlist in large code base ?
>
>
>
> Thanks
> kunal

The :cn[ext] (go to next error) and :cN[ext] (go to previous error)
allow you to go to the next point in the source where the compiler
complained, evn if the quickfix list itself isn't displayed. Similarly
:cnf[ile] and :cNf[ile] (next and previous file), and :crew[ind] (go
to first error) and :clast (go to last error). If you don't mind
taking up three keys with and without Shift, you can even assign them
to keys, for example as follows:

        :map <F2> :cn<CR>
        :map <S-F2> :cN<CR>
        :map <F3> :cnf<CR>
        :map <S-F3> :cNf<CR>
        :map <F4> :crew<CR>
        :map <S-F4> :clast<CR>

The same mappings apply of curse in any quickfix list, i.e not only as
generated by :make but also by :helpgrep and :vimgrep

Best regards,
Tony.

--
--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CAJkCKXu3BXXRPDk0nnncKCo-HaG7CeuhS4mm2ZX%2BZymyTQ-DCQ%40mail.gmail.com.

--
--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CACEFAc0RLsX4PGtBYdZJoiNnLd-BP0teiJ5zUQcf9EY_H4wDEw%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: [Hint] quickfix list in vim for follow up errors

romainlafourcade

Point is : as compiler is showing warning messages , so if user is only intrested to see the error messages
Then what are the ways?

Configure your compiler to only output errors. 

--
--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/105278a3-50c5-457a-aaf5-896b4d814106o%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: [Hint] quickfix list in vim for follow up errors

Kunal Chauhan
In reply to this post by Gary Johnson-4
packadd cfilter showing error " it is not an editor command"  , as I should be come with vim , my development system is only vim but internet is not accessible on that due to some restrictions

On Sat, Jul 4, 2020 at 8:59 PM Gary Johnson <[hidden email]> wrote:
On 2020-07-04, Kunal Chauhan wrote:
> Hi Team.
>
> I am using the :make all from vim in my source code.
> as the code has multiple warning and some error.
>
>  Point is: if i do the clist it shows multiple lines of code with warning , but
> I want to follow up the error part only , with out scrolling so much in clist .
> Is there will some nicer way of finding the error part easily of compilation
> via quickfixlist in large code base ?

I usually use the cfilter plugin for this.  It comes with Vim, so
you just need to enable it by putting

    packadd cfilter

in your vimrc.  See

    :help cfilter-plugin

Then you can filter your quickfix list to contain only errors with

    :Cfilter error

or remove all warnings with

    :Cfilter! warning

Those commands create new quickfix lists without affecting the
original list, you can return to the original list with

    :colder

HTH,
Gary

--
--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20200704152814.GA24359%40phoenix.


--
Thanks with Regards!

Kunal Chauhan
Mob:09813614826
Mob:08860397903

--
--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CACEFAc346MXw8za65%3DEX-3EJ2ikaT%2BxXC4aJ%2BNuAkaE3Og62Kg%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: [Hint] quickfix list in vim for follow up errors

Christian Brabandt

On So, 12 Jul 2020, Kunal Chauhan wrote:

> packadd cfilter showing error " it is not an editor command"  , as I should be
> come with vim , my development system is only vim but internet is not
> accessible on that due to some restrictions

What vim version are you using?


Best,
Christian
--
Windows 98 bringt die Leistung von gestern auf die Computer von heute.

--
--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20200712160030.GF4839%40256bit.org.
Reply | Threaded
Open this post in threaded view
|

Re: [Hint] quickfix list in vim for follow up errors

Kunal Chauhan
my vim version is 7.4.1099

On Sun, Jul 12, 2020 at 9:30 PM Christian Brabandt <[hidden email]> wrote:

On So, 12 Jul 2020, Kunal Chauhan wrote:

> packadd cfilter showing error " it is not an editor command"  , as I should be
> come with vim , my development system is only vim but internet is not
> accessible on that due to some restrictions

What vim version are you using?


Best,
Christian
--
Windows 98 bringt die Leistung von gestern auf die Computer von heute.

--
--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20200712160030.GF4839%40256bit.org.


--
Thanks with Regards!

Kunal Chauhan
Mob:09813614826
Mob:08860397903

--
--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CACEFAc0crZaZ5bH9JnFw6xuEsDwg_a0%2B%3DkaVMCLhZy2VSWda5A%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: [Hint] quickfix list in vim for follow up errors

Christian Brabandt

On So, 12 Jul 2020, Kunal Chauhan wrote:

> my vim version is 7.4.1099

For the cfilter plugin, you need at least vim 8.1.0311.

Can you install a newer version?


Best,
Christian
--
Was ist der Akademiker anders, als ein eingelerntes und angeeignetes
Glied einer großen Vereinigung?
                -- Johann Wolfgang von Goethe (an Zelter, 1832)

--
--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20200712174518.GG4839%40256bit.org.
Reply | Threaded
Open this post in threaded view
|

Re: [Hint] quickfix list in vim for follow up errors

Kunal Chauhan
no due to some restrictions I have no access to my particular development system . any other alternative ? to do the same stuff, 

On Sun, Jul 12, 2020 at 11:15 PM Christian Brabandt <[hidden email]> wrote:

On So, 12 Jul 2020, Kunal Chauhan wrote:

> my vim version is 7.4.1099

For the cfilter plugin, you need at least vim 8.1.0311.

Can you install a newer version?


Best,
Christian
--
Was ist der Akademiker anders, als ein eingelerntes und angeeignetes
Glied einer großen Vereinigung?
                -- Johann Wolfgang von Goethe (an Zelter, 1832)

--
--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20200712174518.GG4839%40256bit.org.


--
Thanks with Regards!

Kunal Chauhan
Mob:09813614826
Mob:08860397903

--
--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CACEFAc1vi2QR0AuOgUsB4RT_-CgM%3D%2Bz7f-ssgMpTvcRdG9PgLA%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: [Hint] quickfix list in vim for follow up errors

Gary Johnson-4
On 2020-07-13, Kunal Chauhan wrote:

> On Sun, Jul 12, 2020 at 11:15 PM Christian Brabandt wrote:
>
>     On So, 12 Jul 2020, Kunal Chauhan wrote:
>
>     > my vim version is 7.4.1099
>
>     For the cfilter plugin, you need at least vim 8.1.0311.
>
>     Can you install a newer version?

> no due to some restrictions I have no access to my
> particular development system . any other alternative ? to do the same stuff, 

There are three that I can think of.

1.  Change the compiler options to ignore or silence warnings.

2.  Add a filter to the make pipeline by setting 'makeprg' or
    'shellpipe' appropriately, as described in ":help quickfix.txt".
    Search for "^Filtering messages".  See also ":help 'makeprg'".

    For example (untested):

  let &makeprg = "make $* \\| grep -vi 'warning'"

3.  Change 'errorformat' to exclude warnings.

HTH,
Gary

--
--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20200713062601.GA3174%40phoenix.
Reply | Threaded
Open this post in threaded view
|

Re: [Hint] quickfix list in vim for follow up errors

arocker
>
> 1.  Change the compiler options to ignore or silence warnings.
>

Isn't that the software equivalent of sticking a nail in the fuse-box?


--
--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/2d25b9bbd2ec473a5baf1da1ff9f37d9.squirrel%40webmail.vybenetworks.com.
Reply | Threaded
Open this post in threaded view
|

Re: [Hint] quickfix list in vim for follow up errors

Gary Johnson-4
On 2020-07-13, [hidden email] wrote:
> >
> > 1.  Change the compiler options to ignore or silence warnings.
> >
>
> Isn't that the software equivalent of sticking a nail in the fuse-box?

Pretty much.  But that's what Kunal said he wanted.  It could be
that he is currently overwhelmed with errors and will get to
warnings when the errors have been cleaned up.

Regards,
Gary

--
--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20200713192902.GB3174%40phoenix.