Realcolors


Ⅰ. 插件描述

Utilities for tweaking and creating 24-bit true color schemes for Vim at runtime

Ⅱ. 基本信息

创建日期:  2018-01-26
使用用户:  0
Github星:  0
插件作者:  Renato Fabbri

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin '/realcolors'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

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

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle '/realcolors'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug '/realcolors'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone 

Ⅳ. 文档说明

THIS IS A VERY PRELIMINARY RELEASE TO UNDERSTAND vim.org
AND START SHARING SOME ROUTINES

FORECAST: I should upload a more organized version in a couple of hours
or few days (max).
(these are scripts I and only I am using)

Context

Realcolors is a plugin to help you tweak and create color schemes.
This is useful for a number of reasons:

  • Colors influence how well you perform is different tasts [1].
  • There seems to be no serious study of using color palletes for syntax highlighting [2].
  • Each person has a unique sensibility and tolerance to the colors (e.g. red, blue...) [3].
  • Different contexts entail different color characteristics that are more suitable [3]. E.g. if you are presenting code you might want a more pleasant combination whereas if you are coding for many hours, you might want more stimulant color characteristics. If you are just skimming though files to know their content, you might want a color scheme that makes the content very evident.
  • One might want to experiment with the coloring possibilities.
  • One might want to create color schemes for private use or for sharing with others.
  • One might want to tweak favorite color schemes to fit their taste and/or achieve a greater clarity.

color on cognitive task performances. Science, 323(5918), 1226-1229.)

Please visit the repository: https://github.com/ttm/vim
specially the plugin and plugin/realcolors/ directories.

Functionalities

The following functionalities are implemented (you might need to start
Realcolors with <C-/>i as explained below):

  • Change the Foreground and/or Background colors of the char under cursor:
    <C-/>c
  • Get the name of the syntax groups related to the char under cursor
    (these groups are related to colors, bold and underline):

<C-/>s

  • Make a detailed windows with the colors defined for your Vim,
  1. your default colors (related to the Normal syntax group),

with:
<C-/>ww, <C-/>w1, <C-/>w2 or <C-/>w3,

  • Start/Restart your coloring scheme with:
    <C-/>i or <C-/>I

(the last reloads configuration scripts before restartin realcolors
with:
noremap <C->I :w<CR>:runtime */.vim<CR>:call InitializeColors()<CR><CR>

  • Load a number of color schemes with the ApplyCS function
    (after initialization with the command above).

Choose any XX color scheme in keys(ccs), then
:call ApplyCS(ccs.XX, 'c')

Other functionalities are skeched in the realcolor Vim files.
See realcolors/mappings.vim and the other files for a complete
overview.
Add new color schemes to the functions in realcolors/cs.vim

Further information

The following articles might help one to grasp and tweak
the Realcolors plugin:

  • "An anthropological account of the Vim text editor: features and
       tweaks after 10 years of usage": https://arxiv.org/abs/1712.06933
  • "Basic concepts and tools for the Toki Pona minimalist and
       constructed language: Wordnet synsets; analysis of the vocabulary;

   synthesis and syntax highlighting of texts": https://arxiv.org/abs/1712.09359

== A word about 24 bit true color ==

This plugins relies in using 24 bit true color (each color defined by
8 bits, i.e. in [0,255] or [00,ff].
As far as I know, gVim uses true color by default.
In terminal Vim (which I use) I achieve true color by setting:
set termguicolors
in my vimrc.
Because I also use Byobu (screen) I also had to put these lines
in the vimrc:
let &t_8f = "<Esc>[38;2;%lu;%lu;%lum"
let &t_8b = "<Esc>[48;2;%lu;%lu;%lum"

Acknowledgements

This work is sponsored by FAPESP (project 2017/05838-3) in a project lead by
Profa. Dra. Maria Cristina Ferreira de Oliveira at VICG/ICMC/USP, São Carlos, Brazil.

添加新评论