You tried to avoid spaces:
:set formatprg=uncrustify\ -c\ ~/misc/uncrustify.cfg\ --no-backup
UPDATE
uncrustify
displays the message "Parsing: 170 bytes ..." on stderr, so we need to redirect it to /dev/null
:
:set formatprg=uncrustify\ -c\ ~/misc/uncrustify.cfg\ -l\ CPP\ --no-backup\ 2>/dev/null
gq
works with lines, so you can select the desired lines in visual mode and execute gq
. For example, if you want to reformat the entire file, run ggVGgq
.
Further information at :help gq
source share