[vim] Rename g:fzf_tmux_height to g:fzf_height

Because tmux panes are not used on Neovim.
This commit is contained in:
Junegunn Choi 2015-04-15 22:32:45 +09:00
parent b882de87ab
commit 2add45fe2f
2 changed files with 5 additions and 5 deletions

View File

@ -285,9 +285,9 @@ in new tabs, in horizontal splits, or in vertical splits respectively.
Note that the environment variables `FZF_DEFAULT_COMMAND` and `FZF_DEFAULT_OPTS` Note that the environment variables `FZF_DEFAULT_COMMAND` and `FZF_DEFAULT_OPTS`
also apply here. also apply here.
If you're on a tmux session, `:FZF` will launch fzf in a new split-window whose If you're on a tmux session or using Neovim, `:FZF` will launch fzf in a
height can be adjusted with `g:fzf_tmux_height` (default: '40%'). However, the split-window whose height can be adjusted with `g:fzf_height` (default:
bang version (`:FZF!`) will always start in fullscreen. '40%'). However, the bang version (`:FZF!`) will always start in fullscreen.
In GVim, you need an external terminal emulator to start fzf with. `xterm` In GVim, you need an external terminal emulator to start fzf with. `xterm`
command is used by default, but you can customize it with `g:fzf_launcher`. command is used by default, but you can customize it with `g:fzf_launcher`.

View File

@ -21,7 +21,7 @@
" OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION " OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
" WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. " WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
let s:default_tmux_height = '40%' let s:default_height = '40%'
let s:launcher = 'xterm -e bash -ic %s' let s:launcher = 'xterm -e bash -ic %s'
let s:fzf_go = expand('<sfile>:h:h').'/bin/fzf' let s:fzf_go = expand('<sfile>:h:h').'/bin/fzf'
let s:fzf_rb = expand('<sfile>:h:h').'/fzf' let s:fzf_rb = expand('<sfile>:h:h').'/fzf'
@ -330,7 +330,7 @@ function! s:cmd(bang, ...) abort
let opts.dir = remove(args, -1) let opts.dir = remove(args, -1)
endif endif
if !a:bang if !a:bang
let opts.down = get(g:, 'fzf_tmux_height', s:default_tmux_height) let opts.down = get(g:, 'fzf_height', get(g:, 'fzf_tmux_height', s:default_height))
endif endif
call fzf#run(extend({'options': join(args), 'sink*': function('<sid>cmd_callback')}, opts)) call fzf#run(extend({'options': join(args), 'sink*': function('<sid>cmd_callback')}, opts))
endfunction endfunction