Skip to content

Automatically add space padding around operators in vim

License

Notifications You must be signed in to change notification settings

ar492/padder_old

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

padder

Automatically add space padding around operators. Compatible with C++, Java, probably more.

demo

Prerequisites:

  • Python (from terminal)
  • Windows OS; this can certainly be applied to other setups with some modifications, but it's been tested only on Windows.
  • The third party regex package

Usage:

Add the following to your .vimrc:

command Pad :w !python "C:\Users\gbpol\Desktop\Useful\Competitive-Programming\Util\padder.py" %:p <CR> :w<CR>

Of course, C:\Users\gbpol\Desktop\Useful\Competitive-Programming\Util\padder.py should be replaced with your path to padder.py.

To do:

Make this a plugin so that padding happens whenever ; or <enter> is pressed, similar to some formatting extensions (like this).

About

Automatically add space padding around operators in vim

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages