Skip to content

ColinKennedy/vim-usd-auto-formatter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

vim-usd-auto-formatter is a Vim plugin that cleans and aligns USD code, automatically.

Demo

asciicast

Installation

Use your plugin manager to add this plugin to Vim.

vim-plug

Plug 'ColinKennedy/vim-usd-auto-formatter'
nmap <leader>f <Plug>VimUsdLintFormatCurrentBuffer

Vundle

Plugin 'ColinKennedy/vim-usd-auto-formatter'
nmap <leader>f <Plug>VimUsdLintFormatCurrentBuffer

Requirements

  • Must have USD compiled
  • usdcat (or another equivalent executable) command must be available in your PATH environment variable. usdcat is used to convert to and from binary.

Options

Variable Description Default
g:usdcat_command The executable that will be used to convert to and from USD crate (binary) "usdcat"

How does it work?

Basically, this plugin is a hack that runs usdcat on Vim buffers and replaces the buffer with its ASCII representation. This has the effect of "formatting" the USD code in a deterministic and clean way. Pretty cool, huh?

Known Issues

Because this plugin is experimental and literally runs usdcat on your source-code, it falls under the same issues that usdcat has.

Such as:

  • Line / inline comments are removed

About

A Vim plugin that automatically reformats Pixar USD files

Resources

License

Stars

Watchers

Forks

Packages

No packages published