New abbreviation, keybind, and some firenvim tweaks
This commit is contained in:
parent
95cddbc510
commit
a1b3cf01ee
|
@ -6,6 +6,7 @@ M.symols = {
|
||||||
-- Unicode:
|
-- Unicode:
|
||||||
{ "iin", "∈" }, -- [I]ncluded [i][n]
|
{ "iin", "∈" }, -- [I]ncluded [i][n]
|
||||||
{ "mfrl", "∀" }, -- [M]ath [f]o[r]al[l]
|
{ "mfrl", "∀" }, -- [M]ath [f]o[r]al[l]
|
||||||
|
{ "eps", "ε" }, -- Epsilon
|
||||||
|
|
||||||
-- Ascii stuff:
|
-- Ascii stuff:
|
||||||
{ "tto", "->" }, -- [t]o
|
{ "tto", "->" }, -- [t]o
|
||||||
|
|
|
@ -79,7 +79,7 @@ function M.setup()
|
||||||
-- {{{ Chords (save, clipboard)
|
-- {{{ Chords (save, clipboard)
|
||||||
-- Different chords get mapped to f keys by a custom script of mine.
|
-- Different chords get mapped to f keys by a custom script of mine.
|
||||||
-- In the future, I might get this on my keyboard firmware.
|
-- 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*
|
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*
|
M.nmap("<f12>", ":silent write<cr>", "Save current file") -- Save using *ji*
|
||||||
-- }}}
|
-- }}}
|
||||||
|
@ -96,6 +96,12 @@ function M.setup()
|
||||||
end,
|
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
|
return M
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
local env = require("my.helpers.env")
|
local env = require("my.helpers.env")
|
||||||
|
local K = require("my.keymaps")
|
||||||
|
|
||||||
local M = {
|
local M = {
|
||||||
"glacambre/firenvim", -- vim inside chrome
|
"glacambre/firenvim", -- vim inside chrome
|
||||||
|
@ -10,11 +11,22 @@ function M.config()
|
||||||
vim.g.firenvim_config = {
|
vim.g.firenvim_config = {
|
||||||
localSettings = {
|
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
|
-- Disable status line
|
||||||
vim.opt.laststatus = 0
|
vim.opt.laststatus = 0
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue