For Programmers: Free Programming Magazines  


Home > Archive > Fortran > January 2008 > OT: Notepad2 highlighting file









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author OT: Notepad2 highlighting file
Luka Djigas

2008-01-08, 10:16 pm

An offtopic question really, but maybe it will interest some. Don't
know how many people here use notepad2 (or windows at all, for that
matter) but those who do probably noticed it doesn't have fortran
syntax highlighting.
Since most of my programs are all bundled in one file, and since CVF
internal editor is probably the worse editor since the time of emacs
(not true, but couldn't resist :-) I use it all the time, and miss it
terribly, and are therefore thinking of writing an additional lexer
for the abovementioned.
So I just wanted to check has anybody tried this before (maybe
succeded ? :) and if there's anybody here interested in that at all ?

Also, if anybody knows a place where I could find all fortran keywords
in one place, just so I don't have to rewrite the list from a help
file of a compiler :( For example, in C/CPP this would be ...

!............<copy pasted>...................
KEYWORDLIST KeyWords_CPP = {
"and and_eq asm auto bitand bitor bool break case catch char class "
"compl const const_cast continue default delete do double "
"dynamic_cast else enum explicit export extern false float for friend"
"goto if inline int long mutable namespace new not not_eq operator or"
<cut the rest>




pozdrav
dig
deltaquattro

2008-01-09, 4:32 am

On 9 Gen, 03:40, Luka Djigas <"ldigas@@gmail.com"> wrote:
> An offtopic question really, but maybe it will interest some. Don't
> know how many people here use notepad2 (or windows at all, for that
> matter) but those who do probably noticed it doesn't have fortran
> syntax highlighting.
> Since most of my programs are all bundled in one file, and since CVF
> internal editor is probably the worse editor since the time of emacs
> (not true, but couldn't resist :-) I use it all the time, and miss it
> terribly, and are therefore thinking of writing an additional lexer
> for the abovementioned.
> So I just wanted to check has anybody tried this before (maybe
> succeded ? :) and if there's anybody here interested in that at all ?
>
> Also, if anybody knows a place where I could find all fortran keywords
> in one place, just so I don't have to rewrite the list from a help
> file of a compiler :( For example, in C/CPP this would be ...
>
> !............<copy pasted>...................
> KEYWORDLIST KeyWords_CPP = {
> "and and_eq asm auto bitand bitor bool break case catch char class "
> "compl const const_cast continue default delete do double "
> "dynamic_cast else enum explicit export extern false float for friend"
> "goto if inline int long mutable namespace new not not_eq operator or"
> <cut the rest>
>
> pozdrav
> dig


Hi, Luka,

maybe you could try gVim for Windows:

http://www.vim.org/download.php#pc

Concerning features, gVim does have:
- advanced Fortran syntax highliting (and a zillion others)
- Drag & drop text editing
- Powerful regular expression search and replace, and word, line and
block editing shortcuts (it's vi, after all)
- Rectangular selection
- Brace matching, auto indent, long line marker.
Don't know about the other features.

If you still prefer Notepad2, you could download gVim just to get the
Fortran keyword file (Vim\vim71\syntax\fortran.vim). However, this
file is quite complex, because of gVim very advanced syntax highliting
(automatic free/fixed format detection, distinction between type
declaration keywords, unit header keywords and so on), so it may not
be easy to just extract the plain keywords.

Best regards,

deltaquattro
dpb

2008-01-09, 10:12 pm

deltaquattro wrote:
> On 9 Gen, 03:40, Luka Djigas <"ldigas@@gmail.com"> wrote:
....
[color=darkred]
> maybe you could try gVim for Windows:
>
> http://www.vim.org/download.php#pc
>
> Concerning features, gVim does have:
> - advanced Fortran syntax highliting (and a zillion others)
> - Drag & drop text editing
> - Powerful regular expression search and replace, and word, line and
> block editing shortcuts (it's vi, after all)
> - Rectangular selection
> - Brace matching, auto indent, long line marker.
> Don't know about the other features.
>
> If you still prefer Notepad2, you could download gVim just to get the
> Fortran keyword file (Vim\vim71\syntax\fortran.vim). However, this
> file is quite complex, because of gVim very advanced syntax highliting
> (automatic free/fixed format detection, distinction between type
> declaration keywords, unit header keywords and so on), so it may not
> be easy to just extract the plain keywords.



Or Zeus for Windows has the above features as well altho it's syntax
highlighting isn't as sophisticated (it simply does simple pattern match
against classes of keywords).

It has a reasonably complete list and is quite simple to add to if
there's something you use missing...

(The key choice in my case for picking Zeus is the _most_excellent_ (tm)
:) keyboard matching for the old Brief editor which XP finally made
inoperable even in DOS session :( )

--
Luka Djigas

2008-01-09, 10:12 pm

On Wed, 9 Jan 2008 02:18:56 -0800 (PST), deltaquattro
<deltaquattro@gmail.com> wrote:

|Hi, Luka,
|
|maybe you could try gVim for Windows:

Hello !

Yes, I've tried gVim, used it for, oh, I don't know, three or four
years in college, but was never quite satisfied with it. I always had
to think about the commands (i never like to think about the editor
while thinking about something else). Now they've made cream, which is
a little user-friendlier, but still, oh, I don't know, too bloated and
uncomprehensible still. To make long story short, I think it's a great
editor, only I'm more satisfied with this one at the moment. And it
has all that I need (well, except ...)

But, thank you for the suggestion.

I've looked at fortran keyword file, but found it "quite a mess" -
therefore, still looking for that list :)

pozdrav
dig
Luka Djigas

2008-01-09, 10:12 pm

On Wed, 09 Jan 2008 08:58:57 -0600, dpb <none@non.net> wrote:

|
|Or Zeus for Windows has the above features as well altho it's syntax
|highlighting isn't as sophisticated (it simply does simple pattern match
|against classes of keywords).
|
|It has a reasonably complete list and is quite simple to add to if
|there's something you use missing...
|
|(The key choice in my case for picking Zeus is the _most_excellent_ (tm)
| :) keyboard matching for the old Brief editor which XP finally made
|inoperable even in DOS session :( )

Brief was a nice editor, sniff ....brings back memories, ... EDT and
aurora too ... sniff, sniff :)

I miss the old-dos days ... everything was so much simpler back then.

pozdrav
dig
dpb

2008-01-12, 7:14 pm

Luka Djigas wrote:
> On Wed, 09 Jan 2008 08:58:57 -0600, dpb <none@non.net> wrote:

....
> | ...Brief editor which XP finally made
> |inoperable even in DOS session :( )
>
> Brief was a nice editor, sniff ....


I'm standing corrected -- just by reflex I entered the command line for
a file (I still had an alias pointing to the installed executable) and
lo and behold! Brief opened it successfully w/o hanging on this machine
w/ XP.

I was certain that after the initial OS installation it would "hang" the
DOS window requiring using the Task Manager to kill the session. I
don't know what has caused the change in behavior but I must say I'm
delighted to have it back--my trial period for Zeus expired and I may
now simply uninstall it rather than registering it if this seems to be a
permanent fix.

Of course, keyword highlighting isn't a feature, but I never seemed to
miss it much previously. I've debated whether it would be possible to
write a macro but while I've extended many of the language support ones
for enhanced Fortran editing support, that's an area I've not
investigated at all as to even being possible.

--
JussiJ

2008-01-15, 7:16 pm

On Jan 9, 1:40 pm, Luka Djigas <"ldigas@@gmail.com"> wrote:

> An offtopic question really, but maybe it will interest some. Don't
> know how many people here use notepad2 (or windows at all, for that
> matter) but those who do probably noticed it doesn't have fortran
> syntax highlighting.


FWIW the Zeus editor has support for the Fortran language:

http://www.zeusedit.com/features.html

It will do Fortran syntax highlighting but also has
features like code folding, version control, project
workspace management, class browsing etc.

It is even possible to configure Zeus to run the Fortran
compiler and have it captures the error listing.

http://www.zeusedit.com/forum/viewtopic.php?t=33

Jussi Jumppanen
Author: Zeus for Windows IDE


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com