Category: vim

neovim: macos tmux and netrw/vinegar clipboard errors

So it looks like MacOS Sierra broke pbcopy/pbpaste for tmux. This manifests as clipboard errors when using netrw/vinegar in neovim under tmux. (Dunno why netrw is writing to the clipboard but anyways).

The solution is to use Homebrew to reinstall a patched version of reattach-to-user-namespace:

brew uninstall reattach-to-user-namespace
brew install reattach-to-user-namespace --with-wrap-pbcopy-and-pbpaste

Although this was annoying, it did lead to running brew cleanup which reclaimed 3.8GB of disk space. Jinkies!

vim: render plantuml

When using the plugin plantuml-syntax, add the following one-liner in .vimrc to render a PNG in the current directory when ‹leader›e is pressed:

autocmd FileType plantuml nnoremap  e :!java -jar ~/bin/plantuml.jar -o %:p:h %

This assumes Linux and that plantuml.jar lives in ~/bin. If working from a Dropbox directory, the image can then easily be viewed in a web browser.