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

Fix: fix function of SPC f d to match its documentation. (#2682)

* Fix: fix function of SPC f d to match it's documentation.

* Doc: fix typos.
This commit is contained in:
Lin Kun 2019-03-18 14:33:42 +08:00 committed by Wang Shidong
parent ca06b27c04
commit 99d0631576
3 changed files with 35 additions and 24 deletions

View File

@ -173,7 +173,9 @@ function! SpaceVim#layers#core#config() abort
call SpaceVim#mapping#space#def('nnoremap', ['f', 'F'], 'normal! gf', 'open-cursor-file', 1)
call SpaceVim#mapping#space#def('nnoremap', ['f', '/'], 'call SpaceVim#plugins#find#open()', 'find-files', 1)
if s:SYS.isWindows
call SpaceVim#mapping#space#def('nnoremap', ['f', 'd'], 'call SpaceVim#plugins#windisk#open()', 'open-windisk-manager', 1)
call SpaceVim#mapping#space#def('nnoremap', ['f', 'd'], 'call call('
\ . string(s:_function('s:ToggleWinDiskManager')) . ', [])',
\ 'toggle Windows disk manager', 1)
endif
if g:spacevim_filemanager ==# 'vimfiler'
call SpaceVim#mapping#space#def('nnoremap', ['f', 't'], 'VimFiler | doautocmd WinEnter', 'toggle_file_tree', 1)
@ -430,6 +432,14 @@ function! s:safe_erase_buffer() abort
redraw!
endfunction
function! s:ToggleWinDiskManager() abort
if bufexists("__windisk__")
execute 'bd "__windisk__"'
else
call SpaceVim#plugins#windisk#open()
endif
endfunction
function! s:open_message_buffer() abort
vertical topleft edit __Message_Buffer__
setlocal buftype=nofile bufhidden=wipe nobuflisted nolist noswapfile nowrap cursorline nospell nonumber norelativenumber

View File

@ -1002,7 +1002,7 @@ Denite/Unite 是一个强大的信息筛选浏览器,这类似于 Emacs 中的
| 快捷键 | 功能描述 |
| ---------------------------------------- | ------------------------------------------------------------------------------ |
| `SPC w`<Tab>` | 在同一标签内进行窗口切换 |
| `SPC w <Tab>` | 在同一标签内进行窗口切换 |
| `SPC w =` | 对齐分离的窗口 |
| `SPC w b` | force the focus back to the minibuffer (TODO) |
| `SPC w c` | 进入阅读模式,浏览当前窗口 (需要 tools 模块) |
@ -1104,7 +1104,8 @@ Buffer 操作相关快捷键都是以 `SPC b` 为前缀的:
| `SPC f r` | 打开文件历史 |
| `SPC f t` | 切换侧栏文件树 |
| `SPC f T` | 打开文件树侧栏 |
| `SPC f y` | 复制当前文件,并且显示当前文件路径 |
| `SPC f d` | Windows 下显示/隐藏磁盘管理器 |
| `SPC f y` | 复制并显示当前文件的绝对路径 |
##### Vim 和 SpaceVim 相关文件

View File

@ -1105,27 +1105,27 @@ In SpaceVim, there are many special buffers, these buffers are created by plugin
Files manipulation commands (start with f):
| Key Bindings | Descriptions |
| ------------ | -------------------------------------------------------------- |
| `SPC f /` | Find files with `find` command |
| `SPC f b` | go to file bookmarks |
| `SPC f c` | copy current file to a different location(TODO) |
| `SPC f C d` | convert file from unix to dos encoding |
| `SPC f C u` | convert file from dos to unix encoding |
| `SPC f D` | delete a file and the associated buffer (ask for confirmation) |
| `SPC f E` | open a file with elevated privileges (sudo layer) (TODO) |
| `SPC f W` | save a file with elevated privileges (sudo layer) |
| `SPC f f` | open file |
| `SPC f F` | try to open the file under point |
| `SPC f o` | open a file using the default external program(TODO) |
| `SPC f R` | rename the current file(TODO) |
| `SPC f s` | save a file |
| `SPC f S` | save all files |
| `SPC f r` | open a recent file |
| `SPC f t` | toggle file tree side bar |
| `SPC f d` | toggle disk manager in windows os |
| `SPC f T` | show file tree side bar |
| `SPC f y` | show and copy current file absolute path in the cmdline |
| Key Bindings | Descriptions |
| ------------ | --------------------------------------------------------- |
| `SPC f /` | Find files with `find` command |
| `SPC f b` | go to file bookmarks |
| `SPC f c` | copy current file to a different location(TODO) |
| `SPC f C d` | convert file from unix to dos encoding |
| `SPC f C u` | convert file from dos to unix encoding |
| `SPC f D` | delete a file and the associated buffer with confirmation |
| `SPC f E` | open a file with elevated privileges (sudo layer) (TODO) |
| `SPC f W` | save a file with elevated privileges (sudo layer) |
| `SPC f f` | open file |
| `SPC f F` | try to open the file under point |
| `SPC f o` | open a file using the default external program(TODO) |
| `SPC f R` | rename the current file(TODO) |
| `SPC f s` | save a file |
| `SPC f S` | save all files |
| `SPC f r` | open a recent file |
| `SPC f t` | toggle file tree side bar |
| `SPC f T` | show file tree side bar |
| `SPC f d` | toggle disk manager in Windows OS |
| `SPC f y` | show and copy current file absolute path in the cmdline |
##### Vim and SpaceVim files