mirror of
https://github.com/junegunn/limelight.vim.git
synced 2025-11-19 00:53:40 -05:00
I changed the part about the issue where Limelight is not be able to calculate the color, to make it clearer what we are suppose to do to fix the issue when it happen, avoiding the confusion of how do i "define it" where do i "define it" "which part of this code fix the issue ?" i tried to answer those question to the best of my ability, also making clear that the example are individual line example.
89 lines
2.3 KiB
Markdown
89 lines
2.3 KiB
Markdown
limelight.vim 
|
|
=============
|
|
|
|
Hyperfocus-writing in Vim.
|
|
|
|

|
|
|
|
Best served with [Goyo.vim](https://github.com/junegunn/goyo.vim).
|
|
Works on 256-color terminal or on GVim.
|
|
|
|
Usage
|
|
-----
|
|
|
|
- `Limelight [0.0 ~ 1.0]`
|
|
- Turn Limelight on
|
|
- `Limelight!`
|
|
- Turn Limelight off
|
|
- `Limelight!! [0.0 ~ 1.0]`
|
|
- Toggle Limelight
|
|
|
|
### Limelight for a selected range
|
|
|
|
You can invoke `:Limelight` for a visual range. There are also `<Plug>`
|
|
mappings for normal and visual mode for the purpose.
|
|
|
|
```vim
|
|
nmap <Leader>l <Plug>(Limelight)
|
|
xmap <Leader>l <Plug>(Limelight)
|
|
```
|
|
|
|
### Options
|
|
|
|
For some color schemes, Limelight may not be able to calculate the color for
|
|
dimming down the surrounding paragraphs. In that case, you need to define it manually
|
|
in your .vimrc file. you can do so by adding `g:limelight_conceal_ctermfg=` or `g:limelight_conceal_guifg=`
|
|
followed by the clor of your choosing. (To see the available color for each you can type ":help cterm-colors" or ":help gui-colors".)
|
|
|
|
Here's some line examples of what it should look like, but feel free to change the color name to suite your needs.
|
|
|
|
```vim
|
|
" Color name (:help cterm-colors) or ANSI code
|
|
let g:limelight_conceal_ctermfg = 'gray'
|
|
" Or
|
|
let g:limelight_conceal_ctermfg = 240
|
|
|
|
|
|
" Color name (:help gui-colors) or RGB color
|
|
let g:limelight_conceal_guifg = 'DarkGray'
|
|
" Or
|
|
let g:limelight_conceal_guifg = '#777777'
|
|
|
|
"Some other example of line you might whant to try --->
|
|
|
|
" Default: 0.5
|
|
let g:limelight_default_coefficient = 0.7
|
|
|
|
" Number of preceding/following paragraphs to include (default: 0)
|
|
let g:limelight_paragraph_span = 1
|
|
|
|
" Beginning/end of paragraph
|
|
" When there's no empty line between the paragraphs
|
|
" and each paragraph starts with indentation
|
|
let g:limelight_bop = '^\s'
|
|
let g:limelight_eop = '\ze\n^\s'
|
|
|
|
" Highlighting priority (default: 10)
|
|
" Set it to -1 not to overrule hlsearch
|
|
let g:limelight_priority = -1
|
|
```
|
|
|
|
Goyo.vim integration
|
|
--------------------
|
|
|
|
```vim
|
|
autocmd! User GoyoEnter Limelight
|
|
autocmd! User GoyoLeave Limelight!
|
|
```
|
|
|
|
Acknowledgement
|
|
---------------
|
|
|
|
Thanks to [@Cutuchiqueno](https://github.com/Cutuchiqueno) for [suggesting
|
|
the idea](https://github.com/junegunn/goyo.vim/issues/34).
|
|
|
|
License
|
|
-------
|
|
|
|
MIT
|