I haven't seen it mentioned yet, but Ranger is a great alternative tool, it can even be integrated into vim
Show HN: tere – A Faster Alternative to cd+ls
61–70 of 206 posts
Re: Show HN: tere – A Faster Alternative to cd+ls
#62Appreciate this is a hobby project to learn Rust in, but for those who want similar functionality without installing additional dependencies, you can already do this in `vim` by selecting a directory to open instead of a file. For example vim ~ vim /etc It has more or less the same UI as the one in this Show HN but with the added feature of opening any files you select.
Re: Show HN: tere – A Faster Alternative to cd+ls
#63Appreciate this is a hobby project to learn Rust in, but for those who want similar functionality without installing additional dependencies, you can already do this in `vim` by selecting a directory to open instead of a file. For example vim ~ vim /etc It has more or less the same UI as the one in this Show HN but with the added feature of opening any files you select.
As mentioned in another comment, vim doesn't provide exactly the same experience: navigation is more cumbersome because you need extra keystrokes for type-to-search and to cd a folder. It also requires some extra tinkering for vim to print out the cwd when you exit.
That said, I do think your reply here is a little disingenuous because one extra key stroke is hardly "cumbersome". Especially when you advertise your tool as having VIM bindings and then criticise VIM for the same thing. I have no issues with you promoting your tool but lets be pragmatic about our comparisons here.
You also overlooked the fact that VIM will open any documents from within in. Which would save you a lot more key strokes than tere due to not having to `$EDITOR $file` after the whole (tere|vim) {navigate} process.
As for automatically changing directory. Lets be clear, `tere` doesn't either. You need to configure your shell to do that. Granted you provide the code to set that up but there's nothing stopping someone from writing a similar script for VIM (there's a VimLeave event so you could do something like
:autocmd VimLeave *
and the path would be stored in expand('%:p:h')
so it's certainly doable to replicate the same behaviour in VIM. In fact I might even knock up a working script if anything wants it?I'm honestly not saying any of this to be negative about your project here though. It's a nice little tool and I'm sure some people will find it very useful. It's just a common problem so you'll probably find a lot of of people have already solved this with other tools. But there's absolutely nothing wrong with having another tool out there :)
Re: Show HN: tere – A Faster Alternative to cd+ls
#64 xplr.config.modes.builtin.default.key_bindings.on_key.T = {
help = "tere nav",
messages = {
{ BashExec = [[echo ChangeDirectory: "'"$(tere)"'" >> "$XPLR_PIPE_MSG_IN"]] },
},
}Re: Show HN: tere – A Faster Alternative to cd+ls
#65Re: Show HN: tere – A Faster Alternative to cd+ls
#66curl https://raw.githubusercontent.com/mgunyho/tere/master/Cargo.lock | grep source | wc -l 51 How come that such a simple tool has more than half a century of dependencies? This is terrifying.
Well, that's Rust for you. They somehow think that having a boatload of dependencies with nondescript names (smawk, parking_lot_core, serde, clap - I feel like I'm having a stroke) is a feature. I'm not even joking.
Re: Show HN: tere – A Faster Alternative to cd+ls
#67xplr author here (xplr.dev). Nice tool. Note that there's a plugin https://github.com/sayanarijit/type-to-nav.xplr that does something similar. But I just realized that tere can also be used as a more generic type-to-nav helper for xplr. xplr.config.modes.builtin.default.key_bindings.on_key.T = { help = "tere nav", messages = { { BashExec = [[echo ChangeDirectory: "'"$(tere)"'" >> "$XPLR_PIPE_MSG_IN"]] }, }, }
Re: Show HN: tere – A Faster Alternative to cd+ls
#68Congrats for getting this out! > I also wanted an excuse to learn This is the best reason ever, and not just for you: seeing your GIF I thought "could I achieve that with fzf?". Turns out, yes I can: function fcd() { local dir; while true; do # exit with ^D dir="$(ls -a1p | grep '/$' | grep -v '^./$' | fzf --height 40% --reverse --no-multi --preview 'pwd' --preview-window=up,1,border-none --no-info)" if [[ -z "${dir}…
I've been sporting this alias for a while now:
alias pf="fzf --preview='less {}' --bind shift-up:preview-page-up,shift-down:preview-page-down"
You can run `pf` (preview file) in a directory and it opens a split window with fzf where you can preview text files with less and optionally filter down which files are matched with fzf.fzf is great.
Re: Show HN: tere – A Faster Alternative to cd+ls
#69I strongly dislike the idea of automatically jumping into a folder when there’s only one match: it feels like a feature optimised for very slow typers that actively penalises fast typers, because it makes things generally unpredictable: will one character be enough to navigate, or two, or three? It depends on the siblings, and if you type more characters than are required, you will be penalised by ending up somewhere…
> that actively penalises fast typers, I think the word you are looking for is “indirectly”.