diff --git a/bin/compress-pdf b/bin/compress-pdf new file mode 100755 index 0000000..bd194b4 --- /dev/null +++ b/bin/compress-pdf @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +if [ $# -ne 2 ]; then + echo >&2 "errror: wrong number of arguments" + echo >&2 "usage: compress-pdf " + exit 1 +fi + +gs -sDEVICE=pdfwrite -dPDFSETTINGS=/printer -dCompatibilityLevel=1.4 -dNOPAUSE -dQUIET -dBATCH -sOutputFile=$2 $1 diff --git a/init.vim b/init.vim index 0fdb498..e0de819 100644 --- a/init.vim +++ b/init.vim @@ -159,6 +159,9 @@ nmap gy (coc-type-definition) nmap gi (coc-implementation) nmap gr (coc-references) +" Add `:Format` command to format current buffer. +command! -nargs=0 Format :call CocAction('format') + " Use K to show documentation in preview window. nnoremap K :call show_documentation()