Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BLines/Lines doesn't respect vim's settings for whitespaces #49

Closed
synaptiko opened this issue Nov 29, 2015 · 5 comments
Closed

BLines/Lines doesn't respect vim's settings for whitespaces #49

synaptiko opened this issue Nov 29, 2015 · 5 comments

Comments

@synaptiko
Copy link

I'm using following vim's settings:

set tabstop=2
set softtabstop=2
set shiftwidth=2
set noexpandtab

set listchars=tab:  ,trail:·,space:·,nbsp:·

But when I run :BLines or :Lines I can see that tab is expanded into 8 spaces which is pretty awful and it makes orientation among lines very hard for me.

@junegunn
Copy link
Owner

fzf as being an external command-line program has its own rendering engine where tabstop of vim does not apply. Currently fzf uses tabstop of 8 and has no option to override it. Adding the option (e.g. fzf --tabstop=2) to fzf is not impossible but, tabstop setting of Vim is local to each buffer and since :Lines will output lines from all open buffers that may have heterogeneous tabstop config, it does not suffice. Which means we have to preprocess tab characters while preparing input to fzf, but it can slow down the processing due to the slow performance and synchronous nature of vimscript.

@synaptiko
Copy link
Author

Ok, I understand and it's unfortunate, I didn't realize that each buffer has own settings.

Although I think that for most cases it would be enough to have --tabstop option because then you could add it to FZF_DEFAULT_OPTS.

@junegunn
Copy link
Owner

I'll consider that.

junegunn added a commit to junegunn/fzf that referenced this issue Nov 30, 2015
@synaptiko
Copy link
Author

Thank you... it seems you've already implemented it 👍

When are you going to release it?

@junegunn
Copy link
Owner

Just released 0.11.1 and applied the new option to the commands (also --reverse). Thanks for the suggestion :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants