mappings: Add back mappings removed in 0844431d37
| Format files
This commit is contained in:
parent
37b2c53a46
commit
b9f0e4623e
4 changed files with 21 additions and 5 deletions
|
@ -7,6 +7,16 @@ end
|
||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
M.general = {
|
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 = {
|
i = {
|
||||||
|
|
||||||
|
@ -56,6 +66,12 @@ M.general = {
|
||||||
t = {
|
t = {
|
||||||
["<C-x>"] = { termcodes "<C-\\><C-N>", " escape terminal mode" },
|
["<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 = {
|
M.tabufline = {
|
||||||
|
|
|
@ -152,9 +152,9 @@ M.packer_sync = function(...)
|
||||||
{ "PackerSync" },
|
{ "PackerSync" },
|
||||||
{
|
{
|
||||||
" on a NvChadSnapshot. This will cause issues if NvChad dependencies contain "
|
" on a NvChadSnapshot. This will cause issues if NvChad dependencies contain "
|
||||||
.. "any breaking changes! Plugin updates will not be included in this "
|
.. "any breaking changes! Plugin updates will not be included in this "
|
||||||
.. "snapshot, so they will be lost after switching between snapshots! Would "
|
.. "snapshot, so they will be lost after switching between snapshots! Would "
|
||||||
.. "you still like to continue? [y/N]\n",
|
.. "you still like to continue? [y/N]\n",
|
||||||
"WarningMsg",
|
"WarningMsg",
|
||||||
},
|
},
|
||||||
}, false, {})
|
}, false, {})
|
||||||
|
|
|
@ -34,7 +34,7 @@ local options = {
|
||||||
},
|
},
|
||||||
filesystem_watchers = {
|
filesystem_watchers = {
|
||||||
enable = true,
|
enable = true,
|
||||||
},
|
},
|
||||||
actions = {
|
actions = {
|
||||||
open_file = {
|
open_file = {
|
||||||
resize_window = true,
|
resize_window = true,
|
||||||
|
|
|
@ -112,7 +112,7 @@ M.luasnip = function()
|
||||||
options = load_override(options, "L3MON4D3/LuaSnip")
|
options = load_override(options, "L3MON4D3/LuaSnip")
|
||||||
luasnip.config.set_config(options)
|
luasnip.config.set_config(options)
|
||||||
require("luasnip.loaders.from_vscode").lazy_load()
|
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", {
|
vim.api.nvim_create_autocmd("InsertLeave", {
|
||||||
callback = function()
|
callback = function()
|
||||||
|
|
Loading…
Reference in a new issue