LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > General
User Name
Password
General This forum is for non-technical general discussion which can include both Linux and non-Linux topics. Have fun!

Notices


Reply
  Search this Thread
Old 04-04-2011, 06:41 AM   #1
Aquarius_Girl
Senior Member
 
Registered: Dec 2008
Posts: 4,731
Blog Entries: 29

Rep: Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940
A text editor supporting DIFFERENT fonts according to syntax highlighting rules


KWrite supports syntax highlighting but I can't change the font of according to syntax highlighting rules. There is one font for the whole file.

Same is the problem with QtCreator too.

and I am aware of this site: http://en.wikipedia.org/wiki/List_of_text_editors

But installing and then testing every editor is a painful job.

Is someone aware of a text editor supporting Linux and satisfying my query?

Last edited by Aquarius_Girl; 04-04-2011 at 09:04 AM.
 
Old 04-04-2011, 06:56 AM   #2
corp769
LQ Guru
 
Registered: Apr 2005
Location: /dev/null
Posts: 5,818

Rep: Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007
Hey, have you ever tried out abiword?
http://www.abisource.com/

Josh


Edit - The link was of course for reference. It is definitely in your package manager and all that good stuff!

Last edited by corp769; 04-04-2011 at 06:58 AM.
 
Old 04-04-2011, 06:59 AM   #3
Aquarius_Girl
Senior Member
 
Registered: Dec 2008
Posts: 4,731

Original Poster
Blog Entries: 29

Rep: Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940
Do you mean to say that Abiword supports syntax highlighting? I checked the FAQ.
 
Old 04-04-2011, 07:06 AM   #4
corp769
LQ Guru
 
Registered: Apr 2005
Location: /dev/null
Posts: 5,818

Rep: Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007
I could of sworn I just used syntax highlighting in abiword not too long ago... Let me check...
 
Old 04-04-2011, 07:16 AM   #5
Aquarius_Girl
Senior Member
 
Registered: Dec 2008
Posts: 4,731

Original Poster
Blog Entries: 29

Rep: Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940
HELLO.........There is a BUG in Abiword 2.6.8, when I click the "Edit" -> "Preferences", the Abiword crashes and I tried this 10 times just now

Any menu item I select and it just crashes.

Last edited by Aquarius_Girl; 04-04-2011 at 07:24 AM.
 
Old 04-04-2011, 07:26 AM   #6
corp769
LQ Guru
 
Registered: Apr 2005
Location: /dev/null
Posts: 5,818

Rep: Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007
Well I can confirm that it is not abiword, so I am sorry about that. But I am still looking though, since now I am wondering what the hell I used...
 
Old 04-04-2011, 07:31 AM   #7
Aquarius_Girl
Senior Member
 
Registered: Dec 2008
Posts: 4,731

Original Poster
Blog Entries: 29

Rep: Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940
There is an extension in oowriter: http://extensions.services.openoffic.../download/3543

But it just crashes the writer while installation!

Last edited by Aquarius_Girl; 04-04-2011 at 07:33 AM.
 
Old 04-04-2011, 07:33 AM   #8
Guttorm
Senior Member
 
Registered: Dec 2003
Location: Trondheim, Norway
Distribution: Debian and Ubuntu
Posts: 1,453

Rep: Reputation: 446Reputation: 446Reputation: 446Reputation: 446Reputation: 446
Hi

I don't understand. A text file has no concept of fonts. If you select a paragraph and change the font, how is it supposed to store that in the text file?
 
Old 04-04-2011, 07:42 AM   #9
SigTerm
Member
 
Registered: Dec 2009
Distribution: Slackware 12.2
Posts: 379

Rep: Reputation: 234Reputation: 234Reputation: 234
Quote:
Originally Posted by Anisha Kaul View Post
KWrite supports syntax highlighting but I can't change the font of a particular paragraph. There is one font for the whole file.
Plain text doesn't support "font for paragraph" - this is an office suite(open office)/html/rtf editor feature.
The best you might be able to get is text editor that uses different fonts according to syntax highlighting rules.
 
Old 04-04-2011, 09:02 AM   #10
Aquarius_Girl
Senior Member
 
Registered: Dec 2008
Posts: 4,731

Original Poster
Blog Entries: 29

