Repository: lervag/vimtex

Issue #1719: Vimtex: Viewer cannot find Zathura window ID
Created: 2020-06-16T13:48:32Z
I used minimal.vim with the 'zathura' viewer:
set nocompatible
let &runtimepath  = '~/.vim/bundle/vimtex,' . &runtimepath
let &runtimepath .= ',~/.vim/bundle/vimtex/after'
filetype plugin indent on
syntax enable
" Use zathura as a PDF viewer
let g:vimtex_view_method = 'zathura'
and minimal.tex
\documentclass{minimal}
\begin{document}
Hello world!
\end{document}
I started vim with
    vim -u minimal.vim minimal.tex
Commands/Input
I called :vimtexView while editing minimal.tex.
Observed Behaviour
When launching :VimtexView I can see the following error message:
vimtex: Viewer cannot find Zathura window ID!

And the focus stays on vim. If I close the Zathura window, and call the :vimtexView again, it is displayed correctly the first time althogh the error message is still displayed. Then if I just call the command another time, the focus doesn't jump to the zathura window and the error message is displayed again.
Expected Behaviour
I expect the command :VimtexView to jump the focus to the Zathura viewer.
Output from VimtexInfo
System info
  OS: Debian GNU/Linux 10 (buster)
  Vim version: VIM 8.1 (1-875, 878, 884, 948, 1046, 1365-1368, 1382, 1401)
  Has clientserver: false

vimtex project: minimal
  base: minimal.tex
  root: /tmp/vimtexissue
  tex: /tmp/vimtexissue/minimal.tex
  out: /tmp/vimtexissue/minimal.pdf
  log: /tmp/vimtexissue/minimal.log
  aux: /tmp/vimtexissue/minimal.aux
  fls: /tmp/vimtexissue/minimal.fls
  main parser: current file verified
  compiler: latexmk
    backend: jobs
    output: /tmp/vULXQPT/2
    configuration:
      continuous: 1
      callback: 1
      latexmk options:
        -verbose
        -file-line-error
        -synctex=1
        -interaction=nonstopmode
      latexmk engine: -pdf
  viewer: Zathura
    xwin id: 0
    process:
      pid: -
      cmd: zathura -x "/usr/bin/vim.nox --servername  --remote-expr \"vimtex#view#reverse_goto(%{line}, '%{input}')\
  qf: LaTeX logfile
    config:
      packages:
        default: 1
      default: 1
  document class: minimal
~

In addition Zathura version:
 zathura --version
zathura 0.4.3
girara 0.3.2 (runtime: 0.3.2)
(plugin) pdf-poppler (0.2.9) (/usr/lib/x86_64-linux-gnu/zathura/libpdf-poppler.so)

This issue is related but different to #1117.

Duplicate issue #1747: Forward searching is not working.
Created: 2020-07-12T13:53:49Z
Hello:
I am trying to use neovim and zathura for LaTex editing.
After check all of the related references, I have made the backward searching working.
However, the forward searching never works. Actually it never response with \lv or :VimtexView.
I have xdotool installed.
The init.vim is set like this:
let g:tex_flavor='latex'    "Let Latex suite/Vimtex recognize .tex 
let g:vimtex_view_method = 'zathura'
let g:vimtex_latexmk_progname= '/usr/local/bin/nvr' " neovim-remote: for backward search
Result for :checkhealth:
health#coc#check
========================================================================
  - OK: Environment check passed

  - OK: Javascript entry lib/attach.js found
  - OK: Service started

health#vimtex#check
========================================================================
## vimtex
  - OK: Vim version should have full support!
  - OK: Zathura should work properly!
  - WARNING: pstree is not available
    - ADVICE:
      - vimtex#view#reverse_goto is better if pstree is available.
  - OK: Compiler should work!

health#nvim#check
========================================================================
## Configuration
  - OK: no issues found

## Performance
  - OK: Build type: Release

## Remote Plugins
  - OK: Up to date

## terminal
  - INFO: key_backspace (kbs) terminfo entry: key_backspace=^H
  - INFO: key_dc (kdch1) terminfo entry: key_dc=\E[3~
  - INFO: $TERM_PROGRAM='iTerm.app'
  - INFO: $COLORTERM='truecolor'

## tmux
  - OK: escape-time: 0ms
  - INFO: $TERM: xterm-256color
  - ERROR: $TERM should be "screen-256color" or "tmux-256color" in tmux. Colors might look wrong.
    - ADVICE:
      - Set default-terminal in ~/.tmux.conf:
          set-option -g default-terminal "screen-256color"
      - https://github.com/neovim/neovim/wiki/FAQ

health#provider#check
========================================================================
## Clipboard (optional)
  - OK: Clipboard tool found: pbcopy

## Python 2 provider (optional)
  - INFO: `g:python_host_prog` is not set.  Searching for python2 in the environment.
  - INFO: Multiple python2 executables found.  Set `g:python_host_prog` to avoid surprises.
  - INFO: Executable: /usr/local/Cellar/python@2/2.7.17_1/bin/python2
  - INFO: Other python executable: /usr/local/bin/python2
  - INFO: Other python executable: /usr/bin/python2
  - INFO: Python version: 2.7.17
  - INFO: pynvim version: 0.3.2 (outdated; from ~/Library/Python/2.7/lib/python/site-packages/neovim)
  - WARNING: Latest pynvim is NOT installed: 0.4.1

## Python 3 provider (optional)
  - INFO: `g:python3_host_prog` is not set.  Searching for python3 in the environment.
  - INFO: Multiple python3 executables found.  Set `g:python3_host_prog` to avoid surprises.
  - INFO: Executable: /usr/local/Cellar/python@3.8/3.8.3_2/bin/python3
  - INFO: Other python executable: /usr/local/bin/python3
  - INFO: Other python executable: /usr/bin/python3
  - INFO: Python version: 3.8.3
  - INFO: pynvim version: 0.4.1
  - OK: Latest pynvim is installed.

## Ruby provider (optional)
  - INFO: Ruby: ruby 2.6.3p62 (2019-04-16 revision 67580) [universal.x86_64-darwin19]
  - INFO: Host: /usr/local/bin/neovim-ruby-host
  - OK: Latest "neovim" gem is installed: 0.8.1

## Node.js provider (optional)
  - INFO: Node.js: v14.5.0
  - INFO: Neovim node.js host: /usr/local/lib/node_modules/neovim/bin/cli.js
  - WARNING: Package "neovim" is out-of-date. Installed: 4.5.0, latest: 4.9.0
    - ADVICE:
      - Run in shell: npm install -g neovim
      - Run in shell (if you use yarn): yarn global add neovim

Please help me.

Closing comment (2020-07-12T19:41:45Z): Thanks for the update. It seems xdotool is not working properly on your system. I think this is related to #1719, #1735, and #1737.
I'm not a macos user, and so I'm sorry to say I can't help so much. But if I'm right, then I think #1719 provides a solution. Can you read those issues and try the solution in #1719?