nvim: added winshift

master
tiyn 9 months ago
parent af9989106f
commit 5232072ab0

@ -61,5 +61,6 @@
"vim-markdown": { "branch": "master", "commit": "a657e697376909c41475a686eeef7fc7a4972d94" },
"vim-renamer": { "branch": "master", "commit": "9c6346eb4556cf2d8ca55de6969247ab14fe2383" },
"which-key.nvim": { "branch": "main", "commit": "4433e5ec9a507e5097571ed55c02ea9658fb268a" },
"wilder.nvim": { "branch": "master", "commit": "679f348dc90d80ff9ba0e7c470c40a4d038dcecf" }
"wilder.nvim": { "branch": "master", "commit": "679f348dc90d80ff9ba0e7c470c40a4d038dcecf" },
"winshift.nvim": { "branch": "main", "commit": "37468ed6f385dfb50402368669766504c0e15583" }
}

@ -19,6 +19,7 @@ m.nname("<leader>g", "Git")
m.nname("<leader>gd", "Git: diff")
m.nname("<leader>s", "Substitute")
m.nname("<leader>t", "Terminal")
m.nname("<C-W>", "Navigation")
-- unmap unwanted commands
m.nnoremap("Zt", '<NOP>')
@ -40,10 +41,10 @@ m.inoremap("<F12>", '<NOP>')
m.nnoremap("<F12>", '<NOP>')
-- shortcut for split navigation
m.nnoremap("<C-h>", '<C-w>h', 'Navigation: go to left split')
m.nnoremap("<C-j>", '<C-w>j', 'Navigation: go to lower split')
m.nnoremap("<C-k>", '<C-w>k', 'Navigation: go to upper split')
m.nnoremap("<C-l>", '<C-w>l', 'Navigation: go to right split')
m.nnoremap("<C-h>", '<C-w>h', 'Navigation: go to left window')
m.nnoremap("<C-j>", '<C-w>j', 'Navigation: go to lower window')
m.nnoremap("<C-k>", '<C-w>k', 'Navigation: go to upper window')
m.nnoremap("<C-l>", '<C-w>l', 'Navigation: go to right window')
-- remap for dealing with word wrap
m.nmap('j', "v:count == 0 ? 'gj' : 'j'", { "expr", "silent" }, 'Navigation: go down in wrapped lines')
@ -128,3 +129,6 @@ m.nnoremap("n", [[<Cmd>execute('normal! ' . v:count1 . 'n')<CR><Cmd>lua require(
'silent', "Search: search forward")
m.nnoremap("N", [[<Cmd>execute('normal! ' . v:count1 . 'N')<CR><Cmd>lua require('hlslens').start()<CR>]],
'silent', "Search: search backwards")
-- sindrets/winshift.nvim
m.nnoremap("<C-W>m", ":WinShift<CR>", "Navigation: enter window shift mode")

@ -0,0 +1,7 @@
return {
-- improved movement of windows
{
"sindrets/winshift.nvim",
opts = {},
},
}
Loading…
Cancel
Save