Giter VIP home page Giter VIP logo

fzf.vim's Introduction

I develop and maintain open-source projects that boost developer productivity.

If you like my work, you can support me on GitHub Sponsors.

Many thanks. Take care and stay safe.

fzf.vim's People

Contributors

adnoc avatar alaaibrahim avatar andreasgerstmayr avatar andreypopp avatar andviro avatar antoinemadec avatar atn34 avatar balki avatar blueyed avatar bmundt6 avatar buztard avatar danihodovic avatar dguo avatar doronbehar avatar dprophete avatar dsh2 avatar dvdbng avatar dz84 avatar frederick888 avatar habamax avatar ingomeyer441 avatar janlazo avatar jiz4oh avatar joshpencheon avatar junegunn avatar kaworu avatar liskin avatar nkouevda avatar syphar avatar wookayin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fzf.vim's Issues

Dosn't want to work for MacVim

In regular old terminal vim loads up just fine testing with :Files command, in macvim testing the :Files command it hangs for a second then goes back to the line I was on with zero output at all.

Fzf with arg or with word under cursor

Is it possible to call fzf or fzf#tags with the word under the cursor or pass an argument to fzf.vim so that it expands fzf with the argument? If not, how difficult would this be to implement?

Consider window working directory for commands

I want that fzf respects my .gitignore files, therefore I have the following configured: https://github.com/junegunn/fzf#respecting-gitignore-hgignore-and-svnignore

However, this seems to consider only the .gitignore file of the working directory where vim (in my case neovim) is started. When I do a :lcd in order to change the working directory in vim and then run :Files, the .gitignore file of the newly configured working directory is not considered.

Statusbar background color

How do I change the background color of the status bar?

fzf

By the way, I have just removed ack.vim and ctrlp.vim plugins. Now I am using fzf.vim. Keep the good work!

[vim 7.3] Cannot open files.

Not too sure what I am doing wrong but I installed fzf.vim and it works great.

Then I mapped
nnoremap <silent> <Leader><Leader> :Files<CR>
Which also works perfectly.

The problem is that when I choose a file I get this.

Error detected while processing function fzf#vim#files..73_fzf..fzf#run..38_execute..38_callback:
line 27:
Vim(call):E117: Unknown function: s:common_sink
Press ENTER or type command to continue

:Files new file

Is it possible, while using :Files, to create a new file ?

Recommended Way for Combining Several Sources

Given the super powers of fzf and your helper configurations here, it would be so great if one could easily combine several relevant sources, for example:

Is it possible to easily filter using fzf the outputs from Buffers, History (this includes buffers already) and Files?

Problem with :Files

I'm having an issue with the :Files command. I'm not 100% how to replicate it, but sometimes when I hit ,f (which is mapped to :Files) and hit enter on a file to open it... it doesn't open. This happens fairly frequently, but usually after I've used :Files to open 1-2 files.

It says at the bottom the file name, as if it opened it but the buffer doesn't seem to appear. Then, once I hit another key the buffer appears to flash and disappear.

Now, I am using neovim so that could be the issue but would love some input on how to resolve the issue as I'm really liking fzf so far!

ProjectFiles?

Do we have something automatically run "Files" on project root (if it has .git, .svn, etc), and yet act on current directory if it's not under a project.

Unite has a source called "UniteWithProjectDir", and I remember CtrlP has something similar too. Would be very convenient.

Unknown function: s:expect

When trying to run :GitFiles I am met with this error. I just updated fzf and fzf.vim and this started happening.

Error detected while processing function fzf#vim#gitfiles:                                                                                                                    
line    6:                                                                                                                                                                    
E117: Unknown function: s:expect                                                                                                                                              
E116: Invalid arguments for function <SNR>187_fzf 

Any insights?

Tags it returns empty results

When i run Tags even if i have compiled the tags manualy or let the fzf create it, i have no results.

I am using vim in debian testing

VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Aug 17 2015 03:37:50)
Included patches: 1-826

History: and History/ commands in Neovim

I am running the latest Neovim (NVIM 0.0.0-alpha+201509011923), fzf, and fzf.vim. When I issue the commands History: and History/, the terminal pops up for less than a second and then vanishes. Almost all of the other commands work as expected (I've not tried Windows or Marks, since I don't typically use those features).

I've used the following minimal .nvimrc file to make sure that this wasn't an issue with a different setting:

call plug#begin('~/.cleanvim/plugged')
Plug 'junegunn/vim-peekaboo'
Plug 'junegunn/fzf.vim'
call plug#end()
set rtp+=~/.fzf

No fzf#run function?

