mirror of
https://github.com/junegunn/fzf.git
synced 2025-11-19 09:03:43 -05:00
Use new up/down/left/right options
@@ -12,13 +12,13 @@ command! -nargs=1 Locate call fzf#run(
|
|||||||
```vim
|
```vim
|
||||||
" Open files in horizontal split
|
" Open files in horizontal split
|
||||||
nnoremap <silent> <Leader>s :call fzf#run({
|
nnoremap <silent> <Leader>s :call fzf#run({
|
||||||
\ 'tmux_height': '40%',
|
\ 'down': '40%',
|
||||||
\ 'sink': 'botright split' })<CR>
|
\ 'sink': 'botright split' })<CR>
|
||||||
|
|
||||||
" Open files in vertical horizontal split
|
" Open files in vertical horizontal split
|
||||||
nnoremap <silent> <Leader>v :call fzf#run({
|
nnoremap <silent> <Leader>v :call fzf#run({
|
||||||
\ 'tmux_width': winwidth('.') / 2,
|
\ 'right': winwidth('.') / 2,
|
||||||
\ 'sink': 'vertical botright split' })<CR>
|
\ 'sink': 'vertical botright split' })<CR>
|
||||||
```
|
```
|
||||||
|
|
||||||
### Choose color scheme
|
### Choose color scheme
|
||||||
@@ -28,9 +28,9 @@ nnoremap <silent> <Leader>C :call fzf#run({
|
|||||||
\ 'source':
|
\ 'source':
|
||||||
\ map(split(globpath(&rtp, "colors/*.vim"), "\n"),
|
\ map(split(globpath(&rtp, "colors/*.vim"), "\n"),
|
||||||
\ "substitute(fnamemodify(v:val, ':t'), '\\..\\{-}$', '', '')"),
|
\ "substitute(fnamemodify(v:val, ':t'), '\\..\\{-}$', '', '')"),
|
||||||
\ 'sink': 'colo',
|
\ 'sink': 'colo',
|
||||||
\ 'options': '+m',
|
\ 'options': '+m',
|
||||||
\ 'tmux_width': 20
|
\ 'left': 30
|
||||||
\ })<CR>
|
\ })<CR>
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -49,10 +49,10 @@ function! s:bufopen(e)
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
nnoremap <silent> <Leader><Enter> :call fzf#run({
|
nnoremap <silent> <Leader><Enter> :call fzf#run({
|
||||||
\ 'source': reverse(<sid>buflist()),
|
\ 'source': reverse(<sid>buflist()),
|
||||||
\ 'sink': function('<sid>bufopen'),
|
\ 'sink': function('<sid>bufopen'),
|
||||||
\ 'options': '+m',
|
\ 'options': '+m',
|
||||||
\ 'tmux_height': '40%'
|
\ 'down': len(<sid>buflist()) + 2
|
||||||
\ })<CR>
|
\ })<CR>
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -102,7 +102,7 @@ command! FZFLines call fzf#run({
|
|||||||
\ 'source': <sid>buffer_lines(),
|
\ 'source': <sid>buffer_lines(),
|
||||||
\ 'sink': function('<sid>line_handler'),
|
\ 'sink': function('<sid>line_handler'),
|
||||||
\ 'options': '--extended --nth=3..',
|
\ 'options': '--extended --nth=3..',
|
||||||
\ 'tmux_height': '60%'
|
\ 'down': '60%'
|
||||||
\})
|
\})
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user