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

feat: allow letters/symbols along with numbers to be used for jumping to files #72

Open
tingey21 opened this issue Jul 10, 2024 · 9 comments
Labels
enhancement New feature or request

Comments

@tingey21
Copy link
Contributor

Hey @otavioschwanck ,
Just wanted to run an idea by you for my tiny 34-key split keyboard setup that I want to implement. Since I'm using layers for both the leader key and numbers, I thought it might be cool to have an option to add letters or symbols to our numbered files.
Here's what I'm thinking:
I wanted to add an optional param to let us record a letter or symbol along with the default number?
It'd be totally opt-in, so it wouldn't mess with how things work now.
We could have stuff like:
1 (a). internal/org/service.go
2 ($). internal/org/repo.go

I was thinking after the "Save File" prompt, we could have a quick window pop up where you can add a symbol/letter if you want. Just hit enter to skip it if you don't need one and we would keep settings key protected if the user opts in to mnemonic filing

let me know and I'll get to work 👀

@tingey21 tingey21 changed the title allow letters instead of numbers to be used for identifying the numbers feat: allow letters instead of numbers to be used for identifying the numbers Jul 10, 2024
@tingey21 tingey21 changed the title feat: allow letters instead of numbers to be used for identifying the numbers feat: allow letters/symbols along with numbers to be used for jumping to files Jul 10, 2024
@otavioschwanck otavioschwanck added the enhancement New feature or request label Jul 12, 2024
@otavioschwanck
Copy link
Owner

I will try to do this over the weekend

@tingey21
Copy link
Contributor Author

oh no worries I've been working on implementation I just wanted to see if you we're okay with the idea!

@otavioschwanck
Copy link
Owner

oh no worries I've been working on implementation I just wanted to see if you we're okay with the idea!

awesome!

i loved the idea

@JohanChane
Copy link

JohanChane commented Jul 16, 2024

Originally, I wanted to create a plugin for quickly jumping between buffers. My idea was to jump to the desired buffer with just two key presses (one key press for a pop-up, and another to jump to the buffer). However, I found this project that almost meets my needs.

Here’s my specific design:

  • Display buffers in the order of the jumplist, with selectable keys in front (preferably using easily accessible keys, e.g., fdsa, jkl).
  • Display the buffer's path relative to the current project directory, rather than the current directory. Though I generally like to set Neovim’s current directory to the project directory.
  • On the right side of the buffer path, show the function most recently edited or located in that buffer, along with the line number.

What do you think of the above features? Do you think they are feasible? If it can be achieved, I would really love this plugin.

@xzbdmw
Copy link
Contributor

xzbdmw commented Jul 21, 2024

On the right side of the buffer path, show the function most recently edited or located in that buffer, along with the line number.

That's good idea

@tingey21
Copy link
Contributor Author

I'm back I had some massive Projects to do at work that sunk all my time. I've added logging and tests to this as well to help with development I should have this wrapped up today or tomorrow 👀

@bassamsdata
Copy link

Hello @tingey21, I was going to open an issue regarding the option to use letters instead of numbers for buffer-local or file bookmarks, then I saw this issue.

I believe that asking the user for input after bookmarking a file or position introduces unnecessary friction. It would be ideal if users could opt into this feature through a configuration option. For example, they could set the number of keys, like:
letters = "asdf" , (I choose those letters personally since they’re on the same row), but users could customize them as they prefer, removing the need to display numbers or asking for additional input.

One plugin that does this really well for buffers is snipe.nvim, and I think we could benefit from a similar approach.

@xzbdmw
Copy link
Contributor

xzbdmw commented Oct 21, 2024

@bassamsdata there is a config option index_keys does this.

@bassamsdata
Copy link

@xzbdmw Oh wow, I overlooked it, and this is working amazingly. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants