News for hackers. Stuff that matters.
Re:Vim Tips For Intermediate Users by PaulJulius on Wednesday May 20, 2015 @12:17AM (#9574634)
Being able to open up multiple files and arrange them precisely how I want (with the keyboard!) is my absolute favorite part of vim. I use the following shortcuts for opening a file to the right/left or above/below:

    nnoremap <Leader>or :set splitright<CR>:vs
    nnoremap <Leader>ol :set nosplitright<CR>:vs
    nnoremap <Leader>oa :set nosplitbelow<CR>:sp
    nnoremap <Leader>ob :set splitbelow<CR>:sp
    " Don't let vim change the setup when closing windows
    set noequalalways
So I can simply type ',or ' and then the name of a file to get a vertical split.

You can then use <C-w>w<number>+/- to increase/decrease the height of a window and <C-w>w<number>'<'/'>' to change the width.

There are no comments on this comment yet.