I have a kitty tab with 2 windows: On top Neovim with my code, below a terminal window which runs a server.
What I want to achieve is: In the bottom window hit CTRL + G and select a path:line entry which is being logged. The selected file should be opened in the upper window.
Is this possible, if yes - how?
Bases on the docs
map ctrl+g kitten hints --type=linenum --linenum-action=tab nvim +{line} {path}
, I tried out many things, for example:
map ctrl+g kitten hints --type=linenum --linenum-action=self --program "kitten @ send-text --match neighbor:top 'nvim +{line} {path}\n'"
map ctrl+g kitten hints --type=linenum --linenum-action=self --program "kitten @ send-text --match neighbor:top \"\\e:e +{line} {path}\\r\""
In both cases, what happens is, that the file is being opened on the correct line but in the wrong (bottom) window.
I also tried different matching methods to make sure that I address the correct window. Without mapping I was able to send keys to the upper window and open a file programmatically.
pasting text
kitten @ send-text --match neighbor:top 'this text gets pasted above'
opening a file
kitty @ send-text --match neighbor:top '\e:e /Users/xxx/projects/xxx/server/config/xxx.ts\r11G'
Thank you in advance!
I have a kitty tab with 2 windows: On top Neovim with my code, below a terminal window which runs a server.
What I want to achieve is: In the bottom window hit CTRL + G and select a path:line entry which is being logged. The selected file should be opened in the upper window.
Is this possible, if yes - how?
Bases on the docs
map ctrl+g kitten hints --type=linenum --linenum-action=tab nvim +{line} {path}, I tried out many things, for example:
map ctrl+g kitten hints --type=linenum --linenum-action=self --program "kitten @ send-text --match neighbor:top 'nvim +{line} {path}\n'"map ctrl+g kitten hints --type=linenum --linenum-action=self --program "kitten @ send-text --match neighbor:top \"\\e:e +{line} {path}\\r\""In both cases, what happens is, that the file is being opened on the correct line but in the wrong (bottom) window.
I also tried different matching methods to make sure that I address the correct window. Without mapping I was able to send keys to the upper window and open a file programmatically.
pasting text
kitten @ send-text --match neighbor:top 'this text gets pasted above'opening a file
kitty @ send-text --match neighbor:top '\e:e /Users/xxx/projects/xxx/server/config/xxx.ts\r11G'Thank you in advance!