vim-usd-auto-formatter is a Vim plugin that cleans and aligns USD code, automatically.
Use your plugin manager to add this plugin to Vim.
Plug 'ColinKennedy/vim-usd-auto-formatter'
nmap <leader>f <Plug>VimUsdLintFormatCurrentBuffer
Plugin 'ColinKennedy/vim-usd-auto-formatter'
nmap <leader>f <Plug>VimUsdLintFormatCurrentBuffer
- 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.
Variable | Description | Default |
---|---|---|
g:usdcat_command | The executable that will be used to convert to and from USD crate (binary) | "usdcat" |
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?
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