Skip to content

cdfpaz/vim-codefmt

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

codefmt is a utility for syntax-aware code formatting. codefmt relies on codefmtlib for registration and management of formatting plugins.

For details, see the executable documentation in the vroom/ directory or the helpfiles in the doc/ directory. The helpfiles are also available via :help codefmt if codefmt is installed (and helptags have been generated).

Commands

Use :FormatLines to format a range of lines or use :FormatCode to format the entire buffer.

Usage example

Before:

int foo(int * x) { return * x** x ; }

After running :FormatCode:

int foo(int* x) { return *x * *x; }

Installation

This example uses Vundle, whose plugin-adding command is Plugin.

" Add maktaba and codefmt to the runtimepath.
" (The latter must be installed before it can be used.)
Plugin 'google/vim-maktaba'
Plugin 'google/vim-codefmtlib'
Plugin 'google/vim-codefmt'

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Vim Script 100.0%