1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-23 13:10:04 +08:00

Fix unite mappings

This commit is contained in:
wsdjeg 2017-02-03 22:41:04 +08:00
parent 8af6f587d0
commit cda56afc8e
4 changed files with 57 additions and 33 deletions

View File

@ -366,6 +366,9 @@ Name | Description
Key | Mode | Action Key | Mode | Action
----- |:----:| ------------------ ----- |:----:| ------------------
`<leader>`+`y` | visual | Copy selection to X11 clipboard ("+y) `<leader>`+`y` | visual | Copy selection to X11 clipboard ("+y)
`Ctrl`+`c` | Normal | Copy full path of current buffer to X11 clipboard
`<leader>`+`Ctrl`+`c` | Normal | Copy github.com url of current buffer to X11 clipboard(if it is a github repo)
`<leader>`+`Ctrl`+`l` | Normal/visual | Copy github.com url of current lines to X11 clipboard(if it is a github repo)
`<leader>`+`p` | Normal/visual | Paste selection from X11 clipboard ("+p) `<leader>`+`p` | Normal/visual | Paste selection from X11 clipboard ("+p)
`Ctrl`+`f` | Normal | Smart page forward (C-f/C-d) `Ctrl`+`f` | Normal | Smart page forward (C-f/C-d)
`Ctrl`+`b` | Normal | Smart page backwards (C-b/C-u) `Ctrl`+`b` | Normal | Smart page backwards (C-b/C-u)
@ -442,27 +445,31 @@ Key | Mode | Action
Key | Mode | Action Key | Mode | Action
----- |:----:| ------------------ ----- |:----:| ------------------
`;`+`r` | Normal | Resumes Unite window `[unite]` | Normal | unite leader, default is `f`, `:h g:spacevim_unite_leader`
`;`+`f` | Normal | Opens Unite file recursive search `[unite]`+`r` | Normal | Resumes Unite window
`;`+`i` | Normal | Opens Unite git file search `[unite]`+`f` | Normal | Opens Unite file recursive search
`;`+`g` | Normal | Opens Unite grep with ag (the_silver_searcher) `[unite]`+`i` | Normal | Opens Unite git file search
`;`+`u` | Normal | Opens Unite source `[unite]`+`g` | Normal | Opens Unite grep with ag (the_silver_searcher)
`;`+`t` | Normal | Opens Unite tag `[unite]`+`u` | Normal | Opens Unite source
`;`+`T` | Normal | Opens Unite tag/include `[unite]`+`t` | Normal | Opens Unite tag
`;`+`l` | Normal | Opens Unite location list `[unite]`+`T` | Normal | Opens Unite tag/include
`;`+`q` | Normal | Opens Unite quick fix `[unite]`+`l` | Normal | Opens Unite location list
`;`+`e` | Normal | Opens Unite register `[unite]`+`q` | Normal | Opens Unite quick fix
`;`+`j` | Normal | Opens Unite jump, change `[unite]`+`e` | Normal | Opens Unite register
`;`+`h` | Normal | Opens Unite history/yank `[unite]`+`j` | Normal | Opens Unite jump, change
`;`+`s` | Normal | Opens Unite session `[unite]`+`h` | Normal | Opens Unite history/yank
`;`+`o` | Normal | Opens Unite outline `[unite]`+`s` | Normal | Opens Unite session
`;`+`ma` | Normal | Opens Unite mapping `[unite]`+`n` | Normal | Opens Unite session/new
`;`+`me` | Normal | Opens Unite output messages `[unite]`+`o` | Normal | Opens Unite outline
`<leader>`+`b` | Normal | Opens Unite buffers, mru, bookmark `[unite]`+`c` | Normal | Opens Unite buffer bookmark file in current directory
`[unite]`+`b` | Normal | Opens Unite buffer bookmark file in buffer directory
`[unite]`+`ma` | Normal | Opens Unite mapping
`[unite]`+`<space>` | Normal | Opens Unite menu:CustomKeyMaps
`[unite]`+`me` | Normal | Opens Unite output messages
`<leader>`+`bl` | Normal | Opens Unite buffers, mru, bookmark
`<leader>`+`ta` | Normal | Opens Unite tab `<leader>`+`ta` | Normal | Opens Unite tab
`<leader>`+`gf` | Normal | Opens Unite file with word at cursor `<leader>`+`ugf` | Normal | Opens Unite file with word at cursor
`<leader>`+`gt` | Normal/visual | Opens Unite tag with word at cursor `<leader>`+`ugt` | Normal/visual | Opens Unite tag with word at cursor
`<leader>`+`gg` | Visual | Opens Unite navigate with word at cursor
| **Within _Unite_ buffers** ||| | **Within _Unite_ buffers** |||
`Ctrl`+`h/k/l/r` | Normal | Un-map `Ctrl`+`h/k/l/r` | Normal | Un-map
`Ctrl`+`r` | Normal | Redraw `Ctrl`+`r` | Normal | Redraw

