vimdiff of unnamed pipes

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

vimdiff of unnamed pipes

Peng Yu
Hi,

If I vimdiff unnamed pipes, when I change the terminal window size,
the contents in vim window will disappear. Is this a bug? Is there a
way to circumvent this problem? Thanks.

--
Regards,
Peng

--
--
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/CABrM6wn0G7JeYDDXnwCWRGQsMNGGgDu%2BdsYGAwphqTOs8f8mKw%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: vimdiff of unnamed pipes

Tim Chase
On 2020-03-11 21:29, Peng Yu wrote:
> If I vimdiff unnamed pipes, when I change the terminal window size,
> the contents in vim window will disappear. Is this a bug? Is there a
> way to circumvent this problem? Thanks.

Could you detail how you're using these unnamed pipes?

I tried (using a bashism)

  $ vimdiff <(seq 10) <(seq 10 | sed 5d)

and then resized the terminal window on the resulting diff and
everything worked fine (vim8.1.2372 in an xterm on FreeBSD),
displaying/highlighting the one deleted line.

Additional details might also be relevant:

- your OS?

- your window-manager (if not Windows/Mac)

- which terminal emulator? (xterm, rxvt, st, ...)

- which shell? (bash, zsh, tcsh, ksh, /bin/sh, ash/dash, fish...)

- which version of vim?

- are you running in a terminal multiplexer (like tmux or GNU screen)?

- are you using some method

- are you launching vim with any plugins or non-default settings?
  (does the behavior occur if you disable plugins and startup scripts)

Answers to these questions will help attempt to narrow down or
replicate the issue.

-tim


--
--
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/20200311214440.240c6e71%40bigbox.attlocal.net.
Reply | Threaded
Open this post in threaded view
|

Re: vimdiff of unnamed pipes

Benjamin Esham-2
In reply to this post by Peng Yu
Peng Yu wrote:

> If I vimdiff unnamed pipes, when I change the terminal window size,
> the contents in vim window will disappear. Is this a bug? Is there a
> way to circumvent this problem? Thanks.

I had a similar problem a couple of weeks ago! In my case, it was because I
have the 'autoread' option set by default. See

    :help 'autoread'

It seems that when the window size changes, Vim tries to reread the contents
of the pipe, but those contents aren't there anymore and so you just get an
empty file. In my experience, you can prevent this specific problem with the
autocommand

    autocmd BufRead /dev/fd/* setlocal noautoread

This will disable the rereading behavior only for the ephemeral "files" you
get by reading from pipes. (This works for me on macOS but you might have to
do something different on other OSes.)

Hope this helps,

Benjamin

--
Benjamin Esham
https://esham.io

--
--
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/k7pmafuo.h23z97%40bdesham.net.
Reply | Threaded
Open this post in threaded view
|

XQuery indentation and syntax file

Peng Yu
In reply to this post by Peng Yu
Hi,

This seems to be a quite old vim file for XQuery.

https://github.com/jeroenp/vim-xquery-syntax

This is also very old and seems to be buggy.

https://github.com/vim-scripts/XQuery-indentomnicompleteftplugin/blob/master/ftplugin/xquery.vim

Are there updated XQuery indentation and syntax files to be used? Thanks.

--
Regards,
Peng

--
--
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/CABrM6wk73u1fRvLbDMpogDJ7FvMNME4iqhcXxfvGRa1Yr%3DYomA%40mail.gmail.com.