mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-04-14 23:49:19 +08:00
refactor(fuzzy)!: change key binding SPC f F
use `SPC f F` to find cursor file in buffer directory close https://github.com/SpaceVim/SpaceVim/issues/4311 BREAKING CHANGE: change key binding SPC f F
This commit is contained in:
parent
e5f77cc370
commit
b2d1d74606
@ -275,7 +275,6 @@ function! SpaceVim#layers#core#config() abort
|
||||
call SpaceVim#mapping#space#def('nnoremap', ['f', 'D'], 'call call('
|
||||
\ . string(s:_function('s:delete_current_buffer_file')) . ', [])',
|
||||
\ 'delete-current-buffer-file', 1)
|
||||
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 call('
|
||||
|
@ -298,6 +298,17 @@ function! SpaceVim#layers#leaderf#config() abort
|
||||
\ ],
|
||||
\ 1)
|
||||
|
||||
let lnum = expand('<slnum>') + s:lnum - 1
|
||||
call SpaceVim#mapping#space#def('nnoremap', ['f', 'F'], 'exe "Leaderf file --input=" . expand("<cword>") . " " . expand("%:p:h")',
|
||||
\ ['Find-cursor-file-in-buffer-directory',
|
||||
\ [
|
||||
\ '[SPC f F] is to find cursor file in the directory of the current buffer',
|
||||
\ '',
|
||||
\ 'Definition: ' . s:filename . ':' . lnum,
|
||||
\ ]
|
||||
\ ],
|
||||
\ 1)
|
||||
|
||||
let lnum = expand('<slnum>') + s:lnum - 1
|
||||
call SpaceVim#mapping#space#def('nnoremap', ['p', 'F'],
|
||||
\ 'LeaderfFileCword',
|
||||
|
@ -1334,8 +1334,8 @@ SpaceVim 选项 `window_leader` 的值来设为其它按键:
|
||||
| `SPC f C u` | 修改文件编码 dos -> unix |
|
||||
| `SPC f D` | 删除文件以及 buffer,需要手动确认 |
|
||||
| `SPC f E` | open a file with elevated privileges (sudo edit)(TODO) |
|
||||
| `SPC f f` | 打开文件 |
|
||||
| `SPC f F` | 打开光标下的文件 |
|
||||
| `SPC f f` | 在当前文件所在文件夹搜索文件 |
|
||||
| `SPC f F` | 在当前文件所在的文件夹搜索光标下的文件 |
|
||||
| `SPC f o` | 代开文件树,并定位到当前文件 |
|
||||
| `SPC f R` | rename the current file(TODO) |
|
||||
| `SPC f s` / `Ctrl-s` | 保存文件 (:w) |
|
||||
|
@ -1421,8 +1421,8 @@ Files manipulation commands (start with `f`):
|
||||
| `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 f` | fuzzy find files in buffer directory |
|
||||
| `SPC f F` | fuzzy find cursor file in buffer directory |
|
||||
| `SPC f o` | Find current file in file tree |
|
||||
| `SPC f R` | rename the current file(TODO) |
|
||||
| `SPC f s` | save a file |
|
||||
|
Loading…
x
Reference in New Issue
Block a user