View File

@ -5,7 +5,7 @@ function! SpaceVim#layers#tools#plugins() abort
\ ['wsdjeg/SourceCounter.vim', { 'on_cmd' : 'SourceCounter'}], \ ['wsdjeg/SourceCounter.vim', { 'on_cmd' : 'SourceCounter'}],
\ ['junegunn/goyo.vim', { 'on_cmd' : 'Goyo', 'loadconf' : 1}], \ ['junegunn/goyo.vim', { 'on_cmd' : 'Goyo', 'loadconf' : 1}],
\ ['junegunn/limelight.vim', { 'on_cmd' : 'Limelight'}], \ ['junegunn/limelight.vim', { 'on_cmd' : 'Limelight'}],
\ ['Yggdroot/LeaderF', {'merged' : 0}], \ ['Yggdroot/LeaderF', {'merged' : 0, 'on_cmd' : 'LeaderF'}],
\ ['MattesGroeger/vim-bookmarks', { 'on_map' : '<Plug>Bookmark', 'loadconf_before' : 1}], \ ['MattesGroeger/vim-bookmarks', { 'on_map' : '<Plug>Bookmark', 'loadconf_before' : 1}],
\ ['google/vim-searchindex'], \ ['google/vim-searchindex'],
\ ['simnalamburt/vim-mundo', { 'on_cmd' : 'MundoToggle'}], \ ['simnalamburt/vim-mundo', { 'on_cmd' : 'MundoToggle'}],

View File

@ -21,22 +21,36 @@ function! SpaceVim#mapping#leader#defindUniteLeader(key) abort
" The prefix key. " The prefix key.
nnoremap [unite] <Nop> nnoremap [unite] <Nop>
exe 'nmap ' .a:key . ' [unite]' exe 'nmap ' .a:key . ' [unite]'
nnoremap <silent> [unite]c :<C-u>UniteWithCurrentDir nnoremap <silent> [unite]r
\ -buffer-name=files buffer bookmark file<CR>
nnoremap <silent> [unite]b :<C-u>UniteWithBufferDir
\ -buffer-name=files -prompt=%\ buffer bookmark file<CR>
nnoremap <silent> [unite]r :<C-u>Unite
\ -buffer-name=register register<CR>
nnoremap <silent> [unite]o :<C-u>Unite -buffer-name=outline -start-insert -auto-preview -split outline<CR>
nnoremap <silent> [unite]s :<C-u>Unite session<CR>
nnoremap <silent> [unite]n :<C-u>Unite session/new<CR>
nnoremap <silent> [unite]fr
\ :<C-u>Unite -buffer-name=resume resume<CR> \ :<C-u>Unite -buffer-name=resume resume<CR>
if has('nvim')
nnoremap <silent> [unite]f :<C-u>Unite file_rec/neovim<cr>
else
nnoremap <silent> [unite]f :<C-u>Unite file_rec/async<cr>
endif
nnoremap <silent> [unite]i :<C-u>Unite file_rec/git<cr>
nnoremap <silent> [unite]g :<C-u>Unite grep<cr>
nnoremap <silent> [unite]u :<C-u>Unite source<CR>
nnoremap <silent> [unite]t :<C-u>Unite tag<CR>
nnoremap <silent> [unite]T :<C-u>Unite tag/include<CR>
nnoremap <silent> [unite]l :<C-u>Unite locationlist<CR>
nnoremap <silent> [unite]q :<C-u>Unite quickfix<CR>
nnoremap <silent> [unite]e :<C-u>Unite
\ -buffer-name=register register<CR>
nnoremap <silent> [unite]j :<C-u>Unite jump<CR>
nnoremap <silent> [unite]h :<C-u>Unite history/yank<CR>
nnoremap <silent> [unite]s :<C-u>Unite session<CR>
nnoremap <silent> [unite]o :<C-u>Unite -buffer-name=outline -start-insert -auto-preview -split outline<CR>
nnoremap <silent> [unite]ma nnoremap <silent> [unite]ma
\ :<C-u>Unite mapping<CR> \ :<C-u>Unite mapping<CR>
nnoremap <silent> [unite]me nnoremap <silent> [unite]me
\ :<C-u>Unite output:message<CR> \ :<C-u>Unite output:message<CR>
nnoremap [unite]f :<C-u>Unite source<CR>
nnoremap <silent> [unite]c :<C-u>UniteWithCurrentDir
\ -buffer-name=files buffer bookmark file<CR>
nnoremap <silent> [unite]b :<C-u>UniteWithBufferDir
\ -buffer-name=files -prompt=%\ buffer bookmark file<CR>
nnoremap <silent> [unite]n :<C-u>Unite session/new<CR>
nnoremap <silent> [unite]w nnoremap <silent> [unite]w
\ :<C-u>Unite -buffer-name=files -no-split \ :<C-u>Unite -buffer-name=files -no-split
\ jump_point file_point buffer_tab \ jump_point file_point buffer_tab

