Code Monkey home page Code Monkey logo

Comments (7)

metalelf0 avatar metalelf0 commented on June 15, 2024

Ok, I found the culprit. It's my default shell being set to zsh. I suppose every time the plugin tries to populate the file list, it loads my whole zsh environment, which is quite slow - lot of aliases, shell prompt customization, and stuff. Running let &shell="/usr/bin/env bash" and using bash, which is much less customized on my system, makes the file listing appear instantaneously.

from fzf-preview.vim.

yuki-yano avatar yuki-yano commented on June 15, 2024

They differ in the command they are creating to generate the list.
Is it possible to measure the time required to execute the g:fzf_preview_filelist_command command and the time required to execute the g:fzf_preview_git_files_command command?

from fzf-preview.vim.

yuki-yano avatar yuki-yano commented on June 15, 2024

Since I am doing async load with heavy processing in zinit, zsh startup is very fast
It has nothing to do with this plugin, but setting it can significantly improve zsh startup time.

from fzf-preview.vim.

lynndylanhurley avatar lynndylanhurley commented on June 15, 2024

I'm having the same issue. @metalelf0 where did you set let &shell="/usr/bin/env bash"?

from fzf-preview.vim.

metalelf0 avatar metalelf0 commented on June 15, 2024

@lynndylanhurley I set it manually in vim (via :let ...), but I think putting that at the end of your .vimrc (or init.vim for neovim) would be equivalent. Btw, I tried going the zinit route in my .zshrc, it's really powerful. Pretty steep learning curve, but I managed to reduce my shell startup time greatly and I don't need the &shell hack anymore.

from fzf-preview.vim.

lynndylanhurley avatar lynndylanhurley commented on June 15, 2024

@metalelf0 oh nice, thanks for the tip. I'll check out zinit as well.

from fzf-preview.vim.

yuki-yano avatar yuki-yano commented on June 15, 2024

Did you solve?
close

from fzf-preview.vim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.