mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-09 15:00:04 +08:00
Add mappings for create empty buffer
This commit is contained in:
parent
026d0d713d
commit
66e8820e82
@ -111,6 +111,12 @@ function! SpaceVim#layers#default#config() abort
|
|||||||
\ 'safe-revert-buffer', 1)
|
\ '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', 'Y'], 'normal! ggVG"+y``', 'copy-whole-buffer-to-clipboard', 1)
|
||||||
call SpaceVim#mapping#space#def('nnoremap', ['b', 'w'], 'setl readonly!', 'read-only-mode', 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
|
endfunction
|
||||||
|
|
||||||
let s:file = SpaceVim#api#import('file')
|
let s:file = SpaceVim#api#import('file')
|
||||||
|
@ -57,6 +57,7 @@ title: "Documentation"
|
|||||||
* [Window manipulation key bindings](#window-manipulation-key-bindings)
|
* [Window manipulation key bindings](#window-manipulation-key-bindings)
|
||||||
* [Buffers and Files](#buffers-and-files)
|
* [Buffers and Files](#buffers-and-files)
|
||||||
* [Buffers manipulation key bindings](#buffers-manipulation-key-bindings)
|
* [Buffers manipulation key bindings](#buffers-manipulation-key-bindings)
|
||||||
|
* [Create a new empty buffer](#create-a-new-empty-buffer)
|
||||||
* [Auto-saving](#auto-saving)
|
* [Auto-saving](#auto-saving)
|
||||||
* [Searching](#searching)
|
* [Searching](#searching)
|
||||||
* [Editing](#editing)
|
* [Editing](#editing)
|
||||||
@ -752,6 +753,16 @@ Key Binding | Description
|
|||||||
`SPC b Y` | copy whole buffer to clipboard (useful when copying to a browser)
|
`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)
|
`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
|
### Auto-saving
|
||||||
|
|
||||||
### Searching
|
### Searching
|
||||||
|
Loading…
Reference in New Issue
Block a user