View File

@ -219,6 +219,7 @@ noremap <silent><leader>vf :Unite -auto-preview -no-split grep:%::<C-r><C-w><CR>
""" For searching the word in the cursor in all opened buffer """ For searching the word in the cursor in all opened buffer
noremap <silent><leader>va :Unite -auto-preview -no-split grep:$buffers::<C-r><C-w><CR> noremap <silent><leader>va :Unite -auto-preview -no-split grep:$buffers::<C-r><C-w><CR>
nnoremap <silent><Leader>bl :<C-u>Unite -start-insert -buffer-name=buffer buffer<cr> nnoremap <silent><Leader>bl :<C-u>Unite -start-insert -buffer-name=buffer buffer<cr>
nnoremap <silent><Leader>ta :<C-u>Unite -start-insert -buffer-name=tag tag<cr>
"" outline "" outline
nnoremap <silent><leader>o :<C-u>Unite -buffer-name=outline -start-insert -auto-preview -no-split outline<cr> nnoremap <silent><leader>o :<C-u>Unite -buffer-name=outline -start-insert -auto-preview -no-split outline<cr>
"" Line search "" Line search
@ -228,7 +229,9 @@ nnoremap <silent><leader>y :<C-u>Unite -no-split -buffer-name=yank history/yank<
" search plugin " search plugin
" :Unite neobundle/search " :Unite neobundle/search
"for Unite menu{ "for Unite menu{
nnoremap <silent><leader>ug :Unite -silent -start-insert menu:git<CR> nnoremap <silent><leader>ugg :Unite -silent -start-insert menu:git<CR>
nnoremap <silent><leader>ugf :UniteWithCursorWord file_rec/async<CR>
nnoremap <silent><leader>ugt :UniteWithCursorWord tag<CR>
nnoremap <silent><Leader>ls :Unite -silent -ignorecase -winheight=17 -start-insert menu:MyStarredrepos<CR> nnoremap <silent><Leader>ls :Unite -silent -ignorecase -winheight=17 -start-insert menu:MyStarredrepos<CR>
nnoremap <silent><Leader>lm :Unite -silent -ignorecase -winheight=17 -start-insert menu:MpvPlayer<CR> nnoremap <silent><Leader>lm :Unite -silent -ignorecase -winheight=17 -start-insert menu:MpvPlayer<CR>
call zvim#util#loadMusics() call zvim#util#loadMusics()