-
vim-plug
Plug 'hardcoreplayers/dashboard-nvim'
-
dein
call dein#add('hardcoreplayers/dashboard-nvim')
-
Config your excute tool by
g:dashboard_default_executive
,This option mean what fuzzy search plugins that you used. vim-clap and fzf.vimlet g:dashboard_default_executive ='clap' --default
-
Dashboard wrap some
vim-clap
andfzf.vim
commands with window config, And the dashboard commands execute tool depends on what plugin you used- DashboardFindFile same as
- vim-clap:
Clap history Clap files ++finder=rg --ignore --hidden --files
- fzf.vim :
Files
- vim-clap:
- DashboardFindHistory same as
- vim-clap:
Clap history
- fzf.vim :
History
- vim-clap:
- DashboardChangeColorscheme same as
- vim-clap:
Clap colors
- fzf.vim :
Colors
- vim-clap:
- DashboardFindWord same as
- vim-clap:
Clap grep2
- fzf.vim :
Rg
- vim-clap:
- DashboardJumpMark same as
- vim-clap:
Clap marks
- fzf.vim :
Marks
- vim-clap:
If you already define the vim-clap and fzf commands, just set your keymaps into the
g:dashboard_custom_shortcut
. If you want use the Dashboard wrap commands. you can define the dashboard commands keymap then set it intog:dashboard_custom_shutcut
eg : "SPC mean the leaderkey let g:dashboard_custom_shortcut={ \ 'last_session' : 'SPC s l', \ 'find_history' : 'SPC f h', \ 'find_file' : 'SPC f f', \ 'change_colorscheme' : 'SPC t c', \ 'find_word' : 'SPC f a', \ 'book_marks' : 'SPC f b', \ }
- what does the shortcut do? just a tip like
whichkey
,on dashboard you just move the cursor and pressenter
- DashboardFindFile same as
-
g:dashboard_custom_header
custom the dashboard header (same as startify) -
g:dashboard_custom_footer
custom the dashboard footer (same as startify) -
Dashboard provide session support with
SessionLoad
andSessionSave
commands you can define keymap like this .nmap <Leader>ss :<C-u>SessionSave<CR> nmap <Leader>sl :<C-u>SessionLoad<CR>
you can disable dashboard session by
g:dashboard_enable_session
.0
means disable session. set thedashboard_session_directory
to change the session folder default is~/.cache/vim/session
-
Highlight group
DashboardHeader DashboardCenter DashboardShortcut DashboardFooter
-
Autocmd
Dashboard
DashboardReady
same as vim-startify
you can replace the vim-clap or fzf.vim commands by dashboard commands
-
dashboard-nvim with vim-clap
Plug 'hardcoreplayers/dashboard-nvim' Plug 'liuchengxu/vim-clap' let g:mapleader="\<Space>" nmap <Leader>ss :<C-u>SessionSave<CR> nmap <Leader>sl :<C-u>SessionLoad<CR> nnoremap <silent> <Leader>fh :<C-u>Clap history<CR> nnoremap <silent> <Leader>ff :<C-u>Clap files ++finder=rg --ignore --hidden --files<cr> nnoremap <silent> <Leader>tc :<C-u>Clap colors<CR> nnoremap <silent> <Leader>fa :<C-u>Clap grep2<CR> nnoremap <silent> <Leader>fb :<C-u>Clap marks<CR> let g:dashboard_custom_shortcut={ \ 'last_session' : 'SPC s l', \ 'find_history' : 'SPC f h', \ 'find_file' : 'SPC f f', \ 'change_colorscheme' : 'SPC t c', \ 'find_word' : 'SPC f a', \ 'book_marks' : 'SPC f b', \ }
-
dashboard-nvim with fzf.vim
Plug 'hardcoreplayers/dashboard-nvim' Plug 'junegunn/fzf.vim' let g:mapleader="\<Space>" nmap <Leader>ss :<C-u>SessionSave<CR> nmap <Leader>sl :<C-u>SessionLoad<CR> nnoremap <silent> <Leader>fh :History<CR> nnoremap <silent> <Leader>ff :Files<CR> nnoremap <silent> <Leader>tc :Colors<CR> nnoremap <silent> <Leader>fa :Rg<CR> nnoremap <silent> <Leader>fb :Marks<CR> let g:dashboard_custom_shortcut={ \ 'last_session' : 'SPC s l', \ 'find_history' : 'SPC f h', \ 'find_file' : 'SPC f f', \ 'change_colorscheme' : 'SPC t c', \ 'find_word' : 'SPC f a', \ 'book_marks' : 'SPC f b', \ }
- Support custom center section
- What is it different from vim-startify ? dashbaord is inspired by doom-emacs, startify provides a list of many files, Mru oldfile, etc., but do we really need this list, we will only open one file, and the file list takes up a lot of space, the dashboard uses fuzzy search plugin pop-up menu, it saves a lot of space, and provides more functions.
Do you like dashboard-nvim? buy me a coffe😘!
AliPay | |
---|---|
-
Inspired by doom emacs
- MIT