chengzeyi / fzf-preview.vim Goto Github PK
View Code? Open in Web Editor NEWfzf :heart: preview
fzf :heart: preview
if a buffer is not saved to a file, or it's a generated buffer, FZFBLines will show a "file not found" although it does have the data.
the border of fzf-preview window is broken, how can i fix this:
all config is default:
local M = {
'junegunn/fzf.vim',
branch = "master",
dependencies = {
'junegunn/fzf',
branch = "master",
build = "./install --all"
}
}
M.config = function()
vim.api.nvim_set_keymap('n', '<leader>sa', ':RG<cr>', { silent = true, noremap = true })
vim.api.nvim_set_keymap('n', '<leader>sf', ':Files<cr>', { silent = true, noremap = true })
vim.api.nvim_set_keymap('n', '<leader>sb', ':Buffers<cr>', { silent = true, noremap = true })
end
return M
FZF Lines
command that searches in all open buffers, doesn't seem to have preview.
Should we add preview support for that as well ?
Thanks for your support.
Preview feature is broken (for all commands of this plugin).
In the preview window, always a first few lines of the file are shown. It no longer shows the matched line the preview window. You can see for yourself in the image below:
The cursor is on the first line of the search result (line 74), however in the preview window only a first few lines (lines 1-34) of the files are shown.
I haven't debugged it, but I guess It's probably because FZF now expects a little different format.
I really love this plugin, thanks @chengzeyi for creating it ! Will be great if we can get it working again.
So currently, all FZF preview commands (FZFMarks, FZFQuickFix, FZFBLines, etc.) show exactly 5 lines before the target line in the preview window. That value is actually hard coded (to 5) in this plugin's source code.
Can we make it configurable please ? (via a global variable may be). That way users can adjust its value manually so that the target line appears in the middle.
In my monitor, I can see around 50 lines in the preview window, showing just 5 lines before and the rest of the lines (45 lines) after the target line doesn't really help to get the best context around the target line. With that config, I can just change the value to 25.
Ideally, fzf plugin should automatically put the line in the middle. I have opened a bug for that, but it doesn't look like it will be done anytime soon.
It will be even better if this plugin could implement automatic target line middling, but not sure how hard that will be. Making it configurable should be pretty easy.
Thanks for your support !
FZFBLines opens the FZF window and does the search successfully. However, when I press enter on a line, it fails to open that line in the terminal buffer.
Below is a screenshot of the error message:
I think you need to fix the callback for terminal mode. I have been seeing this issue since I installed your plugin, but forgot to report the bug.
Thanks for your support !
FZFQuickFix command's preview is still broken (with the issue I mentioned earlier). Could you fix that please.
Appreciate your support @chengzeyi !
My apologies in advance, if either my question is stupid or if I am blunt, but it is not clear what the plugin additionally does, when compared to fzf.vim. What I understood so far, is by pressing CTRL + /
is toggles the preview window. Thanks.
Actually, you didn't fix it for all commands, eg: FZFQuickFix/FZFLocList still don't have the line in the middle.
edb44f5
Could you fix it for all FZF preview commands of your plugin please. (Let me know if you would like me to send out a PR).
Something like,
command! FZFShow call fzf#run(fzf#wrap({
\ 'source': 'git show --format=oneline --name-only --relative | tail --lines=+2',
\ 'sink': 'e',
\ 'options': '--multi --reverse --preview "git diff HEAD^ HEAD {} | git-split-diffs --color | less -RFX" --preview-window "up,80%,rounded"',
\ }))
I love this plugin, thank you so much! :)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.