Skip to content

Commit 8cfdc43

Browse files
committed
Updated documentation
1 parent e522e2a commit 8cfdc43

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ It is more convenient to map `:ClangFormat` to your favorite key mapping in norm
2121
If you install [vim-operator-user](https://github.com/kana/vim-operator-user) in advance, you can also map `<Plug>(operator-clang-format)` to your favorite key bind.
2222

2323
`:ClangFormatAutoToggle` command toggles the auto formatting on buffer write.
24+
`:ClangFormatAutoEnable` command enables the auto formatting on buffer write. Useful for automatically enabling the auto format through a vimrc. `:ClangFormatAutoDisable` turns it off.
2425

2526
### What is the difference from `clang-format.py`?
2627

@@ -111,6 +112,11 @@ autocmd FileType c,cpp,objc map <buffer><Leader>x <Plug>(operator-clang-format)
111112
nmap <Leader>C :ClangFormatAutoToggle<CR>
112113
```
113114

115+
```vim
116+
" Enable auto formatting on c files:
117+
au FileType c ClangFormatAutoEnable
118+
```
119+
114120
### For More Information
115121

116122
```

0 commit comments

Comments
 (0)