Rep: Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940
Quote:
Originally Posted by SigTerm View Post
Plain text doesn't support "font for paragraph" - this is an office suite(open office)/html/rtf editor feature.
The best you might be able to get is text editor that uses different fonts according to syntax highlighting rules.
Thanks for clarifying my misconception about text editors.
Actually I want a text editor which supports different fonts for different types of syntaxes. Like a different font for comments and data types. I have started writing the notes on laptop instead of paper, so it contains code too and documentation too. I'll change the title.

Quote:
Originally Posted by Guttorm View Post
I don't understand. A text file has no concept of fonts. If you select a paragraph and change the font, how is it supposed to store that in the text file?
Thanks to you too, I couldn't understand what you were saying, but SigTerm explained it better.

Last edited by Aquarius_Girl; 04-04-2011 at 09:26 AM.
 
Old 04-04-2011, 09:55 AM   #11
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723
I don't understand, did you think text editors allow you to edit fonts like a work processor or did SigTerm misunderstand you?

Quote:
Originally Posted by Anisha Kaul View Post
Thanks for clarifying my misconception about text editors.
Actually I want a text editor which supports different fonts for different types of syntaxes. Like a different font for comments and data types. I have started writing the notes on laptop instead of paper, so it contains code too and documentation too. I'll change the title.
Isn't bold and italic enough? Most editors support that.

I guess that the reason many editors might not have that feature is that if it were implemented, you cannot easily just change your font. You would have to change all the syntax rules in all the languages.

Last edited by MTK358; 04-04-2011 at 09:57 AM.
 
Old 04-04-2011, 10:37 AM   #12
Aquarius_Girl
Senior Member
 
Registered: Dec 2008
Posts: 4,731

Original Poster
Blog Entries: 29

Rep: Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940
Quote:
Originally Posted by MTK358 View Post
Isn't bold and italic enough? Most editors support that.
If bold and italic were enough, I wouldn't have created this thread.
 
Old 04-04-2011, 10:59 AM   #13
SigTerm
Member
 
Registered: Dec 2009
Distribution: Slackware 12.2
Posts: 379

Rep: Reputation: 234Reputation: 234Reputation: 234
Quote:
Originally Posted by Anisha Kaul View Post
Actually I want a text editor which supports different fonts for different types of syntaxes. Like a different font for comments and data types.
Umm... it is possible to make this if syntaxes you need can be explained as regexps(i.e. if it can be explained as a set of syntax highlighting rules).

I do not remember any text editor that can do something like that - normally they're all limited to single font.
You can write one, of course (Qt 4 has QPlainTextEditor class that allows setting text attributes (color/font) for individual characters, and there's syntax highlighter example), but (although it isn't that difficult) that'll take at least few days.

IMO, you have following options:
  • Switch to office suite, html editor or rtf editor.
  • Keep searching. Project like that might exist, although I've never heard about it.
  • Grab existing (opensource) editor that can display bold/non-bold font within same file and fork it to support multiple fonts (bold and non-bold font are two different fonts, so if same editor can display both bold and non-bold fonts at once, it can be probably tweaked to support several different fonts).
  • Write editor from scratch using a gui toolkit (Qt 4).

Last edited by SigTerm; 04-04-2011 at 11:00 AM.
 
Old 04-04-2011, 11:25 AM   #14
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723
It would be easy to do when writing an editor from scratch, just add a font option (apart from the usual color, bold, and italic options) for every syntax rule.
 
Old 04-04-2011, 11:54 AM   #15
SigTerm
Member
 
Registered: Dec 2009
Distribution: Slackware 12.2
Posts: 379

Rep: Reputation: 234Reputation: 234Reputation: 234
Quote:
Originally Posted by MTK358 View Post
It would be easy to do when writing an editor from scratch,
That depends on GUI toolkit.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Simple text editor with syntax highlighting alpha_lt Linux - Newbie 10 07-28-2009 04:22 PM
Actionscript editor or syntax highlighting? lhoff Linux - Software 2 06-23-2008 12:11 PM
Need text editor w/ GOOD CUSTOM SYNTAX HIGHLIGHTING. (Dont care what langs come with) bdb4269 Programming 3 05-02-2007 03:17 AM
syntax highlighting for ls command and vim editor cseanburns Other *NIX 0 01-02-2005 03:11 AM
need editor with syntax highlighting & ftp YBA^[x] Linux - Software 5 12-16-2004 04:29 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > General

All times are GMT -5. The time now is 08:24 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration