On Macos, using homebrew to install emacs will blat the tagbar plugin in Vim, due to a conflict with ctags versions.
This fixed the problem for me:
brew reinstall ctags-exuberant
brew link --overwrite ctags
When I first discovered Vim I wasted a lot of time trying to bend it backwards into a traditional editor. The below quote sums it up perfectly:
Vim is not TextMate or whatever other editor you have used before. There is no way to transfer all your old habits seamlessly, point blank.
Instead of wasting your time trying to make Vim and your terminal into something that it’s not and can’t be you should learn how to use and customize Vim wisely. All your
Altcombos won’t lead you anywhere. Especially in a terminal where
Altis often problematic and
Consider using leader
- it’s portable on every platform
- it’s less prone to conflicts with your OS or terminal emulator
- it opens a lot of easy to remember possibilities
Adding gobs of plugins instead of learning Vim’s native functionality is another common trap, so I maintain a secondary lightweight Vim config called Ninjarc with minimal plugins to keep me sharp.
Finally, Tim Pope’s philosophy of favouring commands over leader key combos yields a more cohesive configuration. I’m experimenting with Spacemacs-style command mnemonics in my Aetherwolf Vim config. For example, instead of binding
T to open NerdTree,
:tn is used (Toggle NerdTree). This allows
:tt for Toggle Tagbar and so on – a nice memorable taxonomy rather than a flat multitude of somewhat arbitrary leader combos.
Fold current function:
- mb – mark b
- % – jump to end of block
- zf’b – fold back to marker b
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!
When using the plugin plantuml-syntax, add the following one-liner in .vimrc to render a PNG in the current directory when ‹leader›b is pressed:
autocmd FileType plantuml nnoremap <buffer> <leader>b :!java -jar ~/bin/plantuml.jar -o %:p:h %<cr>