Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add doc for format on save #1799

Merged
merged 1 commit into from Jun 12, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 9 additions & 1 deletion autoload/SpaceVim/layers/format.vim
Expand Up @@ -7,10 +7,18 @@
"=============================================================================

""
" @section format, format
" @section format, layer-format
" @parentsection layers
" SpaceVim uses neoformat as the default code format tools. Neoformat uses a
" variety of formatters for many filetypes. for more info see |neoformat|
" if you want to run a formatter on save, just put this config into bootstrap
" function.
" >
" augroup fmt
" autocmd!
" autocmd BufWritePre * undojoin | Neoformat
" augroup END
" <

function! SpaceVim#layers#format#plugins() abort
return [
Expand Down
13 changes: 10 additions & 3 deletions doc/SpaceVim.txt
Expand Up @@ -28,7 +28,7 @@ CONTENTS *SpaceVim-contents*
4. core#statusline......................|SpaceVim-layer-core-statusline|
5. core#tabline............................|SpaceVim-layer-core-tabline|
6. exprfold....................................|SpaceVim-layer-exprfold|
7. format..............................................|SpaceVim-format|
7. format........................................|SpaceVim-layer-format|
8. github........................................|SpaceVim-layer-github|
9. incsearch..................................|SpaceVim-layer-incsearch|
10. indentmove...............................|SpaceVim-layer-indentmove|
Expand Down Expand Up @@ -683,10 +683,17 @@ Mappings:
<

==============================================================================
FORMAT *SpaceVim-format*
FORMAT *SpaceVim-layer-format*

SpaceVim uses neoformat as the default code format tools. Neoformat uses a
variety of formatters for many filetypes. for more info see |neoformat|
variety of formatters for many filetypes. for more info see |neoformat| if you
want to run a formatter on save, just put this config into bootstrap function.
>
augroup fmt
autocmd!
autocmd BufWritePre * undojoin | Neoformat
augroup END
<

==============================================================================
GITHUB *SpaceVim-layer-github*
Expand Down