Posts

Showing posts with the label Linux

Search all files in Linux and open it in Vim directly

Image
FZF combine with VIM I've recently discovered a neat trick that combines FZF and Silver Searcher (ag) to make my development workflow smoother. If you're like me and you want to respect your .gitignore while using FZF, and you also want to open files in Vim straight from FZF, here's a simple guide: First things first, you'll need to install FZF and Silver Searcher. You can do this easily with the following command: sudo apt- get install fzf silversearcher-ag Once you have these tools installed, the next step is to tweak your .bashrc file to set up the right environment variables. This ensures that FZF respects your .gitignore file by default. Open your .bashrc file with your favorite text editor: nano ~/.bashrc Add the following line to the file: # For respecting gitignore export FZF_DEFAULT_COMMAND= 'ag -g "" ' This command tells FZF to use Silver Searcher (ag) to list files, respecting the .gitignore . Next, let's set up a function i...

Popular posts from this blog

How to Install Microsoft Office on Your PC: A Step-by-Step Guide

Coding On Your Android Phone Using Termux

The Hidden Disk Hogs on Windows Developers Keep Ignoring (And How to Move Them to D:)