1
Fork 0

New abbreviation, keybind, and some firenvim tweaks

This commit is contained in:
Matei Adriel 2023-02-24 14:35:01 +01:00
parent 95cddbc510
commit a1b3cf01ee
No known key found for this signature in database
3 changed files with 21 additions and 2 deletions

View file

@ -6,6 +6,7 @@ M.symols = {
-- Unicode:
{ "iin", "" }, -- [I]ncluded [i][n]
{ "mfrl", "" }, -- [M]ath [f]o[r]al[l]
{ "eps", "ε" }, -- Epsilon
-- Ascii stuff:
{ "tto", "->" }, -- [t]o

View file

@ -79,7 +79,7 @@ function M.setup()
-- {{{ Chords (save, clipboard)
-- Different chords get mapped to f keys by a custom script of mine.
-- In the future, I might get this on my keyboard firmware.
vim.keymap.set({ "i", "v" }, "<f10>", '<Esc>', { desc = "Exit insert mode" }) -- Exit inset mode using *jk*
vim.keymap.set({ "i", "v" }, "<f10>", "<Esc>", { desc = "Exit insert mode" }) -- Exit inset mode using *jk*
vim.keymap.set({ "n", "v" }, "<f11>", '"+', { desc = "Use global clipboard" }) -- Use global clipboard with *cp*
M.nmap("<f12>", ":silent write<cr>", "Save current file") -- Save using *ji*
-- }}}
@ -96,6 +96,12 @@ function M.setup()
end,
})
-- }}}
-- {{{ Shift-Enter for not continuing the current comment
-- This does not preserve intendation. Not sure what a better solution would look like.
vim.keymap.set("i", "<S-CR>", function()
vim.paste({ "", "" }, -1)
end, { desc = "Insert newline without continuing the current comment" })
-- }}}
return M
end

View file

@ -1,4 +1,5 @@
local env = require("my.helpers.env")
local K = require("my.keymaps")
local M = {
"glacambre/firenvim", -- vim inside chrome
@ -10,11 +11,22 @@ function M.config()
vim.g.firenvim_config = {
localSettings = {
[".*"] = {
filename = "/tmp/firenvim_{hostname}_{pathname%10}_{timestamp%32}.{extension}",
filename = "/tmp/firenvim_{hostname}_{pathname}_{selector}_{timestamp}.{extension}",
},
},
}
K.nmap("<C-e>", function()
vim.opt.lines = 100
end, "Expand the neovim window!")
vim.api.nvim_create_autocmd("BufEnter", {
pattern = { "firenvim_localhost_notebooks*.txt" },
callback = function()
vim.opt.filetype = "markdown"
end,
})
-- Disable status line
vim.opt.laststatus = 0
end