test
This commit is contained in:
+17
-2
@@ -1,4 +1,6 @@
|
|||||||
vim.api.nvim_create_autocmd({'BufEnter', 'QuitPre'}, {
|
local autocmd = vim.api.nvim_create_autocmd
|
||||||
|
|
||||||
|
autocmd({'BufEnter', 'QuitPre'}, {
|
||||||
nested = false,
|
nested = false,
|
||||||
callback = function(e)
|
callback = function(e)
|
||||||
local tree = require('nvim-tree.api').tree
|
local tree = require('nvim-tree.api').tree
|
||||||
@@ -8,7 +10,6 @@ vim.api.nvim_create_autocmd({'BufEnter', 'QuitPre'}, {
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
-- How many focusable windows do we have? (excluding e.g. incline status window)
|
|
||||||
local winCount = 0
|
local winCount = 0
|
||||||
for _,winId in ipairs(vim.api.nvim_list_wins()) do
|
for _,winId in ipairs(vim.api.nvim_list_wins()) do
|
||||||
if vim.api.nvim_win_get_config(winId).focusable then
|
if vim.api.nvim_win_get_config(winId).focusable then
|
||||||
@@ -34,3 +35,17 @@ vim.api.nvim_create_autocmd({'BufEnter', 'QuitPre'}, {
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
|
autocmd("VimEnter", {
|
||||||
|
callback = function()
|
||||||
|
--NVIM_ENTER=1
|
||||||
|
vim.cmd([[call chansend(v:stderr, "\033]1337;SetUserVar=NVIM_ENTER=MQ==\007")]])
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
autocmd("VimLeavePre", {
|
||||||
|
callback = function()
|
||||||
|
--NVIM_ENTER=0
|
||||||
|
vim.cmd([[call chansend(v:stderr, "\033]1337;SetUserVar=NVIM_ENTER=MA==\007")]])
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|||||||
@@ -25,10 +25,10 @@ vim.keymap.set("n", "<C-e>", function() toggle_telescope(harpoon:list()) end,
|
|||||||
vim.keymap.set("n", "<leader>a", function() harpoon:list():add() end)
|
vim.keymap.set("n", "<leader>a", function() harpoon:list():add() end)
|
||||||
vim.keymap.set("n", "<C-e>", function() harpoon.ui:toggle_quick_menu(harpoon:list()) end)
|
vim.keymap.set("n", "<C-e>", function() harpoon.ui:toggle_quick_menu(harpoon:list()) end)
|
||||||
|
|
||||||
vim.keymap.set("n", "<C-h>", function() harpoon:list():select(1) end)
|
vim.keymap.set("n", "<C-1>", function() harpoon:list():select(1) end)
|
||||||
vim.keymap.set("n", "<C-t>", function() harpoon:list():select(2) end)
|
vim.keymap.set("n", "<C-2>", function() harpoon:list():select(2) end)
|
||||||
vim.keymap.set("n", "<C-n>", function() harpoon:list():select(3) end)
|
vim.keymap.set("n", "<C-3>", function() harpoon:list():select(3) end)
|
||||||
vim.keymap.set("n", "<C-s>", function() harpoon:list():select(4) end)
|
vim.keymap.set("n", "<C-4>", function() harpoon:list():select(4) end)
|
||||||
|
|
||||||
vim.keymap.set("n", "<C-S-P>", function() harpoon:list():prev() end)
|
vim.keymap.set("n", "<C-S-P>", function() harpoon:list():prev() end)
|
||||||
vim.keymap.set("n", "<C-S-N>", function() harpoon:list():next() end)
|
vim.keymap.set("n", "<C-S-N>", function() harpoon:list():next() end)
|
||||||
|
|||||||
Reference in New Issue
Block a user