Skip to main content
export necessary only the first time
Source Link
Biggybi
  • 2.8k
  • 10
  • 30

I'm not sure why this error occurs (I have exactly the same here), however there's a workaround. So this is not a direct answer, but I hope it helps nonetheless.

You can set defaults options for FZF in your shell config file.

In my case, my .bashrc holds those lines:

export FZF_DEFAULT_OPTS="-m"
export FZF_DEFAULT_OPTS+=" --color='light'"
export FZF_DEFAULT_OPTS+=" --height 40%"
export FZF_DEFAULT_OPTS+=" --bind 'ctrl-u:preview-up,ctrl-d:preview-down,ctrl-o:toggle+up,ctrl-i:toggle+down,ctrl-space:toggle-preview'"
export FZF_DEFAULT_OPTS+=" --preview 'head -500 {}'"
export FZF_DEFAULT_OPTS+=" --preview-window=:hidden"

This is the relevant one:

export FZF_DEFAULT_OPTS+=" --preview 'head -500 {}'"

These settings will be used in vim.

I'm not sure why this error occurs (I have exactly the same here), however there's a workaround. So this is not a direct answer, but I hope it helps nonetheless.

You can set defaults options for FZF in your shell config file.

In my case, my .bashrc holds those lines:

export FZF_DEFAULT_OPTS="-m"
export FZF_DEFAULT_OPTS+=" --color='light'"
export FZF_DEFAULT_OPTS+=" --height 40%"
export FZF_DEFAULT_OPTS+=" --bind 'ctrl-u:preview-up,ctrl-d:preview-down,ctrl-o:toggle+up,ctrl-i:toggle+down,ctrl-space:toggle-preview'"
export FZF_DEFAULT_OPTS+=" --preview 'head -500 {}'"
export FZF_DEFAULT_OPTS+=" --preview-window=:hidden"

This is the relevant one:

export FZF_DEFAULT_OPTS+=" --preview 'head -500 {}'"

These settings will be used in vim.

I'm not sure why this error occurs (I have exactly the same here), however there's a workaround. So this is not a direct answer, but I hope it helps nonetheless.

You can set defaults options for FZF in your shell config file.

In my case, my .bashrc holds those lines:

export FZF_DEFAULT_OPTS="-m"
FZF_DEFAULT_OPTS+=" --color='light'"
FZF_DEFAULT_OPTS+=" --height 40%"
FZF_DEFAULT_OPTS+=" --bind 'ctrl-u:preview-up,ctrl-d:preview-down,ctrl-o:toggle+up,ctrl-i:toggle+down,ctrl-space:toggle-preview'"
FZF_DEFAULT_OPTS+=" --preview 'head -500 {}'"
FZF_DEFAULT_OPTS+=" --preview-window=:hidden"

This is the relevant one:

FZF_DEFAULT_OPTS+=" --preview 'head -500 {}'"

These settings will be used in vim.

Source Link
Biggybi
  • 2.8k
  • 10
  • 30

I'm not sure why this error occurs (I have exactly the same here), however there's a workaround. So this is not a direct answer, but I hope it helps nonetheless.

You can set defaults options for FZF in your shell config file.

In my case, my .bashrc holds those lines:

export FZF_DEFAULT_OPTS="-m"
export FZF_DEFAULT_OPTS+=" --color='light'"
export FZF_DEFAULT_OPTS+=" --height 40%"
export FZF_DEFAULT_OPTS+=" --bind 'ctrl-u:preview-up,ctrl-d:preview-down,ctrl-o:toggle+up,ctrl-i:toggle+down,ctrl-space:toggle-preview'"
export FZF_DEFAULT_OPTS+=" --preview 'head -500 {}'"
export FZF_DEFAULT_OPTS+=" --preview-window=:hidden"

This is the relevant one:

export FZF_DEFAULT_OPTS+=" --preview 'head -500 {}'"

These settings will be used in vim.