Skip to content
 
 

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

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.

To let vim-shfmt automatically format *.sh files whenever you save them, add the following in your ~/.vimrc:

let g:sh_fmt_autosave = 1

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

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages