vim.cmd([[setlocal shiftwidth=2 tabstop=2]]) vim.fn.call("vimtex#imaps#add_map", { { lhs = "++", rhs = "\\item ", leader = "", wrapper = "vimtex#imaps#wrap_environment", context = { "itemize", "enumerate", "description" }, }, }) vim.fn.call("vimtex#imaps#add_map", { { lhs = "e", rhs = "\\eps", wrapper = "vimtex#imaps#wrap_math", }, }) vim.b.surround_101 = "\\begin{\1environment: \1}\r\\end{\1\1}" -- surround with e (environment) vim.b.surround_99 = "\\\1command: \1{\r}" -- surround with c (command) vim.keymap.set("v", "", function() local key = vim.api.nvim_replace_termcodes("Scemph", true, false, true) vim.api.nvim_feedkeys(key, "v", false) end, { desc = "Latex: Emphasize text" }) vim.keymap.set("v", "", function() local key = vim.api.nvim_replace_termcodes("Sctextbf", true, false, true) vim.api.nvim_feedkeys(key, "v", false) end, { desc = "Latex: Make text bold" })