3 ms·
Recently i’ve taken to using nnn for anything like this: https://github.com/jarun/nnn https://github.com/jarun/nnn - i never used cli file managers but now, it’
by CraigJPerry 5y ago
Recently i’ve taken to using nnn for anything like this: https://github.com/jarun/nnn https://github.com/jarun/nnn - i never used cli file managers but now, it’s up there with my shell, vim & tmux as a core productivity tool.
Show me files in this dir:
$ n
Show/hide details for each:
.
Filter / search file list:
/
Navigate subdirs (or parents) with vim or arrow keys.
Cd into sub dirs by typing unique chars from dir names:
ctrl-n
Drop back to shell i started n from but cd into this new dir:
ctrl-g
Exit n without cd’ing to the new dir i navigated to:
q
https://github.com/craigjperry2/dotfiles/blob/main/dotfiles/zshrc#L59 https://github.com/craigjperry2/dotfiles/blob/main/dotfiles/...
Although for deeply nested targets where i already know what im after, i’ll just:
vim<ctrl+t>
To launch an fzf fuzzy finder on the (.gitignore aware) results of an “fd” (cross platform alternative to gnu and bsd find)
- gen220 5y agoIf you’re already in vim, why not use whatever equivalent to NERDTree is popular? Unless you’re only interested in the structure and names, and not the file contents? It seems like they even have a neovim plugin, you might consider using it.
- CraigJPerry 5y agoThe integration is pretty decent in vim, i have it configured to open a window overlay on <leader>n (requires neovim) https://github.com/craigjperry2/dotfiles/blob/main/dotfiles/init.vim#L12 https://github.com/craigjperry2/dotfiles/blob/main/dotfiles/... That said, i don't find myself using that as much. Usually i'm in the shell when i invoke nnn - i might open a file in vim from nnn though. In vim, i typically lean on fzf.vim more often - usually i know something about the next file i want to open so it just feels more direct.
- RMPR 5y agoI very much like nnn because it's lightweight, but does it have autojump integration[0]? It's the only single reason I am still using ranger. Edit: That and the speed. And since I am more proficient with Python, hacking on Ranger is easier. 0: https://github.com/fdw/ranger-autojump https://github.com/fdw/ranger-autojump
- CraigJPerry 5y agoYeah it comes in the base distribution https://github.com/jarun/nnn/blob/master/plugins/autojump https://github.com/jarun/nnn/blob/master/plugins/autojump But - if you're happy with ranger, i'm not sure it's worth the switch - they're very similar. nnn is quite a bit faster than ranger but other than that, i think ranger has more community support.