chore(nvim): ignore vim as a global variable

This commit is contained in:
Stefan Imhoff
2023-07-02 11:52:34 +02:00
parent 268af858af
commit 0245cc5f94
2 changed files with 2 additions and 1 deletions

View File

@@ -1,7 +1,6 @@
-- Autocmds are automatically loaded on the VeryLazy event
-- Default autocmds that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/autocmds.lua
-- Add any additional autocmds here
vim.api.nvim_create_autocmd("BufWritePost", {
pattern = { "*tmux.conf" },
command = "execute 'silent !tmux source <afile> --silent'",

View File

@@ -1,6 +1,8 @@
-- Keymaps are automatically loaded on the VeryLazy event
-- Default keymaps that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/keymaps.lua
-- Add any additional keymaps here
rawset(_G, "vim", vim or {})
vim.keymap.set("n", "<leader>j", ":b#<CR>", { desc = "Toggle between buffers", noremap = true, silent = true })
vim.keymap.set("n", ";;", "A;<ESC>", { desc = "Add semicolon to the end of the line", noremap = true, silent = true })
vim.keymap.set("n", ",,", "A,<ESC>", { desc = "Add comma to the end of the line", noremap = true, silent = true })