letieu / wezterm-move.nvim

Directional navigation of Neovim + Wezterm
15 stars 2 forks source link

window11 wezterm+zsh+nvim, open a lua file,then :vsplit, <C-h> not working, but cmdline :lua require("wezterm-move").move "h" works #1

Open hantianxiaoxue opened 1 month ago

hantianxiaoxue commented 1 month ago

window11 wezterm+zsh+nvim, open a lua file,then :vsplit, press C-h not working, but cmdline :lua require("wezterm-move").move "h" works


NVIM v0.10.0 Build type: Release LuaJIT 2.1.1713484068

wezterm 20240203-110809-5046fc22

zsh 5.9 (x86_64-pc-msys)


my config:

{
    "letieu/wezterm-move.nvim",
    keys = { -- Lazy loading, don't need call setup() function
      {
        "<A-h>",
        function()
          require("wezterm-move").move "h"
        end,
      },
      {
        "<A-j>",
        function()
          require("wezterm-move").move "j"
        end,
      },
      {
        "<A-k>",
        function()
          require("wezterm-move").move "k"
        end,
      },
      {
        "<A-l>",
        function()
          require("wezterm-move").move "l"
        end,
      },
    },
  }
letieu commented 1 month ago

I think due to you use <A-l> . May be you should try <C-l> or <M-l> instead

hantianxiaoxue commented 1 month ago

thanks

hantianxiaoxue commented 1 month ago

reason: is_vim function logic incorrect,In windows nvim open lua file process_name is lua-langue-server

resolution:

.wezterm.lua : local function is_vim(pane) return pane:get_title():sub(-4) == "NVIM" end

nvim init.lua: vim.opt.titlestring = '%{expand("%:t")} NVIM'

letieu commented 4 days ago

I don't have window laptop :dancing_women: