Manage Files with lf
lf is a terminal file manager. Having to constantly change directories with the
cd command and preview files with
cat can be slow and repetitive.
lf allows you to quickly navigate your filesystem and preview files with a single vim-like commands.
Install it homebrew with the following command.
lf is as simple as running the
lf command which will pull up the file manager. You can use
hjkl as arrow keys to navigate the files. You can also press
o to open up a file in your editor.
lf is configured with a file located at
~/.config/lf. Here are some simple default options that I like to set.
You can add icon support by install my fish plugin:
Here’s a preview of what it looks like:
I also like to have access to lf while inside neovim, so you can add the following plugin to your LazyVim setup.
You’ll have to restart LazyVim, but after that you can press
<space>+f+f to open lf as a floating window in the directory of the file you have open.
lf over sidebar style file mangers and it is infinitely customizable for your needs. We discussed install it with homebrew, configuring it to show icons, and how to use it in Neovim. Check out the lf wiki to learn how to customize it more.
Sign-Up for New Posts
Stay in the loop and get the latest blog posts about dotfiles sent to your inbox.