-
Notifications
You must be signed in to change notification settings - Fork 85
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 support for code formatting #98
Comments
Yes, I do have plans to add support eventually. I'll keep this issue open to track. |
@Cosson2017 use vim's default functionality For example, for c/c++, install if &ft == c
setlocal formatprg=clang-format\ --style='Webkit'
setlocal equalprg=clang-format\ --style='Webkit'
endif and then either use |
@Piping " File: ~/.vimrc
augroup myvimrc
autocmd!
autocmd FileType c,cpp setlocal formatprg=clang-format\ --stype='Webkit'
autocmd FileType c,cpp setlocal equalprg=clang-format\ --stype='Webkit'
augroup END or by using the " File: ~/.vim/after/ftplugin/c.vim
setlocal formatprg=clang-format\ --style='Webkit'
setlocal equalprg=clang-format\ --style='Webkit' |
@bfrg Thanks! I did put all my code environment steup in a function and then call the function from autocmd! But It is a good point. |
FYI: #471 |
Is it in the plan for code format?
The text was updated successfully, but these errors were encountered: