<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">On 13-02-21 06:21 PM, Lex Trotman
      wrote:<br>
    </div>
    <blockquote
cite="mid:CAKhWKDMMgfo=pUhupvD6Kf-HH+0ygPDWoJ+ZPPB+UeR-tE9ZMA@mail.gmail.com"
      type="cite">
      <pre wrap="">Hi Bob,

Lets just summarise the steps for you to check:

1. You are using Geany 0.21 or 1.22 (older may work but no guarantee)</pre>
    </blockquote>
    <br>
    <pre>
It turns out I had Geany 0.21, so I upgraded to 1.22:
  sudo add-apt-repository ppa:geany-dev/ppa
  sudo apt-get update
  sudo apt-get upgrade

</pre>
    <blockquote
cite="mid:CAKhWKDMMgfo=pUhupvD6Kf-HH+0ygPDWoJ+ZPPB+UeR-tE9ZMA@mail.gmail.com"
      type="cite">
      <pre wrap="">2. You followed Colomban's advice to menu->tools->configuration
files->filetype_extensions.conf and added the two lines from the wiki,
note one is in the [extensions] section and one in the [groups]
section.</pre>
    </blockquote>
    <br>
    <pre>Yes. Under [Extensions], I added
  JSON=*.json;</pre>
    <pre>
..and, under [Groups] I added:
  Misc=JSON;</pre>
    <blockquote
cite="mid:CAKhWKDMMgfo=pUhupvD6Kf-HH+0ygPDWoJ+ZPPB+UeR-tE9ZMA@mail.gmail.com"
      type="cite">
      <pre wrap="">
3. You followed Colomban's advice to copy the filetypes.JSON.conf from
the wiki to your ~/.config/geany/filedefs directory</pre>
    </blockquote>
    <pre>Yes, I started up Geany in Supervisor mode from the command line:
  ~$ sudo geany</pre>
    <pre>Then I copied the code from the wiki into a new file:
    [styling]
    default=default
    number=number
    string=string
    word=word
    identifier=identifier,bold
     
    [keywords]
    primary=true false null
     
    [settings]
    lexer_filetype=YAML
    extension=json
    comment_single=
     
    [indentation]
    width=2
    # 0 is spaces, 1 is tabs, 2 is tab & spaces
    type=0


..and saved the file as ~/.config/geany/filedef/filetypes.JSON.conf</pre>
    <br>
    <blockquote
cite="mid:CAKhWKDMMgfo=pUhupvD6Kf-HH+0ygPDWoJ+ZPPB+UeR-tE9ZMA@mail.gmail.com"
      type="cite">
      <pre wrap="">These steps are all you need to have the filetype recognised for files
with the .json extension, check in the status bar for filetype:JSON
when you open such a file.  If it doesn't work, check your use of
case, thats the most common error, *everything* is case sensitive
including filenames and file contents and extensions.</pre>
    </blockquote>
    <br>
    <pre>Loading MyFile.json loads it as filetype:None</pre>
    <pre>
Saving MyFile.json as MyFile.JSON saves it as filetype:None</pre>
    <pre>
Loading MyFile.json as MyFile.JSON loads it as filetype:None</pre>
    <pre>
Document -> Set Filetype -> Miscellaneous -> JSON file  changes the
filetype to JSON and variable names are bolded and numbers are green</pre>
    <pre>
In short, I am almost there.</pre>
    <pre>
</pre>
    <br>
    <blockquote
cite="mid:CAKhWKDMMgfo=pUhupvD6Kf-HH+0ygPDWoJ+ZPPB+UeR-tE9ZMA@mail.gmail.com"
      type="cite">
      <pre wrap="">4. You put the check_json script somewhere that is in your PATH list</pre>
    </blockquote>
    <br>
    <pre>Hmmmmmmm... I cannot find any trace of /usr/local/bin/check_json

So it appears I don't understand how to use the Build -> Set Build Commands
dialog, which shows "check" in the Name field of the topmost line, followed
by "/usr/local/bin/check_json %f" and I see that /usr/local/bin/
 is already on my PATH:
</pre>
    <pre><big><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><big><tt>~$ echo $PATH
/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games

<big><font size="2"><big><font face="Verdana, Arial, Helvetica, sans-serif">But what does it take for this dialog to generate the check_json script? Clicking Ok does not do it.</font></big></font></big>
</tt></big></font></big></pre>
    <br>
    <blockquote
cite="mid:CAKhWKDMMgfo=pUhupvD6Kf-HH+0ygPDWoJ+ZPPB+UeR-tE9ZMA@mail.gmail.com"
      type="cite">
      <pre wrap="">
5. You edited the build commands and the error exception

This should now give you a "check" item in the build menu when you
have a JSON file open and error messages in the compiler window should
point to the line in the source where it occurs.</pre>
    </blockquote>
    <br>
    <pre><big><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><big><tt><font face="Verdana, Arial, Helvetica, sans-serif">This is where I run into problems.

<tt><font size="2"><font face="Verdana, Arial, Helvetica, sans-serif"><big>Thanks for your patience,

