mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-03 01:00:05 +08:00
Improve leaderf layer (#1498)
This commit is contained in:
parent
791ec8e72d
commit
deadfeffb2
@ -8,7 +8,7 @@
|
||||
|
||||
function! SpaceVim#layers#ctrlp#plugins() abort
|
||||
let plugins = [
|
||||
\ ['ctrlpvim/ctrlp.vim', {'loadconf' : 1}],
|
||||
\ ['ctrlpvim/ctrlp.vim', {'loadconf' : 1, 'merged' : 0}],
|
||||
\ ['FelikZ/ctrlp-py-matcher'],
|
||||
\ ['mattn/ctrlp-register', {'on_cmd' : 'CtrlPRegister'}],
|
||||
\ ['DeaR/ctrlp-jumps', {'on_cmd' : 'CtrlPJump'}],
|
||||
|
@ -10,9 +10,36 @@
|
||||
function! SpaceVim#layers#leaderf#plugins() abort
|
||||
let plugins = []
|
||||
call add(plugins,
|
||||
\ ['Yggdroot/LeaderF', { 'on_cmd' : 'LeaderfFile',
|
||||
\ ['Yggdroot/LeaderF', { 'on_cmd' :
|
||||
\ [
|
||||
\ 'LeaderfFile',
|
||||
\ 'LeaderfColorscheme',
|
||||
\ ],
|
||||
\ 'loadconf' : 1,
|
||||
\ 'merged' : 0}])
|
||||
return plugins
|
||||
endfunction
|
||||
|
||||
|
||||
function! SpaceVim#layers#leaderf#config() abort
|
||||
call SpaceVim#mapping#space#def('nnoremap', ['j', 'i'], 'Denite outline', 'jump to a definition in buffer', 1)
|
||||
nnoremap <silent> <C-p> :LeaderfFile<cr>
|
||||
call SpaceVim#mapping#space#def('nnoremap', ['T', 's'], 'LeaderfColorscheme', 'fuzzy find colorschemes', 1)
|
||||
let g:_spacevim_mappings.f = {'name' : '+Fuzzy Finder'}
|
||||
call s:defind_fuzzy_finder()
|
||||
endfunction
|
||||
|
||||
let s:file = expand('<sfile>:~')
|
||||
let s:unite_lnum = expand('<slnum>') + 3
|
||||
function! s:defind_fuzzy_finder() abort
|
||||
nnoremap <silent> <Leader>fo :<C-u>LeaderfFunction<CR>
|
||||
let lnum = expand('<slnum>') + s:unite_lnum - 4
|
||||
let g:_spacevim_mappings.f.o = ['LeaderfFunction',
|
||||
\ 'fuzzy find outline',
|
||||
\ [
|
||||
\ '[Leader f o] is to fuzzy find outline',
|
||||
\ '',
|
||||
\ 'Definition: ' . s:file . ':' . lnum,
|
||||
\ ]
|
||||
\ ]
|
||||
endfunction
|
||||
|
@ -16,7 +16,6 @@ This layer is a heavily customized warpper for ctrlp.
|
||||
| -------------------- | ----------------------------- |
|
||||
| `<Leader> f <space>` | Fuzzy find menu:CustomKeyMaps |
|
||||
| `<Leader> f e` | Fuzzy find register |
|
||||
| `<Leader> f f` | Fuzzy find file |
|
||||
| `<Leader> f h` | Fuzzy find history/yank |
|
||||
| `<Leader> f j` | Fuzzy find jump, change |
|
||||
| `<Leader> f l` | Fuzzy find location list |
|
||||
|
@ -20,7 +20,6 @@ SpaceVim use `F` as the default customized key bindings prefix for denite layer.
|
||||
| -------------------- | ----------------------------- |
|
||||
| `<Leader> f <space>` | Fuzzy find menu:CustomKeyMaps |
|
||||
| `<Leader> f e` | Fuzzy find register |
|
||||
| `<Leader> f f` | Fuzzy find file |
|
||||
| `<Leader> f h` | Fuzzy find history/yank |
|
||||
| `<Leader> f j` | Fuzzy find jump, change |
|
||||
| `<Leader> f l` | Fuzzy find location list |
|
||||
|
@ -16,7 +16,6 @@ This layer is a heavily customized warpper for fzf.
|
||||
| -------------------- | ----------------------------- |
|
||||
| `<Leader> f <space>` | Fuzzy find menu:CustomKeyMaps |
|
||||
| `<Leader> f e` | Fuzzy find register |
|
||||
| `<Leader> f f` | Fuzzy find file |
|
||||
| `<Leader> f h` | Fuzzy find history/yank |
|
||||
| `<Leader> f j` | Fuzzy find jump, change |
|
||||
| `<Leader> f l` | Fuzzy find location list |
|
||||
|
29
docs/layers/leaderf.md
Normal file
29
docs/layers/leaderf.md
Normal file
@ -0,0 +1,29 @@
|
||||
---
|
||||
title: "SpaceVim leaderf layer"
|
||||
description: "This layers provide a heavily customized LeaderF centric work-flow"
|
||||
---
|
||||
|
||||
# [SpaceVim Layers:](https://spacevim.org/layers) denite
|
||||
|
||||
## Intro
|
||||
|
||||
This layer is a heavily customized warpper for LeaderF and it's sources.
|
||||
|
||||
|
||||
## Configuration
|
||||
|
||||
SpaceVim use `F` as the default customized key bindings prefix for denite layer.
|
||||
|
||||
## Key bindings
|
||||
|
||||
| Key bindings | Discription |
|
||||
| -------------------- | ----------------------------- |
|
||||
| `<Leader> f <space>` | Fuzzy find menu:CustomKeyMaps |
|
||||
| `<Leader> f e` | Fuzzy find register |
|
||||
| `<Leader> f h` | Fuzzy find history/yank |
|
||||
| `<Leader> f j` | Fuzzy find jump, change |
|
||||
| `<Leader> f l` | Fuzzy find location list |
|
||||
| `<Leader> f m` | Fuzzy find output messages |
|
||||
| `<Leader> f o` | Fuzzy find outline |
|
||||
| `<Leader> f q` | Fuzzy find quick fix |
|
||||
| `<Leader> f r` | Resumes Unite window |
|
@ -19,7 +19,6 @@ This is a fuzzy finder layer for SpaceVim, and it is based on unite.vim. In Spac
|
||||
| -------------------- | ----------------------------- |
|
||||
| `<Leader> f <space>` | Fuzzy find menu:CustomKeyMaps |
|
||||
| `<Leader> f e` | Fuzzy find register |
|
||||
| `<Leader> f f` | Fuzzy find file |
|
||||
| `<Leader> f h` | Fuzzy find history/yank |
|
||||
| `<Leader> f j` | Fuzzy find jump, change |
|
||||
| `<Leader> f l` | Fuzzy find location list |
|
||||
|
Loading…
Reference in New Issue
Block a user