mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-06-26 02:41:54 +00:00
Merge branch 'setuservar-autocmd' of https://github.com/phanen/kitty
This commit is contained in:
commit
9e94ff28f6
1 changed files with 11 additions and 3 deletions
|
|
@ -210,17 +210,25 @@ In order to make this work, you need to configure your editor as show below:
|
|||
|
||||
.. code-block:: lua
|
||||
|
||||
vim.api.nvim_create_autocmd({ "VimEnter", "VimResume" }, {
|
||||
vim.api.nvim_create_autocmd({ "VimEnter", "VimResume", "UIEnter" }, {
|
||||
group = vim.api.nvim_create_augroup("KittySetVarVimEnter", { clear = true }),
|
||||
callback = function()
|
||||
io.stdout:write("\x1b]1337;SetUserVar=in_editor=MQo\007")
|
||||
if vim.api.nvim_ui_send then
|
||||
vim.api.nvim_ui_send("\x1b]1337;SetUserVar=in_editor=MQo\007")
|
||||
else
|
||||
io.stdout:write("\x1b]1337;SetUserVar=in_editor=MQo\007")
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd({ "VimLeave", "VimSuspend" }, {
|
||||
group = vim.api.nvim_create_augroup("KittyUnsetVarVimLeave", { clear = true }),
|
||||
callback = function()
|
||||
io.stdout:write("\x1b]1337;SetUserVar=in_editor\007")
|
||||
if vim.api.nvim_ui_send then
|
||||
vim.api.nvim_ui_send("\x1b]1337;SetUserVar=in_editor=MQo\007")
|
||||
else
|
||||
io.stdout:write("\x1b]1337;SetUserVar=in_editor\007")
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue