This commit is contained in:
Jeff Lance 2024-02-24 14:09:07 +01:00
parent a8a72683cc
commit a9c821a567
3 changed files with 41 additions and 40 deletions

View File

@ -10,36 +10,38 @@ Last Modified By : Jeff Lance <email@jefflance.me>
-- Set autocommands
--
-- Some examples of autocommands definition through lvim api.
--
local M = {}
-- local M = {}
M.setup = function()
lvim.autocommands = {
-- for any files
{
-- { "VimEnter" },
-- {
-- pattern = { "*" },
-- command = "FloatermNew --width=0.8 --name=terminal --cwd=<buffer>",
-- }
},
-- arduino files
{
{ "BufNewFile", "BufRead" },
{
pattern = { "*.ino", ".pde" },
command = "set filetype=arduino",
}
},
-- asymptote filetype
{
{ "BufNewFile", "BufRead" },
{
pattern = { "*.asy" },
command = "set filetype=asy",
}
},
}
end
-- M.setup = function()
-- lvim.autocommands = {
-- -- for any files
-- {
-- { "VimEnter" },
-- {
-- pattern = { "*" },
-- command = "FloatermNew --width=0.8 --name=terminal --cwd=<buffer>",
-- }
-- },
-- -- arduino files
-- {
-- { "BufNewFile", "BufRead" },
-- {
-- pattern = { "*.ino", ".pde" },
-- command = "set filetype=arduino",
-- }
-- },
-- -- asymptote filetype
-- {
-- { "BufNewFile", "BufRead" },
-- {
-- pattern = { "*.asy" },
-- command = "set filetype=asy",
-- }
-- },
-- }
-- end
return M
-- return M

View File

@ -12,11 +12,11 @@ local M = {}
M.setup = function()
-- ============
-- key mappings
-- key mappings examples using nvim or lvim api.
--
-- vim-surround shortcuts as example
-- vim.api.nvim_set_keymap("n", "sw", "<Plug>Ysurroundiw", { noremap = true, silent = true })
-- vim.api.nvim_set_keymap("n", "Sw", "<Plug>YSurroundiw", { noremap = true, silent = true })
-- lvim.keys.normal_mode["<C-t>"] = ":FloatermToggle terminal<CR>"
--
lvim.leader = ";"
@ -28,7 +28,6 @@ M.setup = function()
lvim.keys.normal_mode["<C-r>"] = "<CMD>redo<CR>"
lvim.keys.normal_mode["<C-[>"] = ":<<CR>"
lvim.keys.normal_mode["<C-]>"] = ":><CR>"
-- lvim.keys.normal_mode["<C-t>"] = ":FloatermToggle terminal<CR>"
end

View File

@ -89,15 +89,15 @@ Last Modified By : Jeff Lance <email@jefflance.me>
-- local rows = tonumber(snip.captures[2])
-- local cols = tonumber(snip.captures[3])
-- local nodes = {}
-- local ins_indx = 1
-- for j = 1, rows do
-- local ins_indx = 1
-- for j = 1, rows do
-- table.insert(nodes, r(ins_indx, tostring(j) .. "x1", i(1)))
-- ins_indx = ins_indx + 1
-- for k = 2, cols do
-- ins_indx = ins_indx + 1
-- for k = 2, cols do
-- table.insert(nodes, t(" & "))
-- table.insert(nodes, r(ins_indx, tostring(j) .. "x" .. tostring(k), i(1)))
-- ins_indx = ins_indx + 1
-- end
-- table.insert(nodes, r(ins_indx, tostring(j) .. "x" .. tostring(k), i(1)))
-- ins_indx = ins_indx + 1
-- end
-- table.insert(nodes, t({ " \\\\", "" }))
-- end
-- -- fix last node.