tex.lua (882B)
1 -- latex ftplugin 2 3 -- Set the text width to 79 characters 4 vim.bo.textwidth = 79 5 6 -- Enable spell checking 7 vim.wo.spell = true 8 9 -- Bind <leader>+c to ci{ the last {} on the current line 10 -- e.g. <leader>+c would make \command{ahesifuhisg} \command{} with insert 11 vim.api.nvim_set_keymap('n', '<leader>c', '$bci{', 12 { noremap = true, silent = true }) 13 14 -- Bind <leader>+d to duplicate the current line down 15 vim.api.nvim_set_keymap('n', '<leader>d', 'yyp', 16 { noremap = true, silent = true }) 17 18 --vim.api.nvim_eval("TexNewMathZone('E','align',1)") 19 --vim.api.nvim_eval("TexNewMathZone('E','multline',1)") 20 21 -- Vimtex stuff 22 vim.g.vimtex_format_enabled = 1 23 vim.g.vimtex_syntax_nospell_comments = 1 24 25 -- Get rid of calendar bindings so that <leader>c is usable 26 vim.api.nvim_del_keymap("n", "<leader>cal") 27 vim.api.nvim_del_keymap("n", "<leader>caL")