Sanchayan Maity
ef1ed4b7d1
We specify an underline cursor shape in terminal settings. This actually
fixes 5c6eebf
where we just copied the settings from the referenced
issue but did not actually fix it.
53 lines
1 KiB
Lua
53 lines
1 KiB
Lua
vim.api.nvim_create_augroup("custom_group", {clear = true})
|
|
|
|
local aucmd_dict = {
|
|
TermOpen = {
|
|
{
|
|
group = "custom_group",
|
|
pattern = "*",
|
|
command = "startinsert"
|
|
},
|
|
{
|
|
group = "custom_group",
|
|
pattern = "*",
|
|
command = "setlocal listchars= nonumber norelativenumber"
|
|
},
|
|
},
|
|
VimResized = {
|
|
{
|
|
group = "custom_group",
|
|
pattern = "*",
|
|
command = ":wincmd ="
|
|
}
|
|
},
|
|
InsertEnter = {
|
|
{
|
|
group = "custom_group",
|
|
pattern = "*",
|
|
command = "setlocal nohlsearch"
|
|
}
|
|
},
|
|
TextYankPost = {
|
|
{
|
|
group = "custom_group",
|
|
pattern = "*",
|
|
callback = function ()
|
|
require("vim.highlight").on_yank({timeout = 1000})
|
|
end,
|
|
}
|
|
},
|
|
VimLeave = {
|
|
{
|
|
group = "custom_group",
|
|
pattern = "*",
|
|
command = "set guicursor=a:hor1-blinkon0"
|
|
}
|
|
}
|
|
}
|
|
|
|
for event, opt_tbls in pairs(aucmd_dict) do
|
|
for _, opt_tbl in pairs(opt_tbls) do
|
|
vim.api.nvim_create_autocmd(event, opt_tbl)
|
|
end
|
|
end
|