vimtex icon indicating copy to clipboard operation
vimtex copied to clipboard

`vimtex.viewer.xdo_focus_vim` not working in WSL2

Open kkanden opened this issue 10 months ago • 1 comments

Description

i am running WSL2 with tmux and I tried setting up autofocus of the terminal window after invoking a reverse search with sioyek as in #2971, however this doesn't work. the reverse search itself works. the sioyek app is installed in windows and gets invoked from within WSL.

i do realize that WSL often adds a lot of layers of complexity to issues as this but i'm wondering if there's a simple solution to this?

Steps to reproduce

NA

Expected behavior

the terminal window should be focused on reverse search.

Actual behavior

the terminal is not being focused on reverse search.

Do you use a latexmkrc file?

yes

VimtexInfo

System info:
  OS: Linux 5.15.167.4-microsoft-standard-WSL2
  LaTeX version: pdfTeX 3.141592653-2.6-1.40.26 (TeX Live 2024/nixos.org)
  Vim version: NVIM v0.11.1
  Has clientserver: true
  Servername: /run/user/1000//nvim.14924.0
  $PATH:
    - /bin
    - /home/oliwia/.cargo/bin
    - /home/oliwia/.local/share/nvim/mason/bin
    - /home/oliwia/.nix-profile/bin
    - /home/oliwia/scripts
    - /nix/var/nix/profiles/default/bin
    - /sbin
    - /usr/bin
    - /usr/games
    - /usr/lib/wsl/lib
    - /usr/local/bin
    - /usr/local/games
    - /usr/local/sbin
    - /usr/local/texlive/2025/bin/x86_64-linux
    - /usr/sbin

VimTeX project: lista4
  base: lista4.tex
  root: /home/oliwia/school/statlearning/4list
  tex: /home/oliwia/school/statlearning/4list/lista4.tex
  main parser: current file verified
  document class: article
  packages: amsbsy amsfonts amsgen amsmath amsopn amssymb amstext babel calc caption caption3 catchfile csquotes enumitem epstopdf-base etexcmds etoolbox expl3 fancyvrb float fontenc fontspec fontspec-luatex fvextra geometry graphics graphicx iftex ifvtex infwarerr keyval kvoptions kvsetkeys latex2pydata lineno ltxcmds mathtools mhsetup minted pdftexcmds pgfkeys pgfopts shellesc textcomp trig upquote xcolor xparse
  compiler: latexmk
    engine: -lualatex
    options:
      -verbose
      -file-line-error
      -synctex=1
      -interaction=nonstopmode
    aux_dir: ./aux/
    callback: 1
    continuous: 1
    executable: latexmk
  viewer: sioyek
  qf method: LaTeX logfile

kkanden avatar May 31 '25 20:05 kkanden

i am running WSL2 with tmux and I tried setting up autofocus of the terminal window after invoking a reverse search with sioyek as in #2971, however this doesn't work.

I'm sorry, but I really don't think you will be able to make this work on Windows with WSL2. At least I sure don't know how; sorry!

lervag avatar Jun 01 '25 13:06 lervag