This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Kate [need help!!! Maybe future request too]

Tags: None
(comma "," separated)
kkate
Registered Member
Posts
2
Karma
0
Hello,

I am not sure if i am posting it on right section but I am missing some options on Kate Editor:

1. I can't use the highlighting as default. For example I want to use nasm syntax highlighting for asm , every time whenever i open the *.asm file. But it always goes to default.

2. I can't make it aligned to the same indentation. It goes to 0 indentation if i go to next line. But it works after saved the source file . For example:

//new from the menu
#include <stdio.h>
int main()
{
<indent> <indentation>
<kate_comes_here>
<indent> <comes_here_if_saved_the_file>
return 0;
}

For that always need to press the TAB button. I have tried to configure from editing option but did not work for me. If i can make it goes to same indentation then perhaps it would better for me (Like kwrite does).

Can it be done please?
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
For #1: Is the assembler that you are editing actually NASM or is it another form of assembler code? If it is actually NASM, then this may be a bug report as it is incorectly recognising the appropriate syntax highlighting to use.

For #2: This is likely because Kate cannot determine the type of syntax highlighting (among other things, which probably includes code folding and indentation rules) until the file is saved (because otherwise it would have to re-evaluate it on each key press). Not sure if it is possible to fix this easily, and without incurring a high performance impact.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
kkate
Registered Member
Posts
2
Karma
0
bcooksley wrote:For #1: Is the assembler that you are editing actually NASM or is it another form of assembler code? If it is actually NASM, then this may be a bug report as it is incorectly recognising the appropriate syntax highlighting to use.

For #2: This is likely because Kate cannot determine the type of syntax highlighting (among other things, which probably includes code folding and indentation rules) until the file is saved (because otherwise it would have to re-evaluate it on each key press). Not sure if it is possible to fix this easily, and without incurring a high performance impact.



It is NASM. But it works sometime , Maybe not perfect(Not sure really). The nasm code:
section .data
tes db "Kate!",10
len equ $-tes

section .text
global _start

_start:
mov eax,4
mov ebx,1
mov ecx,tes
mov edx,len
int 80h

mov eax,1
mov ebx,0
int 80h


I always want *.asm as nasm syntax highlight but not working perfectly. It may a bug too.

In vim or editor like kwrite,notpad++ vim goes to same indentation if it is even normal *.txt file or sources file. I understand it lots of hard work and coding things to fix this things If it is also bug. But hopping Kate developers will have a consider for it.

Thanks for your fast response!
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
In this case, it may be worth asking on the Kate development mailing list (kwrite-devel@kde.org) regarding both the incorrect syntax recognition (ASM vs. NASM) and the determining of syntax before the file has been saved for the first time.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
scummos
Global Moderator
Posts
1175
Karma
7
OS
If you select "Normal" as your default indenter, then I think no indenter is being used until you save the file, since how would kate know which one is appropriate?
If you only work with one language, you can select your desired indenter manually there and it will always be used, even for unsaved files.

Syntax highlighting for unsaved files does not work unless you specify by hand what language you want, I think it was being talked about but the result was that it's impossible to reliably determine the language in the file and not really worth implementing.

Greetings


I'm working on the KDevelop IDE.


Bookmarks



Who is online

Registered users: bancha, Bing [Bot], Evergrowing, Google [Bot], lockheed, mesutakcan, Sogou [Bot]