Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add comparison to laughedelic/pisces #4

Closed
evanrelf opened this issue Jan 15, 2021 · 8 comments
Closed

Add comparison to laughedelic/pisces #4

evanrelf opened this issue Jan 15, 2021 · 8 comments
Labels
meta News, and communication

Comments

@evanrelf
Copy link

A similar plugin for auto-completing matching pairs already exists for fish: https://github.com/laughedelic/pisces

I'd be curious to hear what the pros and cons of the two plugins are, and it would be good to list in the README.md file.

@jorgebucaran jorgebucaran added the meta News, and communication label Jan 16, 2021
@jorgebucaran
Copy link
Owner

Good question! Autopair is better maintained, smarter, smaller, faster, and focused on doing one thing well.

Better maintained

Autopair is better maintained and you can expect it to work seamlessly with Fisher.

We spent about a month trying to convince the author of Pisces to merge Fisher 4.x support, and although he had a useful discussion, it was time-consuming and exhausting for me. I could've been using this time to work on other projects, create new plugins, enhance Fisher, and so on.

Smarter

In the process of making Autopair, I discovered Pisces had bugs that couldn't be addressed without rewriting it from scratch. Autopair auto-completes only when it makes sense to do so, for example, when the cursor isn't next to a boundary character:

$ git commit -m Rewrite for Fish 3.0

" 🥊

$ git commit -m "⎢Rewrite for Fish 3.0

Autopair handles identical pairs intelligently, e.g., only when the pair is balanced:

$ "hey (

" 🥊

$ "hey ("⎢

This is more than just checking if you're at the end of the line. Autopair respects this behavior regardless of where the cursor is positioned. Auto-balancing alone fixed issues I had for years with Pisces.

Smaller

Autopair consists of fewer files, and about ½ of Pisces in LOC. That's 100 lines of code less. Less usually means that Autopair will be faster. Performance is critical for a tool that evaluates Fish commands as you type! If that wasn't the case I wouldn't be using it myself.

Do one thing well

No configuration. You want to auto-complete matching pairs in the command line and that's all you get. We're also not trying to chew more than we can bite.

@evanrelf
Copy link
Author

Awesome ✨ Thanks!

jorgebucaran referenced this issue in Princesseuh/dotfiles Jan 19, 2021
@jorgebucaran jorgebucaran pinned this issue Jun 24, 2022
@NormTurtle
Copy link

but plugin not working for me?

@NormTurtle
Copy link

image
as i typed that after t of what shoud have "

@jorgebucaran
Copy link
Owner

Not sure what you mean.

@NormTurtle
Copy link

simple.mp4

see here "autopair" feature not working

@jorgebucaran
Copy link
Owner

Thanks for the demo. Can you try something? Uninstall all plugins except Fisher and autopair, start a new session, and try again.

If that doesn't fix it, please share your config.fish with me. There might be something in it that's affecting autopair.

@NormTurtle
Copy link

i think i have fixed the issue. not sure how!!? but thx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
meta News, and communication
Projects
None yet
Development

No branches or pull requests

3 participants