mappings: Add back mappings removed in 0844431d37
| Format files
This commit is contained in:
parent
37b2c53a46
commit
b9f0e4623e
|
@ -7,6 +7,16 @@ end
|
|||
local M = {}
|
||||
|
||||
M.general = {
|
||||
[""] = {
|
||||
-- Allow moving the cursor through wrapped lines with j, k, <Up> and <Down>
|
||||
-- http<cmd> ://www.reddit.com/r/vim/comments/2k4cbr/problem_with_gj_and_gk/
|
||||
-- empty mode is same as using <cmd> :map
|
||||
-- also don't use g[j|k] when in operator pending mode, so it doesn't alter d, y or c behaviour
|
||||
["j"] = { 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', opts = { expr = true } },
|
||||
["k"] = { 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', opts = { expr = true } },
|
||||
["<Up>"] = { 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', opts = { expr = true } },
|
||||
["<Down>"] = { 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', opts = { expr = true } },
|
||||
},
|
||||
|
||||
i = {
|
||||
|
||||
|
@ -56,6 +66,12 @@ M.general = {
|
|||
t = {
|
||||
["<C-x>"] = { termcodes "<C-\\><C-N>", " escape terminal mode" },
|
||||
},
|
||||
|
||||
v = {
|
||||
-- Don't copy the replaced text after pasting in visual mode
|
||||
-- https://vim.fandom.com/wiki/Replace_a_word_with_yanked_text#Alternative_mapping_for_paste
|
||||
["p"] = { 'p:let @+=@0<CR>:let @"=@0<CR>', opts = { silent = true } },
|
||||
},
|
||||
}
|
||||
|
||||
M.tabufline = {
|
||||
|
|
|
@ -112,7 +112,7 @@ M.luasnip = function()
|
|||
options = load_override(options, "L3MON4D3/LuaSnip")
|
||||
luasnip.config.set_config(options)
|
||||
require("luasnip.loaders.from_vscode").lazy_load()
|
||||
require("luasnip.loaders.from_vscode").lazy_load({ paths = vim.g.luasnippets_path or "" })
|
||||
require("luasnip.loaders.from_vscode").lazy_load { paths = vim.g.luasnippets_path or "" }
|
||||
|
||||
vim.api.nvim_create_autocmd("InsertLeave", {
|
||||
callback = function()
|
||||
|
|
Loading…
Reference in New Issue