Add Unite and Neostrophic menu

This commit is contained in:
Mark Vainomaa 2017-01-28 16:12:56 +02:00
parent 60c9511464
commit 5593e743e7

View File

@ -68,7 +68,7 @@ Plug 'Shougo/echodoc.vim'
" --- Syntax and completion engine components
Plug 'Shougo/context_filetype.vim'
"Plug 'Shougo/denite.nvim', {'do': function('URP')}
Plug 'Shougo/unite.vim'
Plug 'Shougo/vimproc.vim', {'do' : 'make'}
" C++
@ -289,6 +289,41 @@ autocmd! User GoyoLeave nested call <SID>on_goyo_leave()
" Markdown
let g:markdown_include_jekyll_support = 0
" Own Unite menu
" Thanks to: http://vi.stackexchange.com/a/591
if !exists('g:unite_source_menu_menus')
let g:unite_source_menu_menus = {}
endif
let g:unite_source_menu_menus.neostrophic_menu = {'description': 'Neostrophic menu'}
function! g:unite_source_menu_menus.neostrophic_menu.map(key, value)
return {
\ 'word': a:key,
\ 'kind': 'command',
\ 'action__command': a:value
\ }
endfunction
let g:unite_source_menu_menus.neostrophic_menu.command_candidates = [
\ ['▷ Syntastic: toggle checking mode C-A-f', 'SyntasticToggleMode'],
\ ['▷ Neostrophic: grep for TODOs <none>', 'grep TODO'],
\ ['▷ Git: preview hunk ,hp', 'GitGutterPreviewHunk'],
\ ['▷ Git: stage hunk <none>', 'GitGutterStageHunk'],
\ ['▷ Git: undo hunk ,hr', 'GitGutterUndoHunk'],
\ ['▷ Git: move to next changed hunk <none>', 'GitGutterNextHunk'],
\ ['▷ Git: move to previous changed hunk ,hr', 'GitGutterPrevHunk'],
\ ['▷ Git: blame <none>', 'Gblame'],
\ ['▷ Git: pull <none>', 'Gpull'],
\ ['▷ Git: diff <none>', 'Gdiff'],
\ ['▷ Git: status <none>', 'Gstatus'],
\ ['▷ Undo: show tree F6', 'GundoToggle'],
\ ['▷ Goyo: toggle F8', 'Goyo'],
\]
nnoremap <Leader>m :Unite menu:neostrophic_menu -start-insert -ignorecase<CR>
" --- Keymaps
" Commonly used commands