mirror of
https://github.com/junegunn/limelight.vim.git
synced 2025-11-17 15:33:38 -05:00
Add <Plug> mappings for highlighting fixed range
This commit is contained in:
10
README.md
10
README.md
@@ -18,7 +18,15 @@ Usage
|
||||
- `Limelight!! [0.0 ~ 1.0]`
|
||||
- Toggle Limelight
|
||||
|
||||
You can also invoke `:Limelight` for a visual range.
|
||||
### 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
|
||||
|
||||
|
||||
@@ -266,6 +266,10 @@ function! limelight#execute(bang, visual, ...) range
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! limelight#operator(...)
|
||||
'[,']call limelight#execute(0, 1)
|
||||
endfunction
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
|
||||
@@ -23,3 +23,5 @@
|
||||
|
||||
command! -nargs=? -bar -bang -range Limelight <line1>,<line2>call limelight#execute(<bang>0, <count> > 0, <f-args>)
|
||||
|
||||
nnoremap <silent> <Plug>(Limelight) :set opfunc=limelight#operator<CR>g@
|
||||
xnoremap <silent> <Plug>(Limelight) :Limelight<CR>
|
||||
|
||||
Reference in New Issue
Block a user