mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-23 10:40:03 +08:00
Add help desc
This commit is contained in:
parent
f33fbfd391
commit
4005a767dc
@ -2,12 +2,15 @@
|
||||
" @section Default, default
|
||||
" @parentsection layers
|
||||
|
||||
let s:filename = expand('<sfile>:~')
|
||||
|
||||
function! SpaceVim#layers#default#plugins() abort
|
||||
let plugins = []
|
||||
|
||||
return plugins
|
||||
endfunction
|
||||
|
||||
let s:lnum = expand('<slnum>') + 3
|
||||
function! SpaceVim#layers#default#config() abort
|
||||
" Unimpaired bindings
|
||||
" Quickly add empty lines
|
||||
@ -47,7 +50,20 @@ function! SpaceVim#layers#default#config() abort
|
||||
" Select last paste
|
||||
nnoremap <silent><expr> gp '`['.strpart(getregtype(), 0, 1).'`]'
|
||||
|
||||
call SpaceVim#mapping#space#def('nnoremap', ['f', 'f'], "exe 'CtrlP ' . fnamemodify(bufname('%'), ':h')", 'Find files in the directory of the current buffer', 1)
|
||||
let lnum = expand('<slnum>') + s:lnum - 1
|
||||
call SpaceVim#mapping#space#def('nnoremap', ['f', 'f'],
|
||||
\ "exe 'CtrlP ' . fnamemodify(bufname('%'), ':h')",
|
||||
\ ['Find files in the directory of the current buffer',
|
||||
\ [
|
||||
\ '[SPC f f] is to find files in the directory of the current buffer',
|
||||
\ 'vim with +python3 support will use denite',
|
||||
\ 'vim with +python support will use leaderf',
|
||||
\ 'otherwise will use ctrlp',
|
||||
\ '',
|
||||
\ 'Definition: ' . s:filename . ':' . lnum,
|
||||
\ ]
|
||||
\ ]
|
||||
\ , 1)
|
||||
call SpaceVim#mapping#space#def('nnoremap', ['f', 's'], 'write', 'save buffer', 1)
|
||||
call SpaceVim#mapping#space#def('nnoremap', ['f', 'S'], 'wall', 'save all buffer', 1)
|
||||
call SpaceVim#mapping#space#def('nnoremap', ['f', 'W'], 'write !sudo tee % >/dev/null', 'save buffer with sudo', 1)
|
||||
|
@ -1,3 +1,4 @@
|
||||
let s:file = expand('<sfile>:~')
|
||||
function! SpaceVim#mapping#space#init() abort
|
||||
if s:has_map_to_spc()
|
||||
return
|
||||
@ -63,19 +64,28 @@ function! SpaceVim#mapping#space#init() abort
|
||||
call SpaceVim#mapping#space#def('nnoremap', ['w', 'W'], 'ChooseWin', 'select window', 1)
|
||||
call SpaceVim#mapping#space#def('nnoremap', ['w', 'u'], 'call SpaceVim#plugins#windowsmanager#UndoQuitWin()', 'undo quieted window', 1)
|
||||
call SpaceVim#mapping#space#def('nnoremap', ['w', 'U'], 'call SpaceVim#plugins#windowsmanager#RedoQuitWin()', 'redo quieted window', 1)
|
||||
nnoremap <silent> [SPC]bn :bnext<CR>
|
||||
let g:_spacevim_mappings_space.b.n = ['bnext', 'next buffer',
|
||||
let s:lnum = expand('<slnum>') + 3
|
||||
call SpaceVim#mapping#space#def('nnoremap', ['b', 'n'], 'bnext', ['next buffer',
|
||||
\ [
|
||||
\ 'SPC b n is running :bnext, jump to next buffer',
|
||||
\ '[SPC b n] is running :bnext, jump to next buffer',
|
||||
\ 'which is a vim build in command',
|
||||
\ 'It is bound to SPC b n, ] b,',
|
||||
\ '',
|
||||
\ 'Definition: ' . s:file . ':' . s:lnum,
|
||||
\ ]
|
||||
\ ]
|
||||
call SpaceVim#mapping#menu('Open next buffer', '[SPC]bn', 'bp')
|
||||
nnoremap <silent> [SPC]bp :bp<CR>
|
||||
let g:_spacevim_mappings_space.b.p = ['bp', 'previous buffer']
|
||||
call SpaceVim#mapping#menu('Open previous buffer', '[SPC]bp', 'bp')
|
||||
|
||||
\ , 1)
|
||||
let s:lnum = expand('<slnum>') + 3
|
||||
call SpaceVim#mapping#space#def('nnoremap', ['b', 'p'], 'bp', ['previous buffer',
|
||||
\ [
|
||||
\ 'SPC b p is running :bp, jump to previous buffer',
|
||||
\ 'which is a vim build in command',
|
||||
\ 'It is bound to SPC b p, [ b,',
|
||||
\ '',
|
||||
\ 'Definition: ' . s:file . ':' . s:lnum,
|
||||
\ ]
|
||||
\ ]
|
||||
\ , 1)
|
||||
"
|
||||
" Comments sections
|
||||
"
|
||||
|
8
syntax/HelpDescribe.vim
Normal file
8
syntax/HelpDescribe.vim
Normal file
@ -0,0 +1,8 @@
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
let b:current_syntax = "HelpDescribe"
|
||||
syntax case ignore
|
||||
syn match FileName /[^:]*:\d\+:/
|
||||
|
||||
hi def link FileName Comment
|
Loading…
Reference in New Issue
Block a user