junegunn / fzf.vim

fzf :heart: vim
MIT License
9.55k stars 583 forks source link

I want to split the window vertically instead of horizontally after doing ctrl-d . #1416

Closed whxcode closed 1 year ago

whxcode commented 1 year ago

After executing: BCommits, I want to change the behavior of ctrl-D from the default horizontal split window to a vertical split window when comparing file differences. This makes it easier for me to compare the differences between the files. I define the code in my .vimrc file, but it doesn't seem to work. let g:fzf_action = { \ 'ctrl-t': 'tab split', \ 'ctrl-x': 'split', \ 'ctrl-v': 'vsplit', \ 'ctrl-d': 'vsplit', } What should I do?

image

junegunn commented 1 year ago

It uses :Gdiffsplit command of vim-fugitive, which splits the window according to your diffopt. Add vertical to it, for example,

set diffopt=internal,filler,closeoff,vertical
whxcode commented 1 year ago

It uses :Gdiffsplit command of vim-fugitive, which splits the window according to your diffopt. Add vertical to it, for example,

set diffopt=internal,filler,closeoff,vertical

thanks your help.