Skip to content

woelke/vim-clang-format-py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Clang-format.py Wrapper

This plugin wraps the file clang-format.py and can now be used with plugin manager tools like Vundle or vim-plug.

Why not using vim-clang-format or vim-autoformat instead of wrap a python script. Because both tools wipes the jump list, which makes the usage feel like a torment.

Install

Install this plugin with your favorite plugin-manager or manual with the following commands:

git clone https://github.com/aufgang001/vim-clang-format-py.git  ~/.vim/vim-clang-format-py.git

Requirements

Your vim must support Python 3, which can be checked in vim by the commands

:version
:python3 print("test")

You have to install clang-format. For example with the command:

sudo apt-get install clang-format-3.8

Add the following line to your .vimrc file:

let g:clang_format_path = "clang-format-3.8"

Finally, bind the new command ClangFormat to a key:

noremap <F12> :ClangFormat<CR>

Usage

Mark a block of code or position the cursor to a specific line and enter your previously defined shortcut.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published