mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-04-13 13:29:11 +08:00
Update ctrlp layer (#1503)
This commit is contained in:
parent
f993796d6e
commit
791ec8e72d
@ -7,32 +7,68 @@
|
||||
"=============================================================================
|
||||
|
||||
function! SpaceVim#layers#ctrlp#plugins() abort
|
||||
let plugins = [
|
||||
\ ['ctrlpvim/ctrlp.vim', {'loadconf' : 1}],
|
||||
\ ['voronkovich/ctrlp-nerdtree.vim', { 'on_cmd' : 'CtrlPNerdTree'}],
|
||||
\ ['h14i/vim-ctrlp-buftab', { 'on_cmd' : 'CtrlPBufTab'}],
|
||||
\ ['vim-scripts/ctrlp-cmdpalette', { 'on_cmd' : 'CtrlPCmdPalette'}],
|
||||
\ ['mattn/ctrlp-windowselector', { 'on_cmd' : 'CtrlPWindowSelector'}],
|
||||
\ ['the9ball/ctrlp-gtags', { 'on_cmd' : ['CtrlPGtagsX','CtrlPGtagsF','CtrlPGtagsR']}],
|
||||
\ ['thiderman/ctrlp-project', { 'on_cmd' : 'CtrlPProject'}],
|
||||
\ ['mattn/ctrlp-google', { 'on_cmd' : 'CtrlPGoogle'}],
|
||||
\ ['ompugao/ctrlp-history', { 'on_cmd' : ['CtrlPCmdHistory','CtrlPSearchHistory']}],
|
||||
\ ['pielgrzym/ctrlp-sessions', { 'on_cmd' : ['CtrlPSessions','MkS']}],
|
||||
\ ['tacahiroy/ctrlp-funky', { 'on_cmd' : 'CtrlPFunky'}],
|
||||
\ ['mattn/ctrlp-launcher', { 'on_cmd' : 'CtrlPLauncher'}],
|
||||
\ ['sgur/ctrlp-extensions.vim', { 'on_cmd' : ['CtrlPCmdline','CtrlPMenu','CtrlPYankring']}],
|
||||
\ ['FelikZ/ctrlp-py-matcher'],
|
||||
\ ['mattn/ctrlp-register'],
|
||||
\ ['lambdalisue/vim-gista-ctrlp', { 'on_cmd' : 'CtrlPGista'}],
|
||||
\ ['elentok/ctrlp-objects.vim', { 'on_cmd' : [
|
||||
\'CtrlPModels',
|
||||
\'CtrlPViews',
|
||||
\'CtrlPControllers',
|
||||
\'CtrlPTemplates',
|
||||
\'CtrlPPresenters']}],
|
||||
\ ]
|
||||
if !has('nvim')
|
||||
call add(plugins, ['wsdjeg/ctrlp-unity3d-docs', { 'on_cmd' : 'CtrlPUnity3DDocs'}])
|
||||
endif
|
||||
return plugins
|
||||
let plugins = [
|
||||
\ ['ctrlpvim/ctrlp.vim', {'loadconf' : 1}],
|
||||
\ ['FelikZ/ctrlp-py-matcher'],
|
||||
\ ['mattn/ctrlp-register', {'on_cmd' : 'CtrlPRegister'}],
|
||||
\ ['DeaR/ctrlp-jumps', {'on_cmd' : 'CtrlPJump'}],
|
||||
\ ]
|
||||
return plugins
|
||||
endfunction
|
||||
|
||||
function! SpaceVim#layers#ctrlp#config() abort
|
||||
call SpaceVim#mapping#space#def('nnoremap', ['j', 'i'], 'Denite outline', 'jump to a definition in buffer', 1)
|
||||
" This is definded in plugin config
|
||||
" nnoremap <silent> <C-p> :Ctrlp<cr>
|
||||
call SpaceVim#mapping#space#def('nnoremap', ['T', 's'], 'Denite colorscheme', '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>fe
|
||||
\ :<C-u>CtrlPRegister<CR>
|
||||
let lnum = expand('<slnum>') + s:unite_lnum - 4
|
||||
let g:_spacevim_mappings.f.e = ['CtrlPRegister',
|
||||
\ 'fuzzy find registers',
|
||||
\ [
|
||||
\ '[Leader f r ] is to resume unite window',
|
||||
\ '',
|
||||
\ 'Definition: ' . s:file . ':' . lnum,
|
||||
\ ]
|
||||
\ ]
|
||||
nnoremap <silent> <Leader>fj
|
||||
\ :<C-u>CtrlPJump<CR>
|
||||
let lnum = expand('<slnum>') + s:unite_lnum - 4
|
||||
let g:_spacevim_mappings.f.j = ['CtrlPJump',
|
||||
\ 'fuzzy find jump list',
|
||||
\ [
|
||||
\ '[Leader f j] is to fuzzy find jump list',
|
||||
\ '',
|
||||
\ 'Definition: ' . s:file . ':' . lnum,
|
||||
\ ]
|
||||
\ ]
|
||||
nnoremap <silent> <Leader>fq
|
||||
\ :<C-u>CtrlPQuickfix<CR>
|
||||
let lnum = expand('<slnum>') + s:unite_lnum - 4
|
||||
let g:_spacevim_mappings.f.q = ['CtrlPQuickfix',
|
||||
\ 'fuzzy find quickfix list',
|
||||
\ [
|
||||
\ '[Leader f q] is to fuzzy find quickfix list',
|
||||
\ '',
|
||||
\ 'Definition: ' . s:file . ':' . lnum,
|
||||
\ ]
|
||||
\ ]
|
||||
nnoremap <silent> <Leader>fo :<C-u>CtrlPBufTag<CR>
|
||||
let lnum = expand('<slnum>') + s:unite_lnum - 4
|
||||
let g:_spacevim_mappings.f.o = ['CtrlPBufTag',
|
||||
\ 'fuzzy find outline',
|
||||
\ [
|
||||
\ '[Leader f o] is to fuzzy find outline',
|
||||
\ '',
|
||||
\ 'Definition: ' . s:file . ':' . lnum,
|
||||
\ ]
|
||||
\ ]
|
||||
endfunction
|
||||
|
@ -1,12 +1,26 @@
|
||||
---
|
||||
title: "SpaceVim ctrlp layer"
|
||||
description: "This layers adds extensive support for git"
|
||||
description: "This layers provide a heavily customized ctrlp centric work-flow"
|
||||
---
|
||||
|
||||
# [SpaceVim Layers:](https://spacevim.org/layers) ctrlp
|
||||
|
||||
## Intro
|
||||
|
||||
This layer is a heavily customized warpper for ctrlp, This layer is enabled by default when your vim do not compiled with `+py` feature.
|
||||
This layer is a heavily customized warpper for ctrlp.
|
||||
|
||||
|
||||
## Key bindings
|
||||
|
||||
| Key bindings | Discription |
|
||||
| -------------------- | ----------------------------- |
|
||||
| `<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 |
|
||||
| `<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 |
|
||||
|
@ -1,14 +1,17 @@
|
||||
This is the project layout of SpaceVim org:
|
||||
|
||||
| Repo name | Description |
|
||||
| ----------------------------------------------------------------------- | ---------------------------------------- |
|
||||
| [SpaceVim/SpaceVim](https://github.com/SpaceVim/SpaceVim) | SpaceVim main repo |
|
||||
| [SpaceVim/unite-ctags](https://github.com/SpaceVim/unite-ctags) | A fork of voi/unite-ctags |
|
||||
| [SpaceVim/gtags.vim](https://github.com/SpaceVim/gtags.vim) | SpaceVim tags layer: gtags.vim |
|
||||
| [SpaceVim/cscope.vim](https://github.com/SpaceVim/cscope.vim) | A cscope plugin for vim/neovim |
|
||||
| [SpaceVim/vim-swig](https://github.com/SpaceVim/vim-swig) | Swig vim syntax highlighting |
|
||||
| [SpaceVim/vim-luacomplete](https://github.com/SpaceVim/vim-luacomplete) | lua complete plugin for vim |
|
||||
| [SpaceVim/unite-unicode](https://github.com/SpaceVim/unite-unicode) | Unite.vim plugin to insert unicode gyphs |
|
||||
| Repo name | Description |
|
||||
| ------------------------------------------------------------------------- | ---------------------------------------- |
|
||||
| [SpaceVim/SpaceVim](https://github.com/SpaceVim/SpaceVim) | SpaceVim main repo |
|
||||
| [SpaceVim/Ctrlp-extensions](https://github.com/SpaceVim/Ctrlp-extensions) | Ctrlp extensions used in ctrlp layer |
|
||||
| [SpaceVim/Unite-sources](https://github.com/SpaceVim/Unite-sources) | Unite sources used in unite layer |
|
||||
| [SpaceVim/Denite-sources](https://github.com/SpaceVim/Denite-sources) | Denite sources used in denite layer |
|
||||
| [SpaceVim/unite-ctags](https://github.com/SpaceVim/unite-ctags) | A fork of voi/unite-ctags |
|
||||
| [SpaceVim/gtags.vim](https://github.com/SpaceVim/gtags.vim) | SpaceVim tags layer: gtags.vim |
|
||||
| [SpaceVim/cscope.vim](https://github.com/SpaceVim/cscope.vim) | A cscope plugin for vim/neovim |
|
||||
| [SpaceVim/vim-swig](https://github.com/SpaceVim/vim-swig) | Swig vim syntax highlighting |
|
||||
| [SpaceVim/vim-luacomplete](https://github.com/SpaceVim/vim-luacomplete) | lua complete plugin for vim |
|
||||
| [SpaceVim/unite-unicode](https://github.com/SpaceVim/unite-unicode) | Unite.vim plugin to insert unicode gyphs |
|
||||
|
||||
In the main repo, the layout is:
|
||||
|
||||
@ -21,4 +24,3 @@ In the main repo, the layout is:
|
||||
├─ wiki/ wiki
|
||||
├─ bin/ executeable
|
||||
└─ test/ tests
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user