diff --git a/dotfiles/neovim/lua/my/abbreviations/global.lua b/dotfiles/neovim/lua/my/abbreviations/global.lua index e67afda..2405591 100644 --- a/dotfiles/neovim/lua/my/abbreviations/global.lua +++ b/dotfiles/neovim/lua/my/abbreviations/global.lua @@ -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 diff --git a/dotfiles/neovim/lua/my/keymaps.lua b/dotfiles/neovim/lua/my/keymaps.lua index 92dceb0..3ee5b87 100644 --- a/dotfiles/neovim/lua/my/keymaps.lua +++ b/dotfiles/neovim/lua/my/keymaps.lua @@ -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" }, "", '', { desc = "Exit insert mode" }) -- Exit inset mode using *jk* + vim.keymap.set({ "i", "v" }, "", "", { desc = "Exit insert mode" }) -- Exit inset mode using *jk* vim.keymap.set({ "n", "v" }, "", '"+', { desc = "Use global clipboard" }) -- Use global clipboard with *cp* M.nmap("", ":silent write", "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", "", function() + vim.paste({ "", "" }, -1) + end, { desc = "Insert newline without continuing the current comment" }) + -- }}} return M end diff --git a/dotfiles/neovim/lua/my/plugins/firenvim.lua b/dotfiles/neovim/lua/my/plugins/firenvim.lua index a8d3cf8..d8d7405 100644 --- a/dotfiles/neovim/lua/my/plugins/firenvim.lua +++ b/dotfiles/neovim/lua/my/plugins/firenvim.lua @@ -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("", 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