Merge pull request #186 from Akianonymus/main
Use jdhao/better-escape.vim | Allow moving the cursor through wrapped lines normally
This commit is contained in:
commit
22ea576682
|
@ -18,14 +18,17 @@ map("v", "x", [=[ "_x ]=], opt)
|
|||
this line too ]]
|
||||
--
|
||||
|
||||
-- escape with 'jk' mapping
|
||||
vim.api.nvim_set_keymap("i", "jk", "<esc>", {})
|
||||
vim.api.nvim_set_keymap("v", "jk", "<esc>", {})
|
||||
vim.api.nvim_set_keymap("t", "jk", "<esc>", {})
|
||||
|
||||
-- Don't copy the replaced text after pasting in visual mode
|
||||
map("v", "p", '"_dP', opt)
|
||||
|
||||
-- Allow moving the cursor through wrapped lines with j, k, <Up> and <Down>
|
||||
-- http://www.reddit.com/r/vim/comments/2k4cbr/problem_with_gj_and_gk/
|
||||
-- empty mode is same as using :map
|
||||
map("", "j", 'v:count ? "j" : "gj"', {expr = true})
|
||||
map("", "k", 'v:count ? "k" : "gk"', {expr = true})
|
||||
map("", "<Down>", 'v:count ? "j" : "gj"', {expr = true})
|
||||
map("", "<Up>", 'v:count ? "k" : "gk"', {expr = true})
|
||||
|
||||
-- OPEN TERMINALS --
|
||||
map("n", "<C-l>", ":vnew +terminal | setlocal nobuflisted <CR>", opt) -- term over right
|
||||
map("n", "<C-x>", ":10new +terminal | setlocal nobuflisted <CR>", opt) -- term bottom
|
||||
|
|
|
@ -16,6 +16,14 @@ return packer.startup(
|
|||
event = "VimEnter"
|
||||
}
|
||||
|
||||
use {
|
||||
"jdhao/better-escape.vim",
|
||||
event = "InsertEnter",
|
||||
config = function()
|
||||
require "plugins.others".escape()
|
||||
end
|
||||
}
|
||||
|
||||
use {
|
||||
"akinsho/nvim-bufferline.lua",
|
||||
after = "nvim-base16.lua",
|
||||
|
@ -247,7 +255,7 @@ return packer.startup(
|
|||
use {
|
||||
"tpope/vim-fugitive",
|
||||
cmd = {
|
||||
"Git"
|
||||
"Git"
|
||||
}
|
||||
}
|
||||
end
|
||||
|
|
|
@ -15,6 +15,11 @@ M.comment = function()
|
|||
end
|
||||
end
|
||||
|
||||
M.escape = function()
|
||||
vim.g.better_escape_interval = 300
|
||||
vim.g.better_escape_shortcut = {"jk"}
|
||||
end
|
||||
|
||||
M.lspkind = function()
|
||||
local present, lspkind = pcall(require, "lspkind")
|
||||
if present then
|
||||
|
|
Loading…
Reference in New Issue