mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-09 10:00:04 +08:00
Add keybinding for resize defx (#3084)
This commit is contained in:
parent
4607151b5b
commit
6cb57388cc
@ -35,6 +35,10 @@ call defx#custom#column('icon', {
|
|||||||
\ 'root_icon': ' ',
|
\ 'root_icon': ' ',
|
||||||
\ })
|
\ })
|
||||||
|
|
||||||
|
call defx#custom#column('filename', {
|
||||||
|
\ 'max_width': -90,
|
||||||
|
\ })
|
||||||
|
|
||||||
augroup vfinit
|
augroup vfinit
|
||||||
au!
|
au!
|
||||||
autocmd FileType defx call s:defx_init()
|
autocmd FileType defx call s:defx_init()
|
||||||
@ -142,6 +146,10 @@ function! s:defx_init()
|
|||||||
nnoremap <silent><buffer> <End> :call cursor(line('$'), 1)<cr>
|
nnoremap <silent><buffer> <End> :call cursor(line('$'), 1)<cr>
|
||||||
nnoremap <silent><buffer><expr> <C-Home>
|
nnoremap <silent><buffer><expr> <C-Home>
|
||||||
\ defx#do_action('cd', SpaceVim#plugins#projectmanager#current_root())
|
\ defx#do_action('cd', SpaceVim#plugins#projectmanager#current_root())
|
||||||
|
nnoremap <silent><buffer><expr> > defx#do_action('resize',
|
||||||
|
\ defx#get_context().winwidth + 10)
|
||||||
|
nnoremap <silent><buffer><expr> < defx#do_action('resize',
|
||||||
|
\ defx#get_context().winwidth - 10)
|
||||||
endf
|
endf
|
||||||
|
|
||||||
" in this function we should vim-choosewin if possible
|
" in this function we should vim-choosewin if possible
|
||||||
|
@ -1176,6 +1176,8 @@ SpaceVim 的文件树提供了版本控制信息的接口,但是这一特性
|
|||||||
| `p` | 预览文件 |
|
| `p` | 预览文件 |
|
||||||
| `i` | 切换至文件夹历史 |
|
| `i` | 切换至文件夹历史 |
|
||||||
| `v` | 快速查看 |
|
| `v` | 快速查看 |
|
||||||
|
| `>` | 放大文件树窗口宽度 |
|
||||||
|
| `<` | 缩小文件树窗口宽度 |
|
||||||
| `g x` | 使用相关程序执行该文件 |
|
| `g x` | 使用相关程序执行该文件 |
|
||||||
| `'` | 标记光标下的文件(夹) |
|
| `'` | 标记光标下的文件(夹) |
|
||||||
| `V` | 清除所有标记 |
|
| `V` | 清除所有标记 |
|
||||||
|
@ -1201,6 +1201,8 @@ Navigation is centered on the `hjkl` keys with the hope of providing a fast navi
|
|||||||
| `g x` | Execute with vimfiler associated |
|
| `g x` | Execute with vimfiler associated |
|
||||||
| `'` | Toggle mark current line |
|
| `'` | Toggle mark current line |
|
||||||
| `V` | Clear all marks |
|
| `V` | Clear all marks |
|
||||||
|
| `>` | iecrease filetree screenwidth |
|
||||||
|
| `<` | dncrease filetree screenwidth |
|
||||||
| `<Home>` | Jump to first line |
|
| `<Home>` | Jump to first line |
|
||||||
| `<End>` | Jump to last line |
|
| `<End>` | Jump to last line |
|
||||||
| `Ctrl-Home` | Switch to project root directory |
|
| `Ctrl-Home` | Switch to project root directory |
|
||||||
@ -1275,7 +1277,7 @@ After pressing prefix `z` in normal mode, if you do not remember the mappings, y
|
|||||||
which will tell you the functional of all mappings starting with `z`.
|
which will tell you the functional of all mappings starting with `z`.
|
||||||
|
|
||||||
| Key Bindings | Descriptions |
|
| Key Bindings | Descriptions |
|
||||||
| ------------ | -------------------------------------------- |
|
| ------------ | --------------------------------------------- |
|
||||||
| `z <Right>` | scroll screen N characters to left |
|
| `z <Right>` | scroll screen N characters to left |
|
||||||
| `z +` | cursor to screen top line N |
|
| `z +` | cursor to screen top line N |
|
||||||
| `z -` | cursor to screen bottom line N |
|
| `z -` | cursor to screen bottom line N |
|
||||||
@ -1294,7 +1296,7 @@ which will tell you the functional of all mappings starting with `z`.
|
|||||||
| `z N` | set `foldenable` |
|
| `z N` | set `foldenable` |
|
||||||
| `z O` | open folds recursively |
|
| `z O` | open folds recursively |
|
||||||
| `z R` | set `foldlevel` to deepest fold |
|
| `z R` | set `foldlevel` to deepest fold |
|
||||||
| `z W` | mark wrong spelled (update internal wordlist)|
|
| `z W` | mark wrong spelled (update internal wordlist) |
|
||||||
| `z X` | re-apply `foldlevel` |
|
| `z X` | re-apply `foldlevel` |
|
||||||
| `z ^` | cursor to screen bottom line N |
|
| `z ^` | cursor to screen bottom line N |
|
||||||
| `z a` | toggle a fold |
|
| `z a` | toggle a fold |
|
||||||
|
Loading…
Reference in New Issue
Block a user