<tt><font size="2"><big><font face="Verdana, Arial, Helvetica, sans-serif">RF</font></big></font></tt></big>
</font></font></tt></font></tt></big></font></big></pre>
    <br>
    <blockquote
cite="mid:CAKhWKDMMgfo=pUhupvD6Kf-HH+0ygPDWoJ+ZPPB+UeR-tE9ZMA@mail.gmail.com"
      type="cite">
      <pre wrap="">

Cheers
Lex

On 22 February 2013 12:14, Bob Furber <a class="moz-txt-link-rfc2396E" href="mailto:burnsmicro@gmail.com"><burnsmicro@gmail.com></a> wrote:
</pre>
      <blockquote type="cite">
        <pre wrap="">Ok, I named the top line of the Build Command dialog "check".

I entered /usr/local/bin/check_json %f in the Command field beside it.

I left the Working Directory field blank.

I entered ([^:]+):([0-9]+) in the Error Regular Expression field at
the bottom of the top block.

Then I clicked Ok and nothing happened. There is no syntax
highlighting of my Json files ..even after restarting Geany.

I am missing something obvious, but I do not see it.

What is it?


Thanks for all your help,

RF


On 13-02-20 02:55 PM, Lex Trotman wrote:

</pre>
        <blockquote type="cite">
          <pre wrap="">On 21 February 2013 09:41, Bob Furber <a class="moz-txt-link-rfc2396E" href="mailto:burnsmicro@gmail.com"><burnsmicro@gmail.com></a> wrote:
</pre>
          <blockquote type="cite">
            <pre wrap="">Some progress, thanks to you, Colomban.

But, still some questions:

What is meant in the wiki by:

- "use /usr/local/bin/check_json %f as the compile command"? Under "Set
Build Commands"
  I have many choices where to place the command, but I do not see a
Compile
command.
</pre>
          </blockquote>
          <pre wrap="">You don't see one because you havn't added it yet :)  Just use the top
line of the dialog, thats traditionally the compile command.  Note,
since you have to give it the name as well, you might want to call it
"check" instead of "compile" since thats what it runs.


</pre>
          <blockquote type="cite">
            <pre wrap="">  I do see a "Make" and "Make Custom Target" commands.

- "..and ([^:]+):([0-9]+) as the Error Regular Expression" is pasted in
the
"Error
  regular expression" field immediately below wherever I paste the
compile
command?
</pre>
          </blockquote>
          <pre wrap="">Yes.

</pre>
          <blockquote type="cite">
            <pre wrap="">Finally, if I am successful, I would be pleased to rewrite this wiki page
to
make it
clearer for dummies like me.

</pre>
          </blockquote>
          <pre wrap="">All contributions welcome.

Cheers
Lex

</pre>
          <blockquote type="cite">
            <pre wrap="">Thanks,

RF

On 13-02-20 12:49 PM, Colomban Wendling wrote:

Hi,

Le 20/02/2013 20:46, Bob Furber a écrit :

The Geany wiki provides instructions on how to add json support.

But I have run into problems:

- I cannot find |filetypes_extensions.conf|, the file I need to
modify on my Linux Ubuntu system.

It may not already exist in your user config, but it's supposed to be in
~/.config/geany/.  You can also open it for editing using
Tools->Configuration files->filetype_extensions.conf from inside Geany.

- I assume I deed to add the new filetypes.JSON.conf to the
/usr/share/geany folder

No, this is the system path, to add a filetype for your user, add it in
~/.config/geany/filedefs/

Regards,
Colomban

Can anyone help me add json support to an otherwise outstanding code
editor?

_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.geany.org">Users@lists.geany.org</a>
<a class="moz-txt-link-freetext" href="https://lists.geany.org/cgi-bin/mailman/listinfo/users">https://lists.geany.org/cgi-bin/mailman/listinfo/users</a>



_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.geany.org">Users@lists.geany.org</a>
<a class="moz-txt-link-freetext" href="https://lists.geany.org/cgi-bin/mailman/listinfo/users">https://lists.geany.org/cgi-bin/mailman/listinfo/users</a>

</pre>
          </blockquote>
          <pre wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.geany.org">Users@lists.geany.org</a>
<a class="moz-txt-link-freetext" href="https://lists.geany.org/cgi-bin/mailman/listinfo/users">https://lists.geany.org/cgi-bin/mailman/listinfo/users</a>


</pre>
        </blockquote>
        <pre wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.geany.org">Users@lists.geany.org</a>
<a class="moz-txt-link-freetext" href="https://lists.geany.org/cgi-bin/mailman/listinfo/users">https://lists.geany.org/cgi-bin/mailman/listinfo/users</a>
</pre>
      </blockquote>
      <pre wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.geany.org">Users@lists.geany.org</a>
<a class="moz-txt-link-freetext" href="https://lists.geany.org/cgi-bin/mailman/listinfo/users">https://lists.geany.org/cgi-bin/mailman/listinfo/users</a>

</pre>
    </blockquote>
    <br>
  </body>
</html>