Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't compatiable with vim's quickfix. #2

Closed
Mizuchi opened this issue Feb 23, 2013 · 6 comments
Closed

Doesn't compatiable with vim's quickfix. #2

Mizuchi opened this issue Feb 23, 2013 · 6 comments

Comments

@Mizuchi
Copy link

Mizuchi commented Feb 23, 2013

Reproduce the problem:

  1. create a illegal c++ source file.

    $ echo "int main() { illegal c++ program. }" > a.cpp
  2. write a makefile for it

    $ echo -e "all:\n\tg++ a.cpp" > makefile
  3. execute :make in vim

    $ vim -e "make"

vim should jump to a.cpp and report errors. It works in bash, zsh or fish. However in fizsh, vim reports "No errors" and doesn't jump to a.cpp.

I tried in several environments (and disabled all vim's plugins):
debian 7.0, vim 7.3-547, fizsh 1.0.2, xterm 278 with dwm 6.0
archlinux, vim 7.3-798, fizsh 1.0.5, xterm 298/tty, dwm 6.0/xfce4

A funny thing is if current shell is fizsh, even if I switch to bash ($ bash), or open a new virtual terminal ($ xterm -e bash), vim's quickfix still doesn't work.

@guidovansteen
Copy link
Member

Interesting... However, even though I tried, I cannot reproduce the bug. On my machine everything works the same for fizsh, zsh, bash, and fish. I have never used vim's quickfix features though. So I may have miss something.

Anyway, I would not expect a difference between zsh and fizsh because fizsh is just a layer of simple scripts that enhances zsh.

Could you provide more details about how the bug can be triggered?

@guidovansteen
Copy link
Member

One more question:

Why should

user@machine ~> vim -e "make"

jump to "a.cpp" and report errors?

On my machine it does not... Neither under zsh, bash, fish nor under fizsh. I even tried this with an empty ".vimrc" file.

Instead vim just creates a file called "make", and enters into its "Ex mode"... This seems expected behavior according to the vim documentation.

@Mizuchi
Copy link
Author

Mizuchi commented Feb 23, 2013

Sorry, that's a typo, the correct cmd is:
vim -c "make"

@Mizuchi
Copy link
Author

Mizuchi commented Feb 23, 2013

On my machine, Zsh works fine, but fizsh doesn't work.
I also tried that output make's error to a file ($ make >& error.log) and then use ":cfile error.log" in vim to read the error file, and this time, everything works fine in fizsh. I guess, maybe fizsh has some problem with pipe that impede vim read error from make (that's also explain why vim reported "No errors"). vim uses command like "!make 2>&1 | tee /tmp/va5Pdt5/0" to get the error from make.

I also tried gvim. You know what, If gvim is opened in fizsh, quickfix doesn't work. However, if gvim is opened by bash, quickfix works.

I just installed a fresh archlinux in virtualbox and the problem is still exist.
If you are familiar with archlinux, you could try to install a base system in virtualbox,
download and install fizsh from AUR (or install manually if you like).
And just try it in tty, you would likely reproduct this issue.

I guess install debian instead of archlinux in virtualbox would get the same issue.
Though fizsh in debian stable or testing is a little bit dated (1.0.2),
but archlinux use the latest version (1.0.5) and still has the same issue.

@Mizuchi
Copy link
Author

Mizuchi commented Feb 23, 2013

Just let you know, I tested with debian stable in virtualbox, base system, no desktop environment, no x-window, fresh install and just gcc, vim and fizsh in tty. And I still could reproduct this issue.

@guidovansteen
Copy link
Member

Hi Mizuchi,

Indeed "vim -c make" reproduces the bug. I checked out which part of fizsh causes this, and the culprit is the syntax highlighting sripts, which are sourced by fizsh. They are being maintained at https://github.com/zsh-users/zsh-syntax-highlighting. You should report this bug there.

I will close this bug because it is unrelated to the core fizsh scripts. Thanks for you report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants