Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 31 2019 09:55
    junegunn unlabeled #1314
  • Jan 31 2019 09:55
    junegunn reopened #1314
  • Jan 31 2019 09:47
    junegunn commented #1488
  • Jan 31 2019 09:43
    junegunn closed #1485
  • Jan 31 2019 09:43

    junegunn on master

    Update build instruction Close… (compare)

  • Jan 31 2019 09:31
    taranjlu commented #1486
  • Jan 31 2019 09:30
    taranjlu commented #1486
  • Jan 31 2019 08:33
    sudo-nice commented #1483
  • Jan 31 2019 08:24
    yglukhov commented #1483
  • Jan 31 2019 07:32
    lewisthompson commented #1489
  • Jan 31 2019 06:28
    lewisthompson edited #1489
  • Jan 31 2019 06:27
    lewisthompson edited #1489
  • Jan 31 2019 06:27
    lewisthompson opened #1489
  • Jan 31 2019 05:10
    lungten commented #1487
  • Jan 31 2019 04:48
    lungten commented #1486
  • Jan 31 2019 04:41
    drhayes commented #1487
  • Jan 31 2019 04:38
    lungten commented #1487
  • Jan 31 2019 04:26
    anoopd edited #1488
  • Jan 31 2019 03:47
    anoopd edited #1488
  • Jan 31 2019 03:44
    anoopd edited #1488
Seth Messer
@megalithic
bah nevermind
just thought of a way to fix it :/
just silent it :/
have a great weekend and thanks for the amazing work you do!
Junegunn Choi
@junegunn
@megalithic No, I haven't experienced it. Probably a conflict with some plugin you have I guess.
Gastón Tonietti
@ktonga
hey awesome stuff fzf and fzf.vim!!!! I'm replacing all my ctrlp mappings to use fzf instead, I was able to replace them all but I'm missing just one option from ctrlp MRU, relative=1. That option only shows files under pwd. Is there a way to get the same behavior with :History? Thanks!
Junegunn Choi
@junegunn
This may look cryptic if you're not familiar with Vimscript, but something like this:
command! -bang LHist call fzf#run(fzf#wrap({
\ 'source': map(filter(map(extend(map(range(bufnr('$'), 1, -1), 'bufname(v:val)'),
\                                 v:oldfiles),
\                          'fnamemodify(v:val, ":p")'),
\                      'filereadable(v:val) && stridx(v:val, getcwd()) == 0'),
\               'fnamemodify(v:val, ":.")'),
\ 'options': '--prompt "LHist> " --exit-0'}, <bang>0))
  1. Collect the names of open buffers and the paths in v:oldfiles
  2. Change each path to absolute path
  3. Select paths that are readable and are under the current working directory
  4. Make paths relative to the current directory
Gastón Tonietti
@ktonga
@junegunn Cool! Im not afraid of a little bit of VimScript 😁. Thank you so much, will give it a try.
Gastón Tonietti
@ktonga
@junegunn tried it, works like a charm! I think it could be a nice addition to the default commands in fzf.vim
I have another small question, ctrl+j/k seem to work for navigating the list in fzf used in command line, but only arrows and ctrl+p/n work in vim. Is there an easy way to enable ctrl+j/k navigation within vim?
Junegunn Choi
@junegunn
@ktonga They should work just the same. Maybe you have some mappings that override them? Something like vim-tmux-navigator?
Gastón Tonietti
@ktonga
@junegunn yeah I thought the same, but I uninstalled it and it was the same, can confirm it was removed coz ctrl+j/k stop moving me through windows but they didn't move through elements in fzf panel either.
Another question, is there a way to select an item, open it but keep the fzf panel open? So I can go to multiple places without re executing the command several times? Something like the quick fix window
Junegunn Choi
@junegunn

@ktonga Well, I'm not sure what's going on then. You on Neovim?

As for the second question, no, not at the moment. The only option is to select multiple entries using tab, shift-tab, or alt-a, to build the quickfix list. But I think it's theoretically possible. We could use a tmux pane (or terminal buffer on Neovim) to keep fzf open, and set up execute bindings for sending commands to Vim/Neovim using their RPC mechanisms. But as far as I can tell, no one has experimented with the idea yet. Interestingly, someone actually implemented the very idea on Kakoune, see: https://vimeo.com/200792397

