Registered Member
|
I am a new Kate user switching from xemacs. I love Kate except for one thing: I want Kate to indent my code for me like xemacs. However, I'm unable to set this up. There is a tool tip that says "If you want Tab to align the current line like in emacs, make Tab a shortcut to the action Align." S I choose Configure--> Configure Shortcuts and click on "Align" and then click on Align, which is what I think it's trying to tell me. I click on "Custom" and then click on the little microphone button that says "None". The text changes to "Input…" If I then type the tab key, nothing happens. No change at all. If I hold down the option key (I'm displaying back to my Mac) and type tab, I get a weird series of three black squares and a white square. That looks wrong. (not sure how to include an image here…) But I click OK. When I then go to my editor and type option-A as I did in the Configure dialog, it acts just as if I typed the Tab key. It is not doing the "Align" operation.
I really use this feature a lot and it's borderline a deal-breaker for me -- can anyone help? Thanks |
Administrator
|
Unusual - at least on my system i'm able to assign the shortcut as described. Do you use any special keyboard layout, or have any rules being applied through xbindkeys?
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered Member
|
I don't think I have any special layouts or xbindkey rules, but I am far from an X11 expert. I am displaying back to my Mac from our clusters, so perhaps there is some tomfoolery with key bindings. However, the tab key works in other contexts just fine. Not sure why it would suddenly lose its behavior in just this one context. Do you know how to poke at it some more? I used xev to look at what a "tab" key press/release looks like and it looks like a Tab key. I think this is a Kate bug KeyPress event, serial 29, synthetic NO, window 0x3a00001, root 0x201, subw 0x0, time 2897140718, (152,96), root:(1082,843), state 0x0, keycode 56 (keysym 0xff09, Tab), same_screen YES, XLookupString gives 1 bytes: (09) " " XmbLookupString gives 1 bytes: (09) " " XFilterEvent returns: False KeyRelease event, serial 29, synthetic NO, window 0x3a00001, root 0x201, subw 0x0, time 2897140830, (152,96), root:(1082,843), state 0x0, keycode 56 (keysym 0xff09, Tab), same_screen YES, XLookupString gives 1 bytes: (09) " " XFilterEvent returns: False |
Administrator
|
Hmm, that xev output looks correct, and the mapped key symbol matches my system exactly.
When using a terminal such as Konsole, does tab completion operate correctly? Also, in Kate does pressing the tab key cause further indentation (in the form of a tab character or spaces) to be inserted?
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered Member
|
Yes, tabs are tabs everywhere except in that one dialog behavior. Specifically, the answer to your two questions is "yes and yes." In Kate, if I put the cursor before a line of code in a bash script that "should not" be indented and press tab, it inserts a tab character before the line of code. In xemacs, it does nothing as it knows that there should be no indentation. The latter behavior is what I want, which is intelligent indentation with the tab key. Kate is starting to look a little heavyweight and I'm debating to just go back to xemacs because it launches so much faster. I really do like the Symbol List in Kate, though, very convenient, and the fonts are very nicely done, which is a relief on the eyes. So I want to believe… |
Administrator
|
Can you try setting a shortcut in another application to the tab key to rule out any Kate specific bugs?
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered Member
|
I'm not sure what that means. In xemacs, the tab key works properly as a shortcut, so perhaps that is the needed evidence? |
Administrator
|
Unfortunately xemacs doesn't use KDE libraries, so that doesn't help too much.
In another KDE application, can you open Settings > Configure Shortcuts, and attempt to set one of the shortcuts there to the tab key?
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered Member
|
Can you give me an example KDE application to try this on? Sorry, I'm not much of a KDE pro. I just came across Kate and thought maybe it would supplant my xemacs editor. It is a bit heavyweight, so the jury is still out, but some of the features are pretty awesome in terms of look and feel. Thanks |
Administrator
|
You could try Ark, which is an archiving application.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered Member
|
I am not sysadmin so cannot install Ark -- any other ideas? rcook@rzgpu2 (~): Ark bash: Ark: command not found thanks |
Administrator
|
The executable is probably called "ark". Do you have any other KDE applications installed on your system?
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered Member
|
LOL I feel pretty stupid. OK, 'ark' exists of course. It does accept Tab as a keyboard shortcut for e.g. "Show Statusbar." But in kate, if I try the same sequence to assign Tab as a shortcut for Align, it just ignores my keystroke. So this seems very Kate-specific. Not being a KDE expert (quite obviously ), perhaps now is the time to log a bug? |
Administrator
|
Before we file a bug - which version of KDE are you using? Does it help if you unfocus the text area within Kate before trying to set the shortcut?
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered users: Bing [Bot], blue_bullet, Google [Bot], rockscient, Yahoo [Bot]