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

Key to show buffers and switch buffer freezes #1

Closed
Vouivre opened this issue Dec 3, 2020 · 5 comments
Closed

Key to show buffers and switch buffer freezes #1

Vouivre opened this issue Dec 3, 2020 · 5 comments

Comments

@Vouivre
Copy link
Collaborator

Vouivre commented Dec 3, 2020

I opened two buffers in neatvi and I tested the command you implemented to switch buffers: ^s.
As soon as I press "^s" vi freezes and I can do nothing. I have tested "^a" which works.

Just tell me if you need more information.

@kyx0r
Copy link
Owner

kyx0r commented Dec 3, 2020

Hello, I probably should have been more clear in the readme, but the idea there is when you press it it should show all the buffers you have, (max 8) and it waits for an argument between 1-8, so if you press for example combo like this ^s5(linefeed)(linefeed) it will switch to buffer 5. This is relatively new thing, I might change the way it works so that you don't have to press anything extra besides the number after ^s, since there are only single digit buffer count you can have, no need to verify the end of an input. Also I might change the buffers to range from 0-9 to maximize the single digit numbers for use.
2020-12-03-150820-1366x768-scrot
where the list is printed depends on cursor position. Hope this helps, and thanks for checking out the fork!

Answering your other question, I chose to build this editor instead of vim (though i've been using vim for a year+) simply because I think it does too much and I like to have full control of my programs. And C is just perfect for that.

@kyx0r
Copy link
Owner

kyx0r commented Dec 3, 2020

Okay what I mentioned earlier is implemented now. I think it's more useful now.

@Vouivre
Copy link
Collaborator Author

Vouivre commented Dec 4, 2020

Thank you for the explanation, but unfortunately it still doesn't work. Just keep in mind I'm a vim user and I don't know very well the differences between vi and vim. I just discovered I can get a list of all buffers by pressing ":b".

I have tested the keybinds "^a" and "^k" (recently implemented) and it works. What I expect when I press "^s": a list of buffers is displayed. I don't see a list of buffers. But I can do nothing more, I have to kill the process. Before testing it, I opened two buffers and I can switch betweend them with ":b 0" or ":b 1".
For me "^s" means: Ctrl + s. I was not sure, but because "^a" and "^k" works as expected, I assume "Ctrl + s" is the right shortcuts.

I have a minimal installation, perhaps I miss a library on my system. I use the KISS linux distribution, which is based on musl. My terminal is st. My shell at the moment is zsh, but it shouldn't be relevant. Is it possible it has something to do with the terminal ? If you tell me which one you are using, I could also test on my system.

I can produce a debug log if necessary, but I don't know the step to get one. So I need some explanation to get one.

@kyx0r
Copy link
Owner

kyx0r commented Dec 4, 2020

Oh, right. The fact that it locks up is actually correct behavior. It's not neatvi who is locking up, but rather your terminal which intercepts the ^s key. Now I personally have the ^s in shell (bash) disabled, see in my bashrc here. I think it also works in zsh, just add that to your zshrc and test it out. Let me know if that helps, thanks.

@Vouivre
Copy link
Collaborator Author

Vouivre commented Dec 5, 2020

I didn't knew about it. I had to add the same to my .zshrc. Now it works without problem. In between I discovered:

aligrudi/neatvi#2

Thank you for your help!

@Vouivre Vouivre closed this as completed Dec 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants