The Tilde Text Editor
Frequently asked questions
- Why do I see x's and q's where there should be lines?
- My terminal supports 256 colors, why can I not choose them from Tilde?
- Why does shift/ctrl + navigation key not work on terminal X?
- Why does shift/ctrl + navigation key not work in an SSH session started from the linux console?
- Why does shift-ctrl + navigation key not work in GNU screen?
- Why does shift/ctrl + navigation key not work in tmux?
Why do I see x's and q's where there should be lines?
This is most likely due to an incorrect terminfo entry. To draw lines, Tilde (or rather libt3window) uses the so called Alternate Character Set, which changes the rendering for certain characters. If however the sequence in the terminfo database indicating how to switch to the Alternate Character Set is incorrect, the switch will not occur and the characters are rendered as normal.
The best way to fix this is to correct the terminfo entry (possibly by filing a bug for the (n)curses package in your distribution). However, to work around this problem you can also set the T3WINDOW_OPTS environment variable. If the T3WINDOW_OPTS variable contains acs=utf8, libt3window will use UTF-8 characters to draw the lines. This may or may not be supported by your terminal, and libt3window will try to detect this. If the output is garbled, the T3WINDOW_OPTS variable can also contain acs=ascii which will use ASCII characters to draw the lines. This does not look as nice, but is supported on all terminals.
To make this change permanent (for example for the linux console), add the following to your .bashrc or equivalent for your shell:
if [ "$TERM" = linux ] ; then export T3WINDOW_OPTS=acs=utf8 fi
My terminal supports 256 colors, why can I not choose them from Tilde?
Tilde (or rather libt3window) uses the terminfo database to tell it how many colors the terminal supports. Sometimes, this is not correct, or it has a separate entry for the terminal version with extra colors. For example, the xterm entry says that XTerm supports 8 colors, while the xterm-256color entry says that XTerm supports 256 colors.
To make Tilde use 256 colors, either ensure that your TERM environment variable is set to the 256color variant (see the documentation of your terminal on how to do this on every start), or add colors=256 to the T3WINDOW_OPTS environment variable. For example, if you wish to make this change for XTerm, you could add the following to your .bashrc or equivalent for your shell:
if [ "$TERM" = xterm ] ; then T3WINDOW_OPTS=colors=256 fi
Why does shift/ctrl + navigation key not work on terminal X?
This is most likely due to the fact that the terminal does not generate distinct escape sequences for the navigation key and the navigation key in combination with the modifier(s). For most terminals this can not be changed, other than by changing the source code for the terminal. The one notable exception is the linux console. See the file supplemental.kmap in the libt3key documentation directory for more details.
The other possibility is that the terminal does generate distinct escape sequences for the keys, but Tilde (or rather the libt3key database) does not know about them. To verify this, run the t3learnkeys program distributed with libt3key with the -s option and check to see if pressing the navigation key with and without the modifier yields different escape sequences. (When asked for the escape sequence for the desired mode, enter smkx or, if that yields an error message, -) Should you find that two different escape sequences are produced by this terminal, please file a bug in the libt3key Bugzilla, specifying the terminal used and (if applicable) its version. Note however, that for the linux console Tilde (or rather its support libraries) use a hack to query the status of the modifier keys. Therefore t3learnkeys will not show different sequences, even though Tilde will work correctly when run on the console.
Why does shift/ctrl + navigation key not work in an SSH session started from the linux console?
If you did not modify the key mapping for the linux console (see previous question), Tilde (or rather its support libraries) use a hack to query the linux console about the status of the modifier keys. This hack only works on the local computer, and not over an SSH session. To make shift/ctrl + navigation key work in an SSH session started on the linux console, you have to modify the linux keyboard mapping (see the previous question).
Why does shift-ctrl + navigation key not work in GNU screen?
GNU screen translates the escape sequences generated by the terminal it is running in, to a standardized set of escape sequences. This is done to prevent problems when re-attaching to a session from a different terminal. However, by default only a limited set of keys are translated. Other key sequences are passed through unaltered. The definition for screen contains the definitions for the XTerm keys. Keys for other terminal can be mapped by adding bindkey statements to your screenrc.
Why does shift/ctrl + navigation key not work in tmux?
tmux, like GNU screen, translates the escape sequences generated by the terminal it is running in, to a standardized set of escape sequences. This is done to prevent problems when re-attaching to a session from a different terminal. However, by default only a limited set of keys are translated. Other key sequences are by default suppressed. If running Tilde in your terminal directly does have working shift/ctrl + navigation key, then adding the line:
set-window-option -g xterm-keys on
to your ~/.tmux.conf or to /etc/tmux.conf should solve the problem. Note however that this will not work when running tmux from a linux console.