Steps to reproduce.

% /usr/bin/vim -u NONE -c 'source fzf.vim' -c 'Files'

Error detected while processing function <SNR>1_files..<SNR>1_fzf:
line    1:
E117: Unknown function: fzf#run
E15: Invalid expression: fzf#run(extend(a:opts, a:bang ? {} : get(g:, 'fzf_window', s:default_window)))

This function does not appear to be defined in this plugin unlike that in the fzf repo.

Is this expected to be user defined?

Command history

It would be nice to search the command line mode history.

Thanks!

Buffers: switching to a term buffer cannot startinsert

I have have the following in my nvimrc. I want to be able to automatically start in insert mode whenever I select a term buffer from the Buffers command. However, I always end up in normal mode :(

   autocmd BufWinEnter,WinEnter term://* startinsert
   tnoremap <c-p><c-b> <c-\><c-n>:Buffers!<cr>

Extract core in separate plugin

Would it be possible to split your plugin in two -- async/sync core for nvim/vim/tmux with API to launch interactive commands and fzf built on top of that core?
Then core plugin would cover some neovim issues as introduce more relations with tmux.
At least it would allow to lauch zsh instead of :shell and ranger for interactive file choosing (it's more slow than fzf for project dirs, but faster for systemwide jumping), as many other interactive commands similar to old good :!, which neovim users currently lack of.
Currently I have extracted some of your code for zsh and ranger to fix my irritation from neovim, but it would be more appropriate to make such plugin by origin author.

Registers?

Is it possible to hook up registers as a source? I tried the following:

function! s:mycommand_sink(cmd)
    let cmd = substitute(a:cmd, '\d..', '', 'g') 
    execute cmd
endfunction

function! s:commands(bang)
  redir => registers
  silent registers
  redir END
  let list = split(registers, '\n')
    call fzf#run({
                \ 'source':  reverse(extend(list[0:0], map(list[2:], 's:format_cmd(v:val)'))),
                \ 'sink':    function('s:mycommand_sink'),
                \ 'options': '--ansi -x --prompt "Registers> " ',
                \ 'window': 'aboveleft 20new'}, a:bang)
endfunction

command! -bang Registers call s:commands(<bang>0)

I don't really know VimScript though, so this code, not shockingly, does not work.

Customizing fzf options for different commands?

What's the best way to use different options for the different commands? for example, I want to use extended search in Lines but fuzzy search in Commands.

Thanks for this great tool! I love it!

command "namespace"

Thanks for this plugin, it's great.

I'm here to make my usual request :) The plugin defines a bunch of commands like History and Lines. But for most users the "namespace pollution" is not worth it because fzf actions are generally bound to normal-mode commands.

For the case where a user wants to try something from the command line, "namespacing" helps the user discover the available commands. This can be done either by prefixing all fzf.vim commands (FzfLines, FzfHistory), or by having a single command that takes sub-commands (Fzf lines, Fzf history) similar to git, hg, etc.

I don't suggest wrapping the default commands in a if !exists('g:fzf_default_commands') guard because that's lame. 馃槄

:Ag doesn't handle autochdir

Select a bunch of files, open the first one and the second won't open because it's a relative path and the current working directory has changed. ag.vim handles this correctly somehow (remember the original directory in the quickfix window?).

":Commands" lists vim commands with extra charaters

I run ":Commands" and get something like

芒~@~GBCommits芒~@~G   

for all the commands. It seems these are space characters. I am using "urxvt" terminal on Ubuntu. On my mac, it is ok and no such strange characters. I think maybe this is not an issue of fzf.vim, but some of my setting problem of urxvt. But I am not sure.

De-duplicate :History

:History contains many duplicated files, for example package.json:

screen shot 2015-10-30 at 11 20 26

Can these be de-duplicated?

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

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.

Tags creation is not async

I just run :Tags in my home directory. It took forever to complete. During that time neovim was completely blocked. I had to kill the ctags process manually in order to give control back to neovim.

Split-size is not kept

When you have 3 splits, layed out like this :

capture

and you run :FZF to open an other file in the top-left split, the bottom split is moved up.

This happens only on "neovim", but I'm not sure whether it should be implemented correctly by neovim or by fzf.vim

capture

In my case, the bottom split is actually a "quick-fix" split, but the bug also happens with normal buffers.

Introduce search files only command

This more or less asks for reverting this commit: ee79457

Or at least it would be nice to have a variant of Ag, that searches only the content of the files. Also, I'm not really interested.

Also, it would be nice to shorten the path of the file a little bit. My paths often span 80% of the entire screen. This makes it hard to see if the match is the one I looked for. For me, only showing the name of the file would probably enough.

