Skip to content

gVim plugin for changing font/window size using keyboard or mousewheel.

License

Notifications You must be signed in to change notification settings

kennypete/resize-font.gvim

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

resize-font.gvim

Resizing gvim

(for Linux and Windows)

This plugin for gvim adds the ability to change font size (and therefore window size too) using the same methods used in most web browsers, terminal emulators and some other graphical text editors.

In console Vim or Neovim the plugin exits and doesn’t do anything.

I may add Mac support if this plugin attracts any interest.

Usage

Mapping Action
Ctrl + = Increases text size
Ctrl + - Decreases text size
Ctrl + 0 Resets text to original size
Ctrl + mousewheel Increases/Decreases text size

If you already have any of these keys mapped, your mappings will not be overridden. There are also a few limitations when using older Windows gvim versions. First, before v9.0 patch 1112 Ctrl + - will not work. Instead, Ctrl + =, = has been made the default. Second, the mousewheel mappings will not work if you’re using a version before v8.2 patch 5069.

If you don’t like these mappings, you can map your own in your .vimrc with:

nnoremap {LHS} <Plug>CfsPlus
nnoremap {LHS} <Plug>CfsMinus
nnoremap {LHS} <Plug>CfsOriginal

...where {LHS} is the key combination you want.

Install

Plugin manager

Installation can be done via a plugin manager.

For vim-plug it’s:

Plug 'eggbean/resize-font.gvim'

No plugin manager

If you don’t use a plugin manager you can just place the scripts change_font_*.vim in…

~/.vim/plugin on Linux, or…

%USERPROFILE%\vimfiles\plugin on Windows.

Not working with your font?

This should work with all modern Unicode fonts but if you find one that doesn’t work tell me and I’ll modify the regex. This is only likely to occur with Windows.

About

gVim plugin for changing font/window size using keyboard or mousewheel.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Vim Script 100.0%