Skip to content

42wim/vim-shfmt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

vim-shfmt

Vim plugin for shfmt (based on https://github.com/fatih/vim-hclfmt)

The plugin by default will format *.sh files on save. Under the hood it uses shfmt to process the files.

Usage

Save the file or call :ShFmt.

By default vim-shfmt automatically formats *.sh files. You can permanently disable this configuration in your ~/.vimrc as follows:

let g:sh_fmt_autosave = 0

Install

Vim-shfmt follows the standard runtime path structure. For Pathogen just clone the repo. For other plugin managers add the appropriate lines and execute the plugin's install command.

  • Pathogen
  • git clone https://github.com/42wim/vim-shfmt.git ~/.vim/bundle/vim-shfmt
  • vim-plug
  • Plug '42wim/vim-shfmt'
  • NeoBundle
  • NeoBundle '42wim/vim-shfmt'
  • Vundle
  • Plugin '42wim/vim-shfmt'

If shfmt is not already installed:

go get -u mvdan.cc/sh/cmd/shfmt

About

vim plugin for shfmt

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors