diff --git a/README.md b/README.md index b4a1f1239..79c964c72 100644 --- a/README.md +++ b/README.md @@ -366,6 +366,9 @@ Name | Description Key | Mode | Action ----- |:----:| ------------------ ``+`y` | visual | Copy selection to X11 clipboard ("+y) +`Ctrl`+`c` | Normal | Copy full path of current buffer to X11 clipboard +``+`Ctrl`+`c` | Normal | Copy github.com url of current buffer to X11 clipboard(if it is a github repo) +``+`Ctrl`+`l` | Normal/visual | Copy github.com url of current lines to X11 clipboard(if it is a github repo) ``+`p` | Normal/visual | Paste selection from X11 clipboard ("+p) `Ctrl`+`f` | Normal | Smart page forward (C-f/C-d) `Ctrl`+`b` | Normal | Smart page backwards (C-b/C-u) @@ -442,27 +445,31 @@ Key | Mode | Action Key | Mode | Action ----- |:----:| ------------------ -`;`+`r` | Normal | Resumes Unite window -`;`+`f` | Normal | Opens Unite file recursive search -`;`+`i` | Normal | Opens Unite git file search -`;`+`g` | Normal | Opens Unite grep with ag (the_silver_searcher) -`;`+`u` | Normal | Opens Unite source -`;`+`t` | Normal | Opens Unite tag -`;`+`T` | Normal | Opens Unite tag/include -`;`+`l` | Normal | Opens Unite location list -`;`+`q` | Normal | Opens Unite quick fix -`;`+`e` | Normal | Opens Unite register -`;`+`j` | Normal | Opens Unite jump, change -`;`+`h` | Normal | Opens Unite history/yank -`;`+`s` | Normal | Opens Unite session -`;`+`o` | Normal | Opens Unite outline -`;`+`ma` | Normal | Opens Unite mapping -`;`+`me` | Normal | Opens Unite output messages -``+`b` | Normal | Opens Unite buffers, mru, bookmark +`[unite]` | Normal | unite leader, default is `f`, `:h g:spacevim_unite_leader` +`[unite]`+`r` | Normal | Resumes Unite window +`[unite]`+`f` | Normal | Opens Unite file recursive search +`[unite]`+`i` | Normal | Opens Unite git file search +`[unite]`+`g` | Normal | Opens Unite grep with ag (the_silver_searcher) +`[unite]`+`u` | Normal | Opens Unite source +`[unite]`+`t` | Normal | Opens Unite tag +`[unite]`+`T` | Normal | Opens Unite tag/include +`[unite]`+`l` | Normal | Opens Unite location list +`[unite]`+`q` | Normal | Opens Unite quick fix +`[unite]`+`e` | Normal | Opens Unite register +`[unite]`+`j` | Normal | Opens Unite jump, change +`[unite]`+`h` | Normal | Opens Unite history/yank +`[unite]`+`s` | Normal | Opens Unite session +`[unite]`+`n` | Normal | Opens Unite session/new +`[unite]`+`o` | Normal | Opens Unite outline +`[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]`+`` | Normal | Opens Unite menu:CustomKeyMaps +`[unite]`+`me` | Normal | Opens Unite output messages +``+`bl` | Normal | Opens Unite buffers, mru, bookmark ``+`ta` | Normal | Opens Unite tab -``+`gf` | Normal | Opens Unite file with word at cursor -``+`gt` | Normal/visual | Opens Unite tag with word at cursor -``+`gg` | Visual | Opens Unite navigate with word at cursor +``+`ugf` | Normal | Opens Unite file with word at cursor +``+`ugt` | Normal/visual | Opens Unite tag with word at cursor | **Within _Unite_ buffers** ||| `Ctrl`+`h/k/l/r` | Normal | Un-map `Ctrl`+`r` | Normal | Redraw diff --git a/autoload/SpaceVim/layers/tools.vim b/autoload/SpaceVim/layers/tools.vim index 586d2d292..3d476ea0f 100644 --- a/autoload/SpaceVim/layers/tools.vim +++ b/autoload/SpaceVim/layers/tools.vim @@ -5,7 +5,7 @@ function! SpaceVim#layers#tools#plugins() abort \ ['wsdjeg/SourceCounter.vim', { 'on_cmd' : 'SourceCounter'}], \ ['junegunn/goyo.vim', { 'on_cmd' : 'Goyo', 'loadconf' : 1}], \ ['junegunn/limelight.vim', { 'on_cmd' : 'Limelight'}], - \ ['Yggdroot/LeaderF', {'merged' : 0}], + \ ['Yggdroot/LeaderF', {'merged' : 0, 'on_cmd' : 'LeaderF'}], \ ['MattesGroeger/vim-bookmarks', { 'on_map' : 'Bookmark', 'loadconf_before' : 1}], \ ['google/vim-searchindex'], \ ['simnalamburt/vim-mundo', { 'on_cmd' : 'MundoToggle'}], diff --git a/autoload/SpaceVim/mapping/leader.vim b/autoload/SpaceVim/mapping/leader.vim index 0bdfc8f8c..5a0036434 100644 --- a/autoload/SpaceVim/mapping/leader.vim +++ b/autoload/SpaceVim/mapping/leader.vim @@ -21,22 +21,36 @@ function! SpaceVim#mapping#leader#defindUniteLeader(key) abort " The prefix key. nnoremap [unite] exe 'nmap ' .a:key . ' [unite]' - nnoremap [unite]c :UniteWithCurrentDir - \ -buffer-name=files buffer bookmark file - nnoremap [unite]b :UniteWithBufferDir - \ -buffer-name=files -prompt=%\ buffer bookmark file - nnoremap [unite]r :Unite - \ -buffer-name=register register - nnoremap [unite]o :Unite -buffer-name=outline -start-insert -auto-preview -split outline - nnoremap [unite]s :Unite session - nnoremap [unite]n :Unite session/new - nnoremap [unite]fr + nnoremap [unite]r \ :Unite -buffer-name=resume resume + if has('nvim') + nnoremap [unite]f :Unite file_rec/neovim + else + nnoremap [unite]f :Unite file_rec/async + endif + nnoremap [unite]i :Unite file_rec/git + nnoremap [unite]g :Unite grep + nnoremap [unite]u :Unite source + nnoremap [unite]t :Unite tag + nnoremap [unite]T :Unite tag/include + nnoremap [unite]l :Unite locationlist + nnoremap [unite]q :Unite quickfix + nnoremap [unite]e :Unite + \ -buffer-name=register register + nnoremap [unite]j :Unite jump + nnoremap [unite]h :Unite history/yank + nnoremap [unite]s :Unite session + nnoremap [unite]o :Unite -buffer-name=outline -start-insert -auto-preview -split outline nnoremap [unite]ma \ :Unite mapping nnoremap [unite]me \ :Unite output:message - nnoremap [unite]f :Unite source + + nnoremap [unite]c :UniteWithCurrentDir + \ -buffer-name=files buffer bookmark file + nnoremap [unite]b :UniteWithBufferDir + \ -buffer-name=files -prompt=%\ buffer bookmark file + nnoremap [unite]n :Unite session/new nnoremap [unite]w \ :Unite -buffer-name=files -no-split \ jump_point file_point buffer_tab diff --git a/config/plugins/unite.vim b/config/plugins/unite.vim index 215c4342b..a3b164606 100644 --- a/config/plugins/unite.vim +++ b/config/plugins/unite.vim @@ -219,6 +219,7 @@ noremap vf :Unite -auto-preview -no-split grep:%:: """ For searching the word in the cursor in all opened buffer noremap va :Unite -auto-preview -no-split grep:$buffers:: nnoremap bl :Unite -start-insert -buffer-name=buffer buffer +nnoremap ta :Unite -start-insert -buffer-name=tag tag "" outline nnoremap o :Unite -buffer-name=outline -start-insert -auto-preview -no-split outline "" Line search @@ -228,7 +229,9 @@ nnoremap y :Unite -no-split -buffer-name=yank history/yank< " search plugin " :Unite neobundle/search "for Unite menu{ -nnoremap ug :Unite -silent -start-insert menu:git +nnoremap ugg :Unite -silent -start-insert menu:git +nnoremap ugf :UniteWithCursorWord file_rec/async +nnoremap ugt :UniteWithCursorWord tag nnoremap ls :Unite -silent -ignorecase -winheight=17 -start-insert menu:MyStarredrepos nnoremap lm :Unite -silent -ignorecase -winheight=17 -start-insert menu:MpvPlayer call zvim#util#loadMusics()