GitHub - alx741/vim-hindent: Vim Haskell Hindent integration plugin
source link: https://github.com/alx741/vim-hindent
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
README.md
vim-hindent
Integrates with hindent so every time you save a Haskell source file it gets automatically prettified.
Simply using :%!hindent
replaces your whole source file with an error message
from hindent when you happen to have a syntax error in your code, this
plugin manages that annoyance.
Note: If you prefer stylish-haskell use vim-stylishask instead.
Installation
Compatible with Vundle
, Pathogen
, Vim-plug
.
Usage
By default, vim-hindent will format your code automatically when saving a
Haskell source file, but you can use the :Hindent
command at any time to
format the current file.
To apply hindent on a range, either write the range manually or visually
select the desired code and then invoke :Hindent
.
Use :HindentEnable
, :HindentDisable
, :HindentToggle
to enable, disable, or
toggle running hindent
on save.
Configuration
Trigger hindent when saving (default = 1):
g:hindent_on_save = 1
Number of spaces per indentation (default = '', uses hindent
default of 2):
g:hindent_indent_size = 2
Max line length (default = ''
, uses hindent
default of 80):
g:hindent_line_length = 100
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK