Skip to content

Commit c1bd02a

Browse files
committed
tweak introduction and section titles
1 parent 4094321 commit c1bd02a

File tree

1 file changed

+22
-13
lines changed

1 file changed

+22
-13
lines changed

README.md

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,26 @@
1-
## Format your C, C++ and Objective-C code [![Build Status](https://travis-ci.org/rhysd/vim-clang-format.png?branch=master)](https://travis-ci.org/rhysd/vim-clang-format)
1+
Format your C family code
2+
=======================================
3+
[![Build Status](https://travis-ci.org/rhysd/vim-clang-format.png?branch=master)](https://travis-ci.org/rhysd/vim-clang-format)
24

3-
This plugin formats your C++ code with specific coding style using [clang](http://clang.llvm.org/).
5+
This plugin formats your code with specific coding style using [clang](http://clang.llvm.org/). Currently below languages are supported.
46

5-
### Screenshot
7+
- C
8+
- C++
9+
- Objective-C
10+
- JavaScript
11+
- Java
12+
13+
## Screenshot
614

715
![Screenshot](https://raw.githubusercontent.com/rhysd/ss/master/vim-clang-format/main.gif)
816

9-
### Requirements
17+
## Requirements
1018

1119
- `clang-format` command (**3.4 or later**), which is bundled in Clang extra tools
1220
- [vim-operator-user](https://github.com/kana/vim-operator-user)(highly recommended)
1321
- [vimproc.vim](https://github.com/Shougo/vimproc.vim)(recommended in Windows)
1422

15-
### Usage
23+
## Usage
1624

1725
`:ClangFormat` command is available.
1826
If you use it in normal mode, the whole code will be formatted. If you use it in visual mode, the selected code will be formatted.
@@ -23,7 +31,7 @@ If you install [vim-operator-user](https://github.com/kana/vim-operator-user) in
2331
`:ClangFormatAutoToggle` command toggles the auto formatting on buffer write.
2432
`:ClangFormatAutoEnable` command enables the auto formatting on buffer write. Useful for automatically enabling the auto format through a vimrc. `:ClangFormatAutoDisable` turns it off.
2533

26-
### What is the difference from `clang-format.py`?
34+
## What is the difference from `clang-format.py`?
2735

2836
`clang-format.py` is Python script to use clang-format from Vim, which is installed with clang-format.
2937
The usage is [here](http://clang.llvm.org/docs/ClangFormat.html#vim-integration).
@@ -35,7 +43,7 @@ Against `clang-format.py`, vim-clang-format has below advantages.
3543

3644
In short, vim-clang-format has better Vim integration than `clang-format.py`.
3745

38-
### Customization
46+
## Customization
3947

4048
You can customize formatting using some variables.
4149

@@ -94,7 +102,7 @@ Vim's format mappings (e.g. `gq`) get to use `clang-format` to format. This
94102
option is not comptabile with Vim's `textwidth` feature. You must set
95103
`textwidth` to `0` when the `formatexpr` is set.
96104

97-
### Vimrc Example
105+
## Vimrc Example
98106

99107
```vim
100108
let g:clang_format#style_options = {
@@ -112,12 +120,13 @@ autocmd FileType c,cpp,objc map <buffer><Leader>x <Plug>(operator-clang-format)
112120
nmap <Leader>C :ClangFormatAutoToggle<CR>
113121
```
114122

115-
##### Auto-enabling auto-formatting
123+
### Auto-enabling auto-formatting
124+
116125
```vim
117-
au FileType c ClangFormatAutoEnable
126+
autocmd FileType c ClangFormatAutoEnable
118127
```
119128

120-
### For More Information
129+
## For More Information
121130

122131
```
123132
$ clang-format -help
@@ -130,9 +139,9 @@ $ clang-format -dump-config
130139
clang-format's documentation and API documentation is useful in some cases.
131140
In paticular, the following link is useful to know the information of a key and its value of a style setting.
132141
[CLANG-FORMAT STYLE OPTIONS](http://clang.llvm.org/docs/ClangFormatStyleOptions.html)
133-
134142

135-
### License
143+
144+
## License
136145

137146
The MIT License (MIT)
138147

0 commit comments

Comments
 (0)