Thursday, May 19, 2011

Re: 'commandline' vs ':e' for jump to line (FEAT. REQ)

So maybe I sould make a function that it will remove all lines of quick fix file that contain the word "warning" and set it to be called in QuickFixCmdPost.
Am I right? Maybe I can remove lines which contains the Makefile filename too. 

On 19 May 2011 10:43, Karthick Gururaj [via VIM] <[hidden email]> wrote:
On Wed, May 18, 2011 at 7:03 PM, crabsody <[hidden email]> wrote:
> I tried to use :make (quickfix) but I have some problems. First of all how
> can I have only the errors and avoid all the warnings? Then how can I set to
> search only through my source files (*.c, *.cpp ) and not other scripts I
> have in the directory (e.g. Makefile)?
How these can be done depends on your environment to some extent..

For example, doing:
make abc.o
might compile only abc.c. Does it work that way for you?

If yes,
:exe "make " . expand("%:r") . ".o"
"might" compile the file being edited (also depends on the full file path)

Another way could be to process the quickfix output in a way that you want.

See :help QuickFixCmdPost and :help QuickFixCmdPost-example

Yet another way is to let :make work as usual, but define your own
mappings for next error and previous error - to only look at errors
(not warnings) in the quickfix window for the current file

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



If you reply to this email, your message will be added to the discussion below:
http://vim.1045645.n5.nabble.com/commandline-vs-e-for-jump-to-line-FEAT-REQ-tp1142395p4409012.html
To unsubscribe from 'commandline' vs ':e' for jump to line (FEAT. REQ), click here.



View this message in context: Re: 'commandline' vs ':e' for jump to line (FEAT. REQ)
Sent from the Vim - General mailing list archive at Nabble.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

No comments: