add notification to toggling venn mode
This commit is contained in:
@ -145,6 +145,7 @@ function _G.Toggle_venn()
|
|||||||
local mapb = vim.api.nvim_buf_set_keymap
|
local mapb = vim.api.nvim_buf_set_keymap
|
||||||
local venn_enabled = vim.inspect(vim.b.venn_enabled)
|
local venn_enabled = vim.inspect(vim.b.venn_enabled)
|
||||||
if venn_enabled == "nil" then
|
if venn_enabled == "nil" then
|
||||||
|
vim.notify("Enabled venn mode", vim.log.levels.LOW, { title = misc.appid })
|
||||||
vim.b.venn_enabled = true
|
vim.b.venn_enabled = true
|
||||||
vim.cmd([[setlocal ve=all]])
|
vim.cmd([[setlocal ve=all]])
|
||||||
-- draw a line on HJKL keystokes
|
-- draw a line on HJKL keystokes
|
||||||
@ -155,6 +156,7 @@ function _G.Toggle_venn()
|
|||||||
-- draw a box by pressing "f" with visual selection
|
-- draw a box by pressing "f" with visual selection
|
||||||
mapb(0, "v", "f", ":VBox<CR>", { noremap = true })
|
mapb(0, "v", "f", ":VBox<CR>", { noremap = true })
|
||||||
else
|
else
|
||||||
|
vim.notify("Disabled venn mode", vim.log.levels.LOW, { title = misc.appid })
|
||||||
vim.cmd[[setlocal ve=]]
|
vim.cmd[[setlocal ve=]]
|
||||||
vim.cmd[[mapclear <buffer>]]
|
vim.cmd[[mapclear <buffer>]]
|
||||||
vim.b.venn_enabled = nil
|
vim.b.venn_enabled = nil
|
||||||
|
Reference in New Issue
Block a user