tmux.vim


Ⅰ. 插件描述

Vim syntax file for tmux configuration files

Ⅱ. 基本信息

创建日期:  2017-02-25
使用用户:  15
Github星:  29
插件作者:  Eric Pruitt

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin 'ericpruitt/tmux-vim-tree-and-truth'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle 'ericpruitt/tmux-vim-tree-and-truth'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug 'ericpruitt/tmux-vim-tree-and-truth'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/ericpruitt/tmux.vim

Ⅳ. 文档说明

tmux.vim

This repository provides a Vim syntax highlighting file for tmux

  1. The syntax file is generated directly from the tmux source code
  2. an Awk script. A cron job running on a host managed by the maintainer of

this repository regenerates the syntax file once a day and, if the syntax file
has changed, commits the change then pushes it to GitHub. As such, this
repository should always have a fairly up-to-date syntax file as long as there
has not been any significant refactoring by the tmux maintainers.

Screenshot of tmux configuration in Vim

The syntax file was derived from Keith Smiley's tmux.vim with
some changes:

  • When a color is used (e.g. "colour7"), the text's foreground is changed to
    reflect the color that the number represents. For darker colors, the

background is changed to white since the text might otherwise be invisible.

  • Distinct highlighting has been added for interpolated blocks (#[...],
    #(...) and #{...}).
  • Multi-line strings are supported and correctly highlighted.
  • The highlighting style has been modified; what is considered a boolean,
    identifier, etc. in this version of the syntax file differs from Keith's.

This project and all accompanying files (unless stated otherwise) are licensed
under the 2-clause BSD license.

Installation

The syntax file is included with Vim as of version 8.0.0420, but users wanting
a more up-to-date syntax file can use this repository directly.

Makefile

Assuming make(1) is installed and there is an existing Vim directory at
$HOME/.vim, running make install should be sufficient.

Plugin Manager

This repository should work with most Vim plugin managers that support tracking
Git repositories. Since the files needed by Vim at runtime are in the
subdirectory "vim/", the plugin managers will typically need to be configured
to load files from the correct folder:

Development

In addition to the Makefile, there are two other components to this repository
used to generate the syntax file. The top portion of the syntax file that
defines syntax-matching regular expressions is found in "./src/header.vim". It
is combined with the output of "./src/dump-keywords.awk", an Awk script that
accepts tmux C source files as arguments then dumps extracted command and
option names. The Makefile and Awk script are POSIX-compliant.

Makefile Targets

  • build: Download the tmux source code and generate or update the Vim
    syntax file. This is the default target used when none are explicitly given.
  • install: Install the Vim files in $HOME/.vim.
  • sync: Pull the latest tmux commits, update the Vim syntax file then
    commit the changes. If "PUSH_AFTER_SYNC" is set to "true", the commit will

automatically be pushed upstream i.e. make PUSH_AFTER_SYNC=true sync. The
default value of "PUSH_AFTER_SYNC" is "false".

添加新评论