Skip to content

Commit

Permalink
Split formatting from programming layer (liuchengxu#265)
Browse files Browse the repository at this point in the history
The functionality of formatting the code is worthy of a single layer.
  • Loading branch information
liuchengxu authored Jan 25, 2018
1 parent ef44344 commit 09496ed
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
31 changes: 31 additions & 0 deletions layers/+programming/formatting/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Formatting layer

## Table of Contents

<!-- vim-markdown-toc GFM -->

* [Description](#description)
* [Install](#install)
* [Key Bindings](#key-bindings)
* [Related Projects](#related-projects)

<!-- vim-markdown-toc -->

## Description

This layer adds support for formatting the code.

## Install

To use this configuration layer, add it to your `~/.spacevim`.

## Key Bindings

Key Binding | Mode | Description
:---: | :---: | :---:
<kbd>, =</kbd> | Normal | Format the code

## Related Projects

- [neoformat](https://github.com/sbdchd/neoformat)
- [vim-autoformat](https://github.com/Chiel92/vim-autoformat)
1 change: 1 addition & 0 deletions layers/+programming/formatting/config.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nnoremap <LocalLeader>= :Autoformat<CR>
1 change: 1 addition & 0 deletions layers/+programming/formatting/packages.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
MP 'Chiel92/vim-autoformat', { 'on': 'Autoformat' }

0 comments on commit 09496ed

Please sign in to comment.