Ⅰ. 插件描述
Vim Monokai color scheme that tries to be as faithful as possible to Sublime's Monokai syntax highlightingⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'erichdongubler/vim-sublime-monokai'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'erichdongubler/vim-sublime-monokai'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'erichdongubler/vim-sublime-monokai'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/erichdongubler/vim-sublime-monokai
Ⅳ. 文档说明
# Sublime Monokai for Vim
Looking for screenshots? Scroll down to see!
vim-sublime-monokai is a refined Monokai color scheme for vim tries to look
like Sublime's default color scheme. It's derived from the work put into:
I noticed that there were several places where the highlighting wasn't entirely
faithful to that of Sublime, which is my second choice for editing in my
day-to-day. The purpose of this project is to provide an experience that
matches Sublime as closely as possible.
Note that, in my case, I use several plugins to enhance my own highlighting andctags experience. Where possible, the dependent plugins have been noted for
languages whose highlighting would otherwise be impossible to make equivalent
to Sublime. Conflicts with other plugins that I've used have been noted. You
will NOT get full fidelity with Sublime's highlighting if you use conflicting
plugins with this color scheme enabled.
Installation
Use your favorite plugin manager! Alternatively, download thecolors/sublimemonokai.vim
file and move it into your colors folder.
Usage
After installing this plugin via your favorite plugin manager, add the
following to your vimrc:
syntax on
colorscheme sublimemonokaiInside of sublimemonokai.vim one will find
notes and suggested variations from exact Sublime colors that contributors have
found to be superior to vanilla Sublime. It is recommended that you take a look
and see if there's anything you like! Deficiencies in syntax highlighting
support that make it impossible to achieve parity with Sublime have also been
- These are prime candidates for PRs if you find a plugin with better
- highlighting groups!
Terminal support
vim-sublime-monokai only support 256 colours in terminal. If you are using a
terminal which support truecolor like iterm2, enable the GUI color by
adding the following to your vimrc:
set termguicolorsOtherwise, use below setting to activate the 256 color in terminal
set t_Co=256Configuration
Italics
By default italicized text is enabled in GUI (gVim), but in terminal it's not.
If you are using a font that support italics in terminal, add the following
to your .vimrc:
let g:sublimemonokai_term_italic = 1Language-specific configuration
In order to provide an experience with parity to Sublime, this color scheme
integrates with the highlighting groups that several language-specific plugins
- You will need to install these plugins in order to have Sublime-like
highlighting.
Java
There are two flavors you can pick from here -- see below sections for more
details.
Mainline vim's Java

This is the recommended option for Java. You will need at least the following
configuration for proper color support:
let java_comment_strings=1
let java_highlight_functions=1
let java_highlight_java_lang_ids=1Using vim-java

vim-javafor the core language
Javascript

vim-javascriptfor the core
languagevim-javascript-lib, for
popular Javascript libraries, like underscore
and Backbone.
Conflicts with Javascript
cSyntaxAfterconflicts on
many operator groups.
Go

vim-gofor the core languageYou will need at least the following configuration for proper color
support:let g:go_highlight_format_strings = 1 let g:go_highlight_function_arguments = 1 let g:go_highlight_function_calls = 1 let g:go_highlight_functions = 1 let g:go_highlight_operators = 1 let g:go_highlight_types = 1
The following are also provided as options by `vim-go` and are handled
gracefully:
let g:go_highlight_extra_types = 1
let g:go_highlight_fields = 1
let g:go_highlight_generate_tags = 1
let g:go_highlight_variable_assignments = 1
let g:go_highlight_variable_declarations = 1This should cover all options provided by `vim-go` pertaining to
highlighting. If you notice that this is out-of-date, please submit a PR!
PHP

StanAngeloff/php.vimfor the
core languageYou will need at least the following configuration for proper color
support:let g:php_var_selector_is_identifier = 1
Other Screenshots
HTML
