Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2008-05

Set the Highlighter from the source file

10 messages · 5 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Damien Gerard

Hi !

Is there a way to specify a hightlighter for the source editor, like vim :
# vim: ts=4 filetype=apache

Actually I have include files (.incl, I know it is not standard) that are not directly recognized as pascal source.

Damien Gerard "Intelligence is 10 million rules." -- Douglas Lenat

Reply by email

Vincent Snijders
to Damien Gerard
Damien Gerard wrote 8 lines
Hi ! Is there a way to specify a hightlighter for the source editor, like vim : # vim: ts=4 filetype=apache Actually I have include files (.incl, I know it is not standard) that are not directly recognized as pascal source.

Right click in the editor -> File settings ... -> Highlighter -> ...

Vincent

Reply by email

Graeme Geldenhuys
to Damien Gerard: Hi ! Is there a way to specify a hightlighter for the source editor, like vim : # vim:…
Damien Gerard wrote
Is there a way to specify a hightlighter for the source editor, like vim : # vim: ts=4 filetype=apache

That would be cool! Include in the feature request the 'tabwidth' or 'tabstop' setting as well! If 'tabstop' is not present, it defaults to 2 spaces for indentation - as per the language standard. ;)

One day, I hope to see 'elastic tabstops', but SynEdit doesn't support dynamic tab positions, otherwise I would have implemented it. :-(

Regards,
- Graeme -

_______________________________________________________ fpGUI - a cross-platform GUI toolkit using Free Pascal http://opensoft.homeip.net/fpgui/

Reply by email

Damien Gerard
to Vincent Snijders: Right click in the editor -> File settings ... -> Highlighter -> ... Vincent

Le May 19, 2008 ? 2:16 PM, Vincent Snijders a ?crit :

Show quoted text 11 lines
Damien Gerard schreef: > Hi ! > > Is there a way to specify a hightlighter for the source editor, like > vim : > # vim: ts=4 filetype=apache > > Actually I have include files (.incl, I know it is not standard) that > are not directly recognized as pascal source. Right click in the editor -> File settings ... -> Highlighter -> ...

I know it but I have a lot of files in the project. Consequently I often open/close tabs.

Damien Gerard "Intelligence is 10 million rules." -- Douglas Lenat

Reply by email

Mattias Gärtner
to Damien Gerard

Zitat von Damien Gerard :

Show quoted text 18 lines
Le May 19, 2008 ? 2:16 PM, Vincent Snijders a ?crit : > Damien Gerard schreef: >> Hi ! >> >> Is there a way to specify a hightlighter for the source editor, like >> vim : >> # vim: ts=4 filetype=apache >> >> Actually I have include files (.incl, I know it is not standard) that >> are not directly recognized as pascal source. > > Right click in the editor -> File settings ... -> Highlighter -> ... I know it but I have a lot of files in the project. Consequently I often open/close tabs.

Right click in editor -> Editor Options -> Color -> File Extensions.

Mattias

Reply by email

Damien Gerard
to Mattias Gärtner

Le May 19, 2008 ? 3:21 PM, Mattias G?rtner a ?crit :

Show quoted text 24 lines
Zitat von Damien Gerard : > > Le May 19, 2008 ? 2:16 PM, Vincent Snijders a ?crit : > >> Damien Gerard schreef: >>> Hi ! >>> >>> Is there a way to specify a hightlighter for the source editor, >>> like >>> vim : >>> # vim: ts=4 filetype=apache >>> >>> Actually I have include files (.incl, I know it is not standard) >>> that >>> are not directly recognized as pascal source. >> >> Right click in the editor -> File settings ... -> Highlighter -> ... > > > I know it but I have a lot of files in the project. Consequently I > often open/close tabs. Right click in editor -> Editor Options -> Color -> File Extensions.

This solution is fine for my needs thanks :)
However, you have to restart Lazarus.

Damien Gerard "Intelligence is 10 million rules." -- Douglas Lenat

Reply by email