Lines command not working

It seems like the "Lines" and "BLines" commands has stopped working properly (see screenshot)?
Tested with the latest version of Neovim.

Everything else works like a charm! :)

fzf

:BTags displays strange results

When I run ":BTags" on a Java file, I got

  check_webkit_exceptions_during_rendering                f       class:WebPageSnapshotter        file:                                                                                                                              ..
  check_resources_loaded_during_rendering                 f       class:WebPageSnapshotter        file:                                                                                                                              ..
  checkWebkitExceptionsDuringRendering                    f       class:WebPageSnapshotter        file:                                                                                                                              ..
  checkResourcesLoadedDuringRendering                     f       class:WebPageSnapshotter        file:                                                                                                                              ..





  DEFAdateRenICE_SPEC                                     f       class:WebPageSnapshotter        file:                                                                                                                              ..
  check_webkit_exceptions_during_rendering                f       class:WebPageSnapshotter        file:                                                                                                                              ..
  checkWebkitExceptionsDuringRendering                    f       class:WebPageSnapshotter        file:                                                                                                                              ..
  BNS_RESOLUTION_MILLIS                                   f       class:WebPageSnapshotter






> snapshotInternal                                        m       class:WebPageSnapshotter        file:                                                                                                                              ..
  1/33
BTags> inter

where I could only select the last one although there were 8 others display above it. There were also huge blank lines in the results. In this use case, what I wanted to select was the last one, so it is okay for now. But I think something is wrong.

Open FZF in current pane

I've noticed a small annoyance with how FZF (and vim fuzzy file selectors in general) work. When I open a file, often I'll be reading the name of the file I want to open from a buffer. I'll split the window into two panes with Ctrl+w v, then open FZF. FZF will create a new pane at the bottom of the screen, often pushing the text containing the name of the thing I want to open off the screen. It's not uncommon for me to forget what the last word or phrase of the filename I'm looking for is, close FZF, read the text again, then open FZF again. All the text moving around abruptly makes me go blank sometimes.

Is it possible to open FZF in the active pane, then put the selected buffer into the same pane?

Here's terrible ascii art kinda showing what I'm asking.

Initial editor pane state, the same buffer open in each pane, with the cursor in top pane.
+-----+
|1    |
+-----+
|1    |
|     |
|     |
+-----+

Now, I open FZF.

What happens now:
+-----+
|1    |
+-----+
|1    |
+-----|
|FZF  |
+-----+

+-----+
|2    |
+-----+
|1    |
|     |
|     |
+-----+


Desired:
+-----+
|FZF  |
+-----+
|1    |
|     |
|     |
+-----+

+-----+
|2    |
+-----+
|1    |
|     |
|     |
+-----+

Toggle exact match

I just switched to fzf. I like the :Lines and :BLines commands - but I notice that they do not do an exact match. Is there a way to toggle between exact match and fuzzy match? Thanks for fzf and fzf.vim.

Problem with :Tags

The only output I get is Binary file (standard input) matches.

I have hunted the issue to this line.

I get the same issue when I run it in my terminal though, so it might be a perl issue.

Toggle selection

Only thing I miss from ctrlp.vim plugin is the toggle selection feature using CTRL-Z. Any chances to have that implemented?

Is there a way to pass a path to :Ag?

This is about the only thing I miss from ag.vim, I used it often to search only sub-paths in my project. I looked at the fzf plugin source, doesn't look like it's there at the moment, would it be very difficult to add this?

One thing I like about this version is that I no longer have to include flags (like :Ag -Q "blah" web/server) but as I see it that might make it difficult to pass it a path. Problem is that the search/reduce once the :Ag pane is open doesn't also search against the filename/path

EDIT: just an edit to say thanks so much for fzf and this plugin, which removed a lot of stuff from my vimrc :)

Custom Locate

Hello,

I want to use a custom Locate and I've managed with: command! -nargs=+ Locate call fzf#run({'source': 'locate -Ai -0 '.<q-args>.' | grep -z -vE "~$"', 'sink': 'e', 'options': '--read0 -0 -1 -m --prompt "Locate> "'}).

That's fine but I'd also like to be able to use the special Ctrl-v/x/t keys. I 've tried copying s:expect() and others in after/plugin/fzf.vim but without much success. Can you help. :)

Cheers

Customizing colors?

The colors for commands like :Ag end up unreadable on my dark terminal. Is there a way to customize these?

Support for screen (like tmux)

This should be as easy asa simply changing the exec from tmux to screen. Could not find it in the documentation. I'd that supported?

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.