27 lines
1.1 KiB
Lua
27 lines
1.1 KiB
Lua
-- Highlight whatever is being yanked
|
|
vim.api.nvim_create_autocmd({ "TextYankPost" }, {
|
|
command = 'silent! lua require"vim.highlight".on_yank{timeout=500}',
|
|
desc = "Highlight yanked text whenevery yanking something",
|
|
group = vim.api.nvim_create_augroup("highlightyanks", { clear = true }),
|
|
})
|
|
|
|
-- Special setting for editing gopass files - make sure nothing leaks outside the directories it is supposed to
|
|
vim.api.nvim_create_autocmd({ "BufNewFile", "BufRead" }, {
|
|
pattern = {
|
|
"/dev/shm/gopass.*",
|
|
"/dev/shm/pass.?*/?*.txt",
|
|
"$TMPDIR/pass.?*/?*.txt",
|
|
"/tmp/pass.?*/?*.txt",
|
|
},
|
|
command = "setlocal noswapfile nobackup noundofile nowritebackup viminfo=",
|
|
desc = "Don't leak any information when editing potential password files",
|
|
group = vim.api.nvim_create_augroup("passnoleak", { clear = true }),
|
|
})
|
|
|
|
-- remove line numbers from terminal buffers
|
|
vim.api.nvim_create_autocmd({ "TermOpen" }, {
|
|
desc = "Hide buffer numbers for terminals",
|
|
pattern = "*",
|
|
command = "setlocal nonumber norelativenumber",
|
|
})
|