Mattias Gärtner
to Damien Gerard

Zitat von Damien Gerard :

Show quoted text 31 lines
Le May 19, 2008 ? 3:21 PM, Mattias G?rtner a ?crit : > Zitat von Damien Gerard : > >> >> Le May 19, 2008 ? 2:16 PM, Vincent Snijders a ?crit : >> >>> Damien Gerard schreef: >>>> Hi ! >>>> >>>> Is there a way to specify a hightlighter for the source editor, >>>> like >>>> vim : >>>> # vim: ts=4 filetype=apache >>>> >>>> Actually I have include files (.incl, I know it is not standard) >>>> that >>>> are not directly recognized as pascal source. >>> >>> Right click in the editor -> File settings ... -> Highlighter -> ... >> >> >> I know it but I have a lot of files in the project. Consequently I >> often open/close tabs. > > Right click in editor -> Editor Options -> Color -> File Extensions. This solution is fine for my needs thanks :) However, you have to restart Lazarus.

Or just close and open the file.

Mattias

Reply by email

Damien Gerard
to Mattias Gärtner

Le May 19, 2008 ? 5:07 PM, Mattias G?rtner a ?crit :

Show quoted text 36 lines
Zitat von Damien Gerard : > > Le May 19, 2008 ? 3:21 PM, Mattias G?rtner a ?crit : > >> Zitat von Damien Gerard : >> >>> >>> Le May 19, 2008 ? 2:16 PM, Vincent Snijders a ?crit : >>> >>>> Damien Gerard schreef: >>>>> Hi ! >>>>> >>>>> Is there a way to specify a hightlighter for the source editor, >>>>> like >>>>> vim : >>>>> # vim: ts=4 filetype=apache >>>>> >>>>> Actually I have include files (.incl, I know it is not standard) >>>>> that >>>>> are not directly recognized as pascal source. >>>> >>>> Right click in the editor -> File settings ... -> Highlighter - >>>> > ... >>> >>> >>> I know it but I have a lot of files in the project. Consequently I >>> often open/close tabs. >> >> Right click in editor -> Editor Options -> Color -> File Extensions. > > > This solution is fine for my needs thanks :) > However, you have to restart Lazarus. Or just close and open the file.

Indeed. However, if lazarus is not restarted, not all of my incl files are highlighted (most of them yes but not all - 4/23 files). As you can see on the screenshot :
http://ftn.shikami.org/misc/Lazarus/highlighted.jpg (The editor settings have been modified before opening `pixiestypes_layout.incl`)

Strange and I can not see some major difference.

Damien Gerard "Intelligence is 10 million rules." -- Douglas Lenat

Reply by email

Mattias Gaertner
to Damien Gerard
Show quoted text 12 lines
[...] > Or just close and open the file. Indeed. However, if lazarus is not restarted, not all of my incl files are highlighted (most of them yes but not all - 4/23 files). As you can see on the screenshot : http://ftn.shikami.org/misc/Lazarus/highlighted.jpg (The editor settings have been modified before opening `pixiestypes_layout.incl`) Strange and I can not see some major difference.

Please provide a bug report.

Mattias

Reply by email

Damien Gerard
to Mattias Gaertner

Le May 19, 2008 ? 8:00 PM, Mattias Gaertner a ?crit :

Show quoted text 17 lines
On Mon, 19 May 2008 17:28:50 +0200 Damien Gerard wrote: > [...] >> Or just close and open the file. > > > Indeed. However, if lazarus is not restarted, not all of my incl > files are highlighted (most of them yes but not all - 4/23 files). > As you can see on the screenshot : > http://ftn.shikami.org/misc/Lazarus/highlighted.jpg > (The editor settings have been modified before opening > `pixiestypes_layout.incl`) > > Strange and I can not see some major difference. Please provide a bug report.

Before creating a bug report, I will try to find out why exactly.

Damien Gerard "Intelligence is 10 million rules." -- Douglas Lenat

Reply by email