fzf + ag fuzzy grep

github logo ・1 min read

In my environment, the vg () function described in the official fzf wiki did not work well.
Specifically, a new file with a line number added opens.

I searched and found this issue.

  local line
  line=`ag --nocolor "$1" | fzf` \
    && vim $(cut -d':' -f1 <<< "$line") +$(cut -d':' -f2 <<< "$line")

This function works well. It was very helpful.

twitter logo DISCUSS
Classic DEV Post from Dec 22 '18

Generate and Set Pseudorandom Hexadecimal Background Color Using JavaScript

I'm working on a project that deals with pseudo random event-driven color chang...

matsuikazuto profile image
I am learning English.

DEV is a community of software developers

Sign up (for free)