From 8dfd7f7dd531d76bc0a66639d5fda6658ed4a01d Mon Sep 17 00:00:00 2001 From: Jeff Lance Date: Tue, 15 Aug 2023 19:22:10 +0200 Subject: [PATCH] update vimtex shortcuts --- conf.d/lvim/ftplugin/tex.lua | 50 +++++++++++++++++++----------------- 1 file changed, 26 insertions(+), 24 deletions(-) diff --git a/conf.d/lvim/ftplugin/tex.lua b/conf.d/lvim/ftplugin/tex.lua index cbbaeba..169182f 100644 --- a/conf.d/lvim/ftplugin/tex.lua +++ b/conf.d/lvim/ftplugin/tex.lua @@ -18,42 +18,44 @@ end -- Shortcuts -- --- vim.g.maplocalleader = " " +-- old way making the LaTeX menu appears with the LSP and Lunar one +-- whk.register { +-- ["L"] = { +-- name = "LSP, Lunar, LaTeX", -- we edit the title of the L shortcut +-- } +-- } + +vim.g.maplocalleader = " " -- we define a leader available only from tex files whk.register { - ["L"] = { - name = "LSP, Lunar, LaTeX", -- we edit the title of the L shortcut - } + ["l"] = {} -- empties the default VimTeX menu mapping } whk.register { - ["Lx"] = { + [""] = { -- to set a completly new using only the localleader key name = "LaTeX", - c = { "VimtexCompileSS", "Single-shot compile project" }, - C = { "VimtexCompileSelected", "Compile Selected" }, - D = { "VimtexDocPackage", "Open Doc for package" }, - e = { "edit /home/jeff/.config/lvim/luasnippets/tex.lua", "Edit snippets" }, - E = { "VimtexErrors", "Look at the errors" }, - I = { "VimtexInfo", "Vimtex Info" }, - K = { - name = "Clean", - p = { "VimtexClean", "Clean Project" }, - c = { "VimtexClean", "Clean Cache" }, + c = { + name = "Compile", + b = { "VimtexCompileSS", "Single-shot compile project" }, + e = { "VimtexStop", "Stop compile" }, + s = { "VimtexCompileSelected", "Compile Selected" }, }, + d = { "VimtexDocPackage", "Open Doc for package" }, + e = { "VimtexErrors", "Look at the errors" }, m = { "VimtexToggleMain", "Toggle Main" }, - R = { - name = "Reload", - r = { "VimtexReload", "Reload" }, - s = { "VimtexReloadState", "Reload State" }, - }, - s = { "VimtexStop", "Stop compile" }, - S = { "VimtexStatus", "Look at the status" }, - T = { + o = { "VimtexView", "View pdf" }, + s = { "VimtexStatus", "Look at the status" }, + t = { name = "TOC", o = { "VimtexTocOpen", "Open TOC" }, t = { "VimtexTocToggle", "Toggle TOC" }, }, - v = { "VimtexView", "View pdf" }, + v = { + name = "VimTeX", + c = { "edit /home/jeff/.config/lvim/ftplugin/tex.lua", "Edit configuration" }, + s = { "edit /home/jeff/.config/lvim/luasnippets/tex.lua", "Edit snippets" }, + i = { "VimtexInfo", "Vimtex Info" }, + }, } }