liuchengxu / vim-better-default

:art: Simplify your .vimrc and make the default vim better
MIT License
157 stars 37 forks source link

Window manipulation #6

Closed CptGibbon closed 7 years ago

CptGibbon commented 7 years ago

Lines 277-295 deal with window manipulation shortcuts. Some of these commands require the letter after the ctrl-w combination to be capitalised to achieve the desired effect, e.g. the end of line 285 should read K with a capital K to swap windows to a horizontal split.

liuchengxu commented 7 years ago

These shortcuts works for me and it is not neccessary to be capitalized. Is it invaild in your case?

BTW, the line 285 nnoremap <Leader>wk <C-W>k is not a horizontal window split, but move to the window above if exists. 🙉

:help window, you can find this:

CTRL-W <Up>                 *CTRL-W_<Up>*
CTRL-W CTRL-K                   *CTRL-W_CTRL-K* *CTRL-W_k*
CTRL-W k    Move cursor to Nth window above current one.  Uses the cursor
        position to select between alternatives.
CptGibbon commented 7 years ago

Yep you're right about the window movement, my bad. Although I still find these shortcuts don't work on my setup unless I capitalise the trailing letters.

liuchengxu commented 7 years ago

What's your vim version? I have never seen this before.

CptGibbon commented 7 years ago

Yeah you're right I'm getting confused between the "move cursor to nth window" shortcuts and the "move current window" shortcuts. Everything works as you intended.