Comments (15)
You are likely running it like :?
in hund? Everything works on my side, just press '?' while you are in hund. Worst case scenario run xev
and see if your keycode for "?" matches mine. By "virtual terminal" I assume you mean tty?
from nextvi.
I simply press ?
in hund
. We are in the worst case scenario. When I press ?
, I get from xev
KeyPress event, serial 32, synthetic NO, window 0x2400001,
root 0x1a0, subw 0x0, time 1420270, (1019,462), root:(1020,482),
state 0x1, keycode 20 (keysym 0x3f, question), same_screen YES,
XLookupString gives 1 bytes: (3f) "?"
XmbLookupString gives 1 bytes: (3f) "?"
XFilterEvent returns: False
With the help of xmodmap -pk
I was able to find that keycode 61 is bound to -
:
KeyRelease event, serial 32, synthetic NO, window 0x2400001,
root 0x1a0, subw 0x0, time 1538471, (998,407), root:(999,427),
state 0x0, keycode 61 (keysym 0x2d, minus), same_screen YES,
XLookupString gives 1 bytes: (2d) "-"
XFilterEvent returns: False
I mean tty with "virtual terminal". Now I will know the correct word, sorry!
from nextvi.
Well, this may be caused by some unusual keyboard you are using or some other system misconfiguration.
from nextvi.
I have a /etc/X11/xorg.conf.d/10-keyboard.conf
file with the following:
Section "InputClass"
Identifier "system-keyboard"
MatchIsKeyboard "on"
Option "XkbLayout" "ch"
Option "XkbVariant" "fr"
EndSection
If I delete this file, I have the english keyboard and the keycodes are switched:
- I get keycode 61 for
question
- keycode 20 for
minus
But even with the english keyboard, it doesn't work. In hund
I simply press ?
and nothing happens. I'm not sure I need hund
, so unless you have another idea, I will first check that I need hund
. Probably the history buffer that you have implemented will be enough.
from nextvi.
Strange. Could you do me a favor and put printf("%s", (char*)buf);
right there https://github.com/kyx0r/neatvi/blob/master/hund.c#L5967
Tell me what comes out, you can only see the printf output when you close vi, so after you press '?' just "qqqq". Also, does the '?' functionality in vi work correctly? It should do the reverse of what '/' does.
from nextvi.
Also, what is your locale set to ? Check the output of locale
Just changing that xorg conf might not do it, since I am not very convinced that X11 controls what the terminal reads. I come to think that just setting your locale might be the bingo, so for example run export LANG=C
and see if that fixes it. Ofc you don't have to change your entire system locale if that's the case, you can just put that export command in your zshrc and it will be only for terminals.
from nextvi.
?
is the reverse of /
in vi, so it works correctly. I have change like the following:
} while (rd < 0 && errno == EINTR && errno == EAGAIN);
FD_CLR(fd, &rfds);
printf("%s", (char*)buf);
return rd;
And after quitting vi, it prints
?qq%
perhaps %
comes from my shell zsh
.
With your suggestion about locals, it's could be the problem. I have no command locale
. After searching, I found locale
is a glibc
command. My distribution, KISS Linux, is built on musl
, not glibc. If I do
export LANG=C
it doesn't help. But probably it only make senses with glibc
.
from nextvi.
I am starting to think that this might be a bug in hund since it read the character '?' correctly, but still it does not make any sense what could be off. Let's continue debugging then. Sorry I forgot that KISS linux does not have locale, I don't use KISS linux at the moment but I did in the past, partly why is because I spent eternity configuring my kernel to get the touchscreen to work and still it did not, what a mess. Did you get all your hardware to work on it? I don't think where was even any kind of synaptic xorg driver in the kiss repos back then.
Back to the topic, put printf("%d\n", i->kmap[m].c); abort();
https://github.com/kyx0r/neatvi/blob/master/hund.c#L4525 here. That should print 2. If it does not print anything we found a bug in this code. Also try to put prints in some other areas and give me the outputs if you can so that I have more info to go off with. Or you can try to fix the bug yourself, it may be caused by something silly.
from nextvi.
Actually, forget about everything I just said, I think I know why it's not working. The help page apparently uses a pager like less
or whatever is $PAGER in your environment. But since it's KISS it does not have a pager installed i think? It obviously does not work. See here https://github.com/kyx0r/neatvi/blob/master/hund.c#L1762
from nextvi.
Concerning KISS linux: I have also a touchpad. It works without a problem. Keep in mind I only need to use it as a mouse and to use the buttons. I disabled tapping. I think it's possible to use other features in the touchpad, like: putting the finger on the right and going from top to down to emulate the scrolling. I don't need something like that if it's possible. So I can't give you a feedback. If you have any question, I can search exactly what I installed and I can help you if possible. I had not a lot of problem with the kernel. Feel free to ask , you have my email address!
I added printf("%d\n", i->kmap[m].c); abort();
and effectively it prints 2.
I have less installed, but the variable $PAGER was not defined. I added the following to my .zshrc
:
export PAGER=less
I closed my terminal and restart a new one. I think it's not necessary to reboot. It doesn't work.
I can see in the code that less
is used and sh
. less
and sh
in KISS linux are the ones of busybox
, not the standard versions. Could it be a problem ?
from nextvi.
Hhhmmm, bad: when I write a character like é
in a terminal it displays <dfe9>
. It works in Xorg applications like firefox
, but not in terminal anymore. I use st
. It happends after modyfing the code of hund
. If I reboot it doesn't help. Do you have an idea what happened ?
from nextvi.
No idea, anyway I am not sure how experienced you are as a C programmer but, you can find how the help is implemented here https://github.com/kyx0r/neatvi/blob/master/hund.c#L1927
By the way, well you can also try typing :h
in hund or ':help' and that should do the same as '?' . If that does not work then we know that the busybox version of less behaves somehow differently from others.
from nextvi.
As you have probably seen, I have some remembers from some years ago in C, but for now it's too difficult for me to understand how the help is implemented. But I can look at the shortcuts in the code.
But in between, bingo! I had a look in the available packages and less
is available. After installing it, it works perfectly! But with less
of busybox
, it doesn't work.
As a side note, it seems to be a bad idea on a musl
system to set export LANG=C
. It's the reason why I had problems with accented characters after setting it! I have to search why.
I let you close this issue. Perhaps you will only close it, or add a remark in your FAQ. But this issue won't appear very often.
Thank you very much for all your help!
from nextvi.
Makes sense, the C locale does not support UTF, but it should have not been persistent unless you did do add that export command into .zshrc. That is why I was confused as to why reboot did not help you. I see a solution in the future for this kind of issue is to not use a pager in hund at all, and just display help the native way everything else gets displayed. See this is what i mean by when programs call other programs... It's just unreliable blackbox, well now you've seen it for yourself in real life experience. Well I am glad we managed to solve this one.
from nextvi.
Closing issue, pager is no longer a requirement.
from nextvi.
Related Issues (20)
- segfault when trying to edit file that doesnt exist or is a directory HOT 3
- stdin pipe breaks all syntax highlighting HOT 1
- Issues with stdin_pipe HOT 14
- Is gf bind in normal mode that edits the file whose address is under the cursor, a thing in Nextvi? HOT 6
- arrowkeys_normal.patch shouldn't exit insert mode HOT 24
- Remove variable length arrays HOT 14
- arrowkeys_insert: the first time entering command mode, the command bar is broken until you type something HOT 1
- gcc warning HOT 2
- visual mode equivalent? HOT 2
- ec_closebuf segfaults if it is the only remaining buffer HOT 1
- Float without leading zero HOT 2
- a way to change how big tabs are HOT 1
- soft line wrap? HOT 1
- implementing vim-like dw HOT 3
- stdin_pipe: lockup if stdin is terminal HOT 5
- Skip command confirmation when only one line HOT 1
- arrowkeys_insert: cursor position is wrong when moving up or down a line after typing something HOT 6
- Segmentation fault HOT 3
- Edge case of missing filename HOT 3
- ex "!" HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nextvi.