1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-02-03 05:00:04 +08:00

Add mappings for create empty buffer

This commit is contained in:
wsdjeg 2017-06-05 21:17:44 +08:00
parent 026d0d713d
commit 66e8820e82
2 changed files with 17 additions and 0 deletions

View File

@ -111,6 +111,12 @@ function! SpaceVim#layers#default#config() abort
\ 'safe-revert-buffer', 1)
call SpaceVim#mapping#space#def('nnoremap', ['b', 'Y'], 'normal! ggVG"+y``', 'copy-whole-buffer-to-clipboard', 1)
call SpaceVim#mapping#space#def('nnoremap', ['b', 'w'], 'setl readonly!', 'read-only-mode', 1)
let g:_spacevim_mappings_space.b.N = {'name' : '+New empty buffer'}
call SpaceVim#mapping#space#def('nnoremap', ['b', 'N', 'h'], 'topleft vertical new', 'new-empty-buffer-left', 1)
call SpaceVim#mapping#space#def('nnoremap', ['b', 'N', 'j'], 'rightbelow new', 'new-empty-buffer-below', 1)
call SpaceVim#mapping#space#def('nnoremap', ['b', 'N', 'k'], 'new', 'new-empty-buffer-above', 1)
call SpaceVim#mapping#space#def('nnoremap', ['b', 'N', 'l'], 'rightbelow vertical new', 'new-empty-buffer-right', 1)
call SpaceVim#mapping#space#def('nnoremap', ['b', 'N', 'n'], 'enew', 'new-empty-buffer', 1)
endfunction
let s:file = SpaceVim#api#import('file')

View File

@ -57,6 +57,7 @@ title: "Documentation"
* [Window manipulation key bindings](#window-manipulation-key-bindings)
* [Buffers and Files](#buffers-and-files)
* [Buffers manipulation key bindings](#buffers-manipulation-key-bindings)
* [Create a new empty buffer](#create-a-new-empty-buffer)
* [Auto-saving](#auto-saving)
* [Searching](#searching)
* [Editing](#editing)
@ -752,6 +753,16 @@ Key Binding | Description
`SPC b Y` | copy whole buffer to clipboard (useful when copying to a browser)
`z f` | Make current function or comments visible in buffer as much as possible (TODO)
##### Create a new empty buffer
Key Binding | Description
----------- | -----------
`SPC b N h` | create new empty buffer in a new window on the left
`SPC b N j` | create new empty buffer in a new window at the bottom
`SPC b N k` | create new empty buffer in a new window above
`SPC b N l` | create new empty buffer in a new window below
`SPC b N n` | create new empty buffer in current window
### Auto-saving
### Searching