Closed markwu closed 5 years ago
Here comes with my settings, nothing else:
let g:fzf_command_prefix = 'Fzf'
nnoremap <silent> <Space><Space> :FZF<CR>
nnoremap <silent> <Space>f :FzfFiles<CR>
nnoremap <silent> <Space>b :FzfBuffers<CR>
nnoremap <silent> <Space>r :FzfHistory<CR>
nnoremap <silent> <Space>l :FzfBLines<CR>
nnoremap <silent> <Space>L :FzfLines<CR>
nnoremap <silent> <Space>c :FzfColors<CR>
nnoremap <silent> <Space>? :FzfHelptags<CR>
nnoremap <silent> <Space>hc :FzfHistory:<CR>
nnoremap <silent> <Space>hs :FzfHistory/<CR>
nnoremap <silent> <Space>t :FzfTags <C-R><C-W><CR>
nnoremap <silent> <Space>T :FzfTags<CR>
nnoremap <silent> <Space>o :FzfBTags <C-R><C-W><CR>
nnoremap <silent> <Space>O :FzfBTags<CR>
nnoremap <silent> <Space>m :FzfMarks<CR>
I am tracing the code, it seems fzf.vim
only support vim8 build in terminal inside gui_running
. Can you enable it for macvim inside terminal? I have been use terminal for a while, it quite stable.
Change /usr/local/opt/fzf/plugin/fzf.vim
line 395-396 to the following code, solve the problem.
let use_term = has_nvim_term ||
\ has_vim8_term && !has('win32unix') && (has('gui_running') || has('gui_macvim') || s:is_win || !use_height && s:present(dict, 'down', 'up', 'left', 'right', 'window'))
You can force the plugin to use terminal buffer by setting g:fzf_layout
with window
option like so:
let g:fzf_layout = { 'window': 'bot20new' }
" 40% of the screen height
let g:fzf_layout = { 'window': 'bot'.float2nr(0.4 * &lines).'new' }
See https://github.com/junegunn/fzf/blob/master/README-VIM.md#fzf-inside-terminal-buffer
I suppose
fzf.vim
should looks the same, no matter in macvim(gui/text) or neovim. But I just found the status line of fzf.vim disapper in macvim(text mode, under iterm2). Do I do anything wrong?Neovim 0.40-dev(HEAD)
(Inside iterm2, statusline is there):Macvim 8.1-1722
(text mode
, inside iterm2 and apple terminal, statusline disappered)Macvim 8.1-1722
(gui mode
, statusline is there)My fzf version is
0.18.0
, installed from homebrew, and my fzf.vim is install from vim-plug with master branch.