Script Roundup: pb.vim, SyntaxRange
Send in your Vim scripts for review through our contact form or @vimnews.
pb.vim
pb.vim (GitHub: troydm / pb.vim, License: Vim) by Dmitry Geurkov is a wrapper around the standard Mac OS X pbcopy
and pbpaste
commands. It can also work with a remote host by setting let g:pb_command_prefix = 'ssh remotehost '
.
Also related is How to Copy and Paste with Tmux on Mac OS X, which demonstrates how to use reattach-to-user-namespace
to get Vim and tmux working together nicely.
SyntaxRange
SyntaxRange by Ingo Karkat allows ranges within a buffer to use a different syntax, or ignore the current syntax based on the buffer’s filetype
. This is ideal for working with files that mix different types of syntax, like Markdown blog posts with code samples.
Typing :[range]SyntaxIgnore
will ignore the current filetype
for the range, and :[range]SyntaxInclude {filetype}
will change it to another filetype
.