Gastón Tonietti
@ktonga
hey, yeah @junegunn I'm on neovim, you think this C-j/k problems is nvim related?
Gastón Tonietti
@ktonga
Ok will take a look at the video later. using fzf as a first step then selecting multiple element to populate the qf sound a reasonable way to go by now, or maybe I should use qf directly for this very case instead of try to make fzf behave in a way it was not designed for :) thanks a lot for your help
Junegunn Choi
@junegunn
@ktonga Maybe. You could check if there are any conflicting mappings for terminal mode, i.e. :tmap
Gastón Tonietti
@ktonga
fzf is launched in a terminal buffer? didn't know bout that
so it might be that, I have term mappings to move thru windows
Jeff Sutherland
@jdsutherland
i noticed that ncurses was dropped junegunn/fzf#818. as i understand, this should resolve the strange colors for fzf --preview. i'm still having issues. is there any additional config to do? i've done this:
image.png
^ what it should look like, and what i get:
Daniel Gray
@DanielFGray
I jade made a tmux plugin that uses fzf to list urls from the current pane https://github.com/DanielFGray/tmux-fzf-urls
Vitalii Plagov
@plagov
Hello
Does anyone use fzf on the Cygwin?
Will it work if I install Go compiler on the Windows?
Daniel Gray
@DanielFGray
plagov: i think people have had mixed success. your best bet is to just try it and see
@plagov it may work better in the windows subsystem thing. you could also try running linux in a VM (that's got to be a damn sight better than using cygwin)
@junegunn would it be possible for --preview to work with unbuffered output? i had this ridiculous idea to use 3tail -f with it
Seth Messer
@megalithic
evening.. any suggestions for color setup for ripgrep + fzf + neovim?
Junegunn Choi
@junegunn
@jdsutherland You mean the colors are off? I'm not sure but you might want to check out :help terminal-emulator-configuration.
@plagov I'm not a Windows user so I haven't had a chance to try it, but some users have reported that the Windows binary works on Cygwin. See junegunn/fzf#933
Junegunn Choi
@junegunn
@DanielFGray Actually I experimented with the idea for a bit with limited success. It seemed that there's no nice and simple way to keep restarting subprocesses while reading the output streams. I may revisit the idea later, but for now it's not ready.
@megalithic :point_right: :help terminal-emulator-configuration
Sascha Diefenthäler
@alloro
hi ladies, is theree a possibility to take the first command which fzf finds as a result. I want to use it in a script where fzf should match a given directory
Jeff Sutherland
@jdsutherland
i'm trying to pass every line of a text file as input to a command using execute inside a preview. i can't seem to get the syntax right though. i get cat: {}: no such file or directory for:
find ~/Documents/playlists -type f | fzf-down-full -m \
    --preview "(highlight -O ansi {} || cat {}) 2> /dev/null" \
    --bind "ctrl-m:execute:
              qlmanage -p `cat {}`"
i'm guessing i need to use xargs. i've looked at junegunn/fzf#265 as a reference
(the idea is to preview a m3u playlist file and open quicklook with thumbnail images of each video)
Jeff Sutherland
@jdsutherland
i was making that way harder than i needed to
    --bind "ctrl-m:execute:
    cat {} | xargs qlmanage -p"
Daniel Santos Dantas
@dansdantas
Hi, anyone having a little delay using tmux + neovim + fzf?
After i select the file and pressing enter, the screen briefly display everything without colors then open the file.
This does not happen on vim.
Sebastian Schwarz
@seschwar
when i input qux after invoking printf '%s\n' foo bar | dmenu qux is printed to stdout
when i input qux after invoking printf '%s\n' foo bar | fzf fzf exits with a status code of 1
is there a way to make fzf behave the same why as dmenu?
outputting the user's input if nothing else is matched
Sebastian Schwarz
@seschwar
ok, --print-query was what i was looking for
Kuo-tung Kao
@kjelly
Hello everybody. Is it possible that open file without closing search buffer when using Ag command ?