diff --git a/.config/nvim/lazy-lock.json b/.config/nvim/lazy-lock.json index 0bcf831..2ca69f3 100644 --- a/.config/nvim/lazy-lock.json +++ b/.config/nvim/lazy-lock.json @@ -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" } } \ No newline at end of file diff --git a/.config/nvim/lua/keymap.lua b/.config/nvim/lua/keymap.lua index 5aa8d1d..608464c 100644 --- a/.config/nvim/lua/keymap.lua +++ b/.config/nvim/lua/keymap.lua @@ -19,6 +19,7 @@ m.nname("g", "Git") m.nname("gd", "Git: diff") m.nname("s", "Substitute") m.nname("t", "Terminal") +m.nname("", "Navigation") -- unmap unwanted commands m.nnoremap("Zt", '') @@ -40,10 +41,10 @@ m.inoremap("", '') m.nnoremap("", '') -- shortcut for split navigation -m.nnoremap("", 'h', 'Navigation: go to left split') -m.nnoremap("", 'j', 'Navigation: go to lower split') -m.nnoremap("", 'k', 'Navigation: go to upper split') -m.nnoremap("", 'l', 'Navigation: go to right split') +m.nnoremap("", 'h', 'Navigation: go to left window') +m.nnoremap("", 'j', 'Navigation: go to lower window') +m.nnoremap("", 'k', 'Navigation: go to upper window') +m.nnoremap("", '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", [[execute('normal! ' . v:count1 . 'n')lua require( 'silent', "Search: search forward") m.nnoremap("N", [[execute('normal! ' . v:count1 . 'N')lua require('hlslens').start()]], 'silent', "Search: search backwards") + +-- sindrets/winshift.nvim +m.nnoremap("m", ":WinShift", "Navigation: enter window shift mode") diff --git a/.config/nvim/lua/plugins/winshift.lua b/.config/nvim/lua/plugins/winshift.lua new file mode 100644 index 0000000..adee4ad --- /dev/null +++ b/.config/nvim/lua/plugins/winshift.lua @@ -0,0 +1,7 @@ +return { + -- improved movement of windows + { + "sindrets/winshift.nvim", + opts = {}, + }, +}