mirror of
https://github.com/js0ny/dotfiles.git
synced 2025-12-21 08:43:00 +00:00
nvim: ft keymaps via ftplugin/
This commit is contained in:
parent
51e6343b9e
commit
32429308f3
22 changed files with 112 additions and 213 deletions
17
home/dot_config/nvim/ftplugin/tex.lua
Normal file
17
home/dot_config/nvim/ftplugin/tex.lua
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
local bufmap = {
|
||||
{ mode = "x", keys = "i", cmd = 'c\\textit{<C-r>"}', opt = { desc = "Add italic to selected text" } },
|
||||
{ mode = "x", keys = "b", cmd = 'c\\textbf{<C-r>"}', opt = { desc = "Add bold to selected text" } },
|
||||
{
|
||||
mode = "x",
|
||||
keys = "c",
|
||||
cmd = 'c\\begin{verbatim}<CR><C-r>"<CR>\\end{verbatim}',
|
||||
opt = { desc = "Add code block to selected text" },
|
||||
},
|
||||
{ mode = "x", keys = "d", cmd = 'c\\sout{<C-r>"}', opt = { desc = "Add strikethrough to selected text" } },
|
||||
{ mode = "x", keys = "h", cmd = 'c\\hl{<C-r>"}', opt = { desc = "Add highlight to selected text" } },
|
||||
{ mode = "n", keys = "<leader>cc", cmd = "<cmd>w<CR>", opt = { desc = "Save and compile tex file" } },
|
||||
}
|
||||
|
||||
local set_buf_keymaps = require("keymaps.utils").set_buf_keymaps
|
||||
|
||||
set_buf_keymaps(bufmap)
|
||||
Loading…
Add table
Add a link
Reference in a new issue