forked from nvimdev/dashboard-nvim
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dashboard.txt
237 lines (204 loc) · 9.89 KB
/
dashboard.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
*dashboard.txt* The fancy start screen.
*dashboard*
==============================================================================
CONTENTS *dashboard-contents*
INTRO .......................................... |dashboard-intro|
COMMANDS ....................................... |dashboard-commands|
OPTIONS ........................................ |dashboard-options|
AUTOCMD ........................................ |dashboard-autocmd|
COLORS ......................................... |dashboard-colors|
EXAMPLE ........................................ |dashboard-example|
==============================================================================
INTRO *dashboard-intro*
dashboard is a plugin that shows recently used files, bookmarks, commands and
sessions that were saved to a certain directory.
==============================================================================
COMMANDS *dashboard-commands*
>
:Dashboard
<
Open the dashboard buffer.
*dashboard-:SessionSave*
>
:SessionSave
<
Save a session to session folder.
NOTE: This command is affected by |g:dashboard_session_directory|.
*dashboard-:SessionLoad*
>
:SessionLoad
<
Load a session from |g:dashboard_session_directory|
*dashboard-:DashboardFindFile*
>
:DashboardFindFile
<
Search File wraped the vim-clap:`Clap history Clap files ++finder=rg --ignore --hidden --files`
fzf.vim :`Files`
*dashboard-:DashboardFindHistory*
>
:DashboardFindHistory
<
Search the history File wraped the vim-clap:`Clap history`
fzf.vim: `History`
*dashboard-:DashboardChangeColorscheme*
>
:DashboardChangeColorscheme
<
Search vim colorscheme wraped the vim-clap:`Clap colors`
fzf.vim:`Colors`
*dashboard-:DashboardFindWord*
>
:DashboardFindWord
<
Search the word wraped the vim-clap:`Clap grep2`
fzf.vim:`Rg`
*dashboard-:DashboardJumpMarks*
>
:DashboardJumpMarks
<
Jump to marks wraped the vim-clap:`Clap marks`
fzf.vim:`Marks`
==============================================================================
OPTIONS *dashboard-options*
Put these variables into your vimrc. The shown assignments are also the
default values.
Most used options:~
|g:dashboard_custom_header|
|g:dashboard_custom_footer|
|g:dashboard_enable_session|
|g:dashboard_session_directory|
|g:dashboard_custom_shortcut|
------------------------------------------------------------------------------
*g:dashboard_custom_header*
>
let g:dashboard_custom_header = 'dashboard#pad(dashboard#fortune#cowsay())'
<
Define your own header.
This option takes a `list of strings`, whereas each string will be put on its
own line. If it is a simple `string`, it should evaluate to a list of strings.
Example #1:~
>
let g:dashboard_custom_header = [
\ '',
\ ' ⠀⠀⠀⠀⠀⠀⠀⠀⠀⡴⠞⠉⢉⣭⣿⣿⠿⣳⣤⠴⠖⠛⣛⣿⣿⡷⠖⣶⣤⡀⠀⠀⠀ ',
\ ' ⠀⠀⠀⠀⠀⠀⠀⣼⠁⢀⣶⢻⡟⠿⠋⣴⠿⢻⣧⡴⠟⠋⠿⠛⠠⠾⢛⣵⣿⠀⠀⠀⠀ ',
\ ' ⣼⣿⡿⢶⣄⠀⢀⡇⢀⡿⠁⠈⠀⠀⣀⣉⣀⠘⣿⠀⠀⣀⣀⠀⠀⠀⠛⡹⠋⠀⠀⠀⠀ ',
\ ' ⣭⣤⡈⢑⣼⣻⣿⣧⡌⠁⠀⢀⣴⠟⠋⠉⠉⠛⣿⣴⠟⠋⠙⠻⣦⡰⣞⠁⢀⣤⣦⣤⠀ ',
\ ' ⠀⠀⣰⢫⣾⠋⣽⠟⠑⠛⢠⡟⠁⠀⠀⠀⠀⠀⠈⢻⡄⠀⠀⠀⠘⣷⡈⠻⣍⠤⢤⣌⣀ ',
\ ' ⢀⡞⣡⡌⠁⠀⠀⠀⠀⢀⣿⠁⠀⠀⠀⠀⠀⠀⠀⠀⢿⡀⠀⠀⠀⠸⣇⠀⢾⣷⢤⣬⣉ ',
\ ' ⡞⣼⣿⣤⣄⠀⠀⠀⠀⢸⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⡇⠀⠀⠀⠀⣿⠀⠸⣿⣇⠈⠻ ',
\ ' ⢰⣿⡿⢹⠃⠀⣠⠤⠶⣼⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⡇⠀⠀⠀⠀⣿⠀⠀⣿⠛⡄⠀ ',
\ ' ⠈⠉⠁⠀⠀⠀⡟⡀⠀⠈⡗⠲⠶⠦⢤⣤⣤⣄⣀⣀⣸⣧⣤⣤⠤⠤⣿⣀⡀⠉⣼⡇⠀ ',
\ ' ⣿⣴⣴⡆⠀⠀⠻⣄⠀⠀⠡⠀⠀⠀⠈⠛⠋⠀⠀⠀⡈⠀⠻⠟⠀⢀⠋⠉⠙⢷⡿⡇⠀ ',
\ ' ⣻⡿⠏⠁⠀⠀⢠⡟⠀⠀⠀⠣⡀⠀⠀⠀⠀⠀⢀⣄⠀⠀⠀⠀⢀⠈⠀⢀⣀⡾⣴⠃⠀ ',
\ ' ⢿⠛⠀⠀⠀⠀⢸⠁⠀⠀⠀⠀⠈⠢⠄⣀⠠⠼⣁⠀⡱⠤⠤⠐⠁⠀⠀⣸⠋⢻⡟⠀⠀ ',
\ ' ⠈⢧⣀⣤⣶⡄⠘⣆⠀⠀⠀⠀⠀⠀⠀⢀⣤⠖⠛⠻⣄⠀⠀⠀⢀⣠⡾⠋⢀⡞⠀⠀⠀ ',
\ ' ⠀⠀⠻⣿⣿⡇⠀⠈⠓⢦⣤⣤⣤⡤⠞⠉⠀⠀⠀⠀⠈⠛⠒⠚⢩⡅⣠⡴⠋⠀⠀⠀⠀ ',
\ ' ⠀⠀⠀⠈⠻⢧⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠐⣻⠿⠋⠀⠀⠀⠀⠀⠀ ',
\ ' ⠀⠀⠀⠀⠀⠀⠉⠓⠶⣤⣄⣀⡀⠀⠀⠀⠀⠀⢀⣀⣠⡴⠖⠋⠁⠀⠀⠀⠀⠀⠀⠀⠀ ',
\ ' ',
\ '',
\ ]
<
------------------------------------------------------------------------------
*g:dashboard_custom_footer*
>
let g:dashboard_custom_footer = ''
<
Same as the custom header, but shown at the bottom of the dashboard buffer.
------------------------------------------------------------------------------
*g:dashboard_enable_session*
>
let g:dashboard_enable_session = 1
<
set to `0` to disable session
------------------------------------------------------------------------------
*g:dashboard_session_directory*
>
let g:dashboard_session_directory = '~/.cache/vim/session'
<
The directory to save/load sessions to/from.
Defaults: `$HOME/.cahce/vim/session`
------------------------------------------------------------------------------
*g:dashboard_custom_shortcut*
>
let g:dashboard_custon_shortcut['last_session'] = 'SPC s l'
let g:dashboard_custon_shortcut['find_history'] = 'SPC f h'
let g:dashboard_custon_shortcut['find_file'] = 'SPC f f'
let g:dashboard_custon_shortcut['change_colorscheme'] = 'SPC t c'
let g:dashboard_custon_shortcut['find_word'] = 'SPC f a'
let g:dashboard_custon_shortcut['book_marks'] = 'SPC f b'
<
The keymap that config for vim-clap or fzf.vim or dashboard commands
==============================================================================
AUTOCMD *dashboard-autocmd*
In certain situations dashboard emits events which can be hooked into via
|autocmd|s. Those can be used for further customization.
dashboardReady~
When the dashboard buffer is ready.
Example:
>
autocmd User dashboardReady let &l:stl = ' This statusline rocks!'
<
==============================================================================
COLORS *dashboard-colors*
You can overwrite the highlight groups used by dashboard. The plugin defines
these groups:
Highlight group | Description | Default
------------------------------------------------------------------
| |
dashboardFooter | the custom footer | linked to Boolean
dashboardHeader | the custom header | linked to Type
dashboardCenter | the section describe | linked to Function
dashboardShortCut | the custom shortcut | linked to Error
Example: (my terminal emulator supports 256 colors)
>
highlight dashboardFooter ctermfg=240
highlight dashboardHeader ctermfg=114
highlight dashboardCenter ctermfg=215
highlight dashboardShortCut ctermfg=245
<
==============================================================================
Example *dashboard-example*
For users who use the vim-clap
>
Plug 'hardcoreplayers/dashboard-nvim'
Plug 'liuchengxu/vim-clap'
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',
\ }
<
For users who use the fzf.vim
>
Plug 'hardcoreplayers/dashboard-nvim'
Plug 'junegunn/fzf.vim'
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',
\ }
<
==============================================================================