fix!: adapt mappings, next/prev search now on k/K
This commit is contained in:
parent
8a0e6acfaf
commit
3480f26268
@ -15,12 +15,12 @@ keymap('n', '<c-right>', '<cmd>vertical resize -2<cr>', opt)
|
|||||||
keymap('v', '<', '<gv', opt)
|
keymap('v', '<', '<gv', opt)
|
||||||
keymap('v', '>', '>gv', opt)
|
keymap('v', '>', '>gv', opt)
|
||||||
vim.cmd([[
|
vim.cmd([[
|
||||||
nnoremap <c-j> :m .+1<CR>==
|
nnoremap M :m .+1<CR>==
|
||||||
nnoremap <c-k> :m .-2<CR>==
|
nnoremap L :m .-2<CR>==
|
||||||
inoremap <c-j> <Esc>:m .+1<CR>==gi
|
inoremap <c-M> <Esc>:m .+1<CR>==gi
|
||||||
inoremap <c-k> <Esc>:m .-2<CR>==gi
|
inoremap <c-L> <Esc>:m .-2<CR>==gi
|
||||||
vnoremap <c-j> :m '>+1<CR>gv=gv
|
vnoremap M :m '>+1<CR>gv=gv
|
||||||
vnoremap <c-k> :m '<-2<CR>gv=gv
|
vnoremap L :m '<-2<CR>gv=gv
|
||||||
]])
|
]])
|
||||||
|
|
||||||
keymap('n', 'Y', '"+y', opt)
|
keymap('n', 'Y', '"+y', opt)
|
||||||
@ -95,8 +95,8 @@ function MapDHM()
|
|||||||
keymap('x', 'e', 'k', { noremap = true })
|
keymap('x', 'e', 'k', { noremap = true })
|
||||||
keymap('n', 'l', 'i', { noremap = true })
|
keymap('n', 'l', 'i', { noremap = true })
|
||||||
keymap('n', 'N', 'J', { noremap = true })
|
keymap('n', 'N', 'J', { noremap = true })
|
||||||
keymap('n', 'j', 'n', { noremap = true })
|
keymap('n', 'k', 'n', { noremap = true })
|
||||||
keymap('n', 'J', 'N', { noremap = true })
|
keymap('n', 'K', 'N', { noremap = true })
|
||||||
keymap('n', '<nop>', 'I', { noremap = true })
|
keymap('n', '<nop>', 'I', { noremap = true })
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -174,7 +174,7 @@ local opts = {
|
|||||||
nowait = false, -- use `nowait` when creating keymaps
|
nowait = false, -- use `nowait` when creating keymaps
|
||||||
}
|
}
|
||||||
|
|
||||||
vim.keymap.set('n', 'L', function()
|
--[[ vim.keymap.set('n', 'L', function()
|
||||||
local win = vim.api.nvim_get_current_win()
|
local win = vim.api.nvim_get_current_win()
|
||||||
local qf_winid = vim.fn.getloclist(win, { winid = 0 }).winid
|
local qf_winid = vim.fn.getloclist(win, { winid = 0 }).winid
|
||||||
local action = qf_winid > 0 and 'lclose' or 'lopen'
|
local action = qf_winid > 0 and 'lclose' or 'lopen'
|
||||||
@ -185,7 +185,7 @@ vim.keymap.set('n', 'X', function()
|
|||||||
local qf_winid = vim.fn.getqflist({ winid = 0 }).winid
|
local qf_winid = vim.fn.getqflist({ winid = 0 }).winid
|
||||||
local action = qf_winid > 0 and 'cclose' or 'copen'
|
local action = qf_winid > 0 and 'cclose' or 'copen'
|
||||||
vim.cmd('botright ' .. action)
|
vim.cmd('botright ' .. action)
|
||||||
end, { noremap = true, silent = true })
|
end, { noremap = true, silent = true }) ]]
|
||||||
-- }}}
|
-- }}}
|
||||||
-- leader mappings {{{
|
-- leader mappings {{{
|
||||||
-- TODO create entire treesitter section
|
-- TODO create entire treesitter section
|
||||||
|
@ -5,12 +5,19 @@ g.mapleader = ' '
|
|||||||
g.tex_flavor = 'latex'
|
g.tex_flavor = 'latex'
|
||||||
g.c_syntax_for_h = true
|
g.c_syntax_for_h = true
|
||||||
vim.cmd([[
|
vim.cmd([[
|
||||||
|
let g:VM_default_mappings = 0
|
||||||
|
let g:VM_mouse_mappings = 1
|
||||||
let g:VM_leader = {'default': ',', 'visual': ',', 'buffer': ','}
|
let g:VM_leader = {'default': ',', 'visual': ',', 'buffer': ','}
|
||||||
let g:VM_maps = {}
|
let g:VM_maps = {}
|
||||||
let g:VM_custom_motions = {'n': 'j', 'l': 'i', 'e': 'k', 'i': 'l'}
|
|
||||||
let g:VM_maps['i'] = 'l'
|
let g:VM_maps['i'] = 'l'
|
||||||
let g:VM_maps['I'] = 'L'
|
let g:VM_maps['I'] = 'L'
|
||||||
let g:VM_mouse_mappings = 1
|
let g:VM_maps['Find Under'] = '<c-k>'
|
||||||
|
let g:VM_maps['Find Subword Under'] = '<c-k>'
|
||||||
|
let g:VM_maps["Add Cursor Down"] = '<C-n>'
|
||||||
|
let g:VM_maps["Add Cursor Up"] = '<C-e>'
|
||||||
|
let g:VM_maps['Find Next'] = 'k'
|
||||||
|
let g:VM_maps['Find Prev'] = 'K'
|
||||||
|
let g:VM_custom_motions = {'n': 'j', 'j': 'n', 'l': 'i', 'e': 'k', 'i': 'l'}
|
||||||
]])
|
]])
|
||||||
|
|
||||||
opt.termguicolors = true
|
opt.termguicolors = true
|
||||||
|
Loading…
Reference in New Issue
Block a user