diff --git a/README.md b/README.md index 6f39e88..c0dd8cd 100644 --- a/README.md +++ b/README.md @@ -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` also apply here. -If you're on a tmux session, `:FZF` will launch fzf in a new split-window whose -height can be adjusted with `g:fzf_tmux_height` (default: '40%'). However, the -bang version (`:FZF!`) will always start in fullscreen. +If you're on a tmux session or using Neovim, `:FZF` will launch fzf in a +split-window whose height can be adjusted with `g:fzf_height` (default: +'40%'). However, the bang version (`:FZF!`) will always start in fullscreen. 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`. diff --git a/plugin/fzf.vim b/plugin/fzf.vim index f08e017..063bc2e 100644 --- a/plugin/fzf.vim +++ b/plugin/fzf.vim @@ -21,7 +21,7 @@ " OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION " 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:fzf_go = expand(':h:h').'/bin/fzf' let s:fzf_rb = expand(':h:h').'/fzf' @@ -330,7 +330,7 @@ function! s:cmd(bang, ...) abort let opts.dir = remove(args, -1) endif 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 call fzf#run(extend({'options': join(args), 'sink*': function('cmd_callback')}, opts)) endfunction