Brighter side
Brighter side

Reputation: 402

Edit Vim windows size dynamicaly with a hotkey

In the vimrc file you can set the number of colums and lines you want your windows to be with the commands:

set columns=*
set lines=*

But how can I dynamicaly edit that. Like having a mapped hotkey that for example increase the value of one of them or decrease the value of one of them.

For example:

set colums=80
<C-B> 

and then the columns number value is 81

(The question isn't about 'nnoremap' but the command that can increase the value)

Upvotes: 1

Views: 48

Answers (1)

B.G.
B.G.

Reputation: 6026

something like this should work:

let &columns=&columns+20

The & sign can be used to get the value of a setting.

Upvotes: 2

Related Questions