> On Nov 12, 7:21 am, "Ricky" <[email protected]> wrote: >> Here is a sample of error message, STATEMENT means 1 line statement. >> IBM1211I W 426.0 Source with length 2 is longer than the target VAR. >> STATEMENT >> IBM1211I W 522.0 Source with length 2 is longer than the target VAR. >> STATEMENT >> >> I define error format like: >> set errorformat=%AIBM%nI\ %t\ %l.0\ %m,%Z%m >> >> Quick fix display: >> |426 warning 1211| Source with length 2 is longer than the target VAR. >> STATEMENT >> |522 warning 1211| Source with length 2 is longer than the target VAR. >> STATEMENT >> >> When I press Enter on the two lines, vim can't jump to correct line, >> cursor >> just stay at the same place. >> Even I can use command :cn / :cp to move to error lines, but it's stupid >> if >> there are many errors. > > This is how I understand your problem: > > You can correctly jump to error lines using :cn / :cp, which indicates > quickfix itself is working. > > However, you cannot jump to an error line using <Enter> on an error > displayed in the quickfix window. > > If this is a correct interpretation of your problem, it is possible > you have a mapping defined for the <Enter> key. > > What is the result (preferably in the quickfix window) of :verbose map > <Enter> ? > > Do you also see this behavior if you launch Vim without a .vimrc or > plugins, with (g)vim -N -u NONE -i NONE?
Yes, the problem is like your description. I don't think <Enter> key is the problem, cos my Grep is working. So I tried to found the difference between them. Just because my error format need a filename, so I edit the error file add filename field: set errorformat=%A%f\ IBM%nI\ %t\ %l.0\ %m,%Z%m Then I can jump to error line through press Enter. Thank you! --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
