From 431b1b85a0bc6a7b43c1f992918557e83bb9020e Mon Sep 17 00:00:00 2001 From: wsdjeg Date: Wed, 7 Jun 2017 20:20:54 +0800 Subject: [PATCH] Add SPC f v d to open custom configration file --- autoload/SpaceVim/layers/default.vim | 3 +++ docs/documentation.md | 12 ++++++++++++ 2 files changed, 15 insertions(+) diff --git a/autoload/SpaceVim/layers/default.vim b/autoload/SpaceVim/layers/default.vim index fc089590a..32a0769a3 100644 --- a/autoload/SpaceVim/layers/default.vim +++ b/autoload/SpaceVim/layers/default.vim @@ -136,6 +136,9 @@ function! SpaceVim#layers#default#config() abort call SpaceVim#mapping#space#def('nnoremap', ['f', 't'], 'NERDTree', 'toggle_file_tree', 1) endif call SpaceVim#mapping#space#def('nnoremap', ['f', 'y'], 'call zvim#util#CopyToClipboard()', 'show-and-copy-buffer-filename', 1) + let g:_spacevim_mappings_space.f.v = {'name' : '+Vim(SpaceVim)'} + call SpaceVim#mapping#space#def('nnoremap', ['f', 'v', 'v'], 'let @+=g:spacevim_version | echo g:spacevim_version', 'display-and-copy-version', 1) + call SpaceVim#mapping#space#def('nnoremap', ['f', 'v', 'd'], 'SPConfig', 'open-custom-configuration', 1) endfunction let s:file = SpaceVim#api#import('file') diff --git a/docs/documentation.md b/docs/documentation.md index ef2809755..253b529bb 100644 --- a/docs/documentation.md +++ b/docs/documentation.md @@ -60,6 +60,7 @@ title: "Documentation" * [Create a new empty buffer](#create-a-new-empty-buffer) * [Special Buffers](#special-buffers) * [Files manipulations key bindings](#files-manipulations-key-bindings) + * [Vim and SpaceVim files](#vim-and-spacevim-files) * [Auto-saving](#auto-saving) * [Searching](#searching) * [Editing](#editing) @@ -792,6 +793,17 @@ Key Binding | Description `SPC f T` | show file tree side bar `SPC f y` | show and copy current file absolute path in the cmdline + +##### Vim and SpaceVim files + +Convenient key bindings are located under the prefix `SPC f v` to quickly navigate between Vim and SpaceVim specific files. + +Key Binding | Description +----------- | ----------- +`SPC f v v` | display and copy SpaceVim version +`SPC f v d` | open SpaceVim custom configuration file + + ### Auto-saving ### Searching