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
{
-- 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
-- },
-- -- 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