/vim-gofmtmd

:triangular_ruler:vim-gofmtmd is vim plugin which formats go source code block in Markdown. detects fenced code & formats code using gofmt.

Primary LanguageVim ScriptApache License 2.0Apache-2.0

vim-gofmtmd

CircleCI

vim-gofmtmd formats go source code block in Markdown. detects fenced code & formats code using gofmt.

Requirements

gofmtmd

Inatall

First of all, you should install gofmtmd.

go get github.com/po3rin/gofmtmd/cmd/gofmtmd

if you have not installed Go language. please install from release page. https://github.com/po3rin/gofmtmd/releases

you can use plugin.

" ex) if you use vim-plug (https://github.com/junegunn/vim-plug)
call plug#begin()
Plug 'po3rin/vim-gofmtmd' "add plugin here!!
let g:lsp_async_completion = 1
call plug#end()

Usage

command

:GoFmtMd

Option

You can set following option to enable auto format when save file.

let g:gofmtmd_auto_fmt = 1