Shortcut for Resizing Windows

Viewed 43

The code snippet in ~/.vimrc below used to work. Somewhere down the line it stopped working but I can't place the interfering code nor can I tell when it broke. Grepping in ~/.vim for <C-left> shows nothing....

Removed all plugged plugins, still didn't work. This makes me think it is something in the ~/.vimrc that is causing the issue... However all additional ~/.vim files are located in the linked repo.

" resize current buffer by +/- 5
    nnoremap <C-left> :vertical resize -5<cr>
    nnoremap <C-down> :resize +5<cr>
    nnoremap <C-up> :resize -5<cr>
    nnoremap <C-right> :vertical resize +5<cr>

Any ideas what is breaking this?

https://raw.githubusercontent.com/gutelfuldead/dotfiles/master/files/vimrc

1 Answers

Issue was nnoremap should have been noremap. Also had to swap the +/- signs.

Functional,

" resize current buffer by +/- 5
noremap <C-left> :vertical resize +5<cr>
noremap <C-down> :resize -5<cr>
noremap <C-up> :resize +5<cr>
noremap <C-right> :vertical resize -5<cr>
Related