mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-08 22:28:24 +02:00
Merge branch 'setuservar-autocmd' of https://github.com/phanen/kitty
This commit is contained in:
@@ -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,
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user