# What editors do you use for style development?

**URL:** <https://discourse.citationstyles.org/t/what-editors-do-you-use-for-style-development/1552>\
**Category:** CSL Usage\
**Created:** [July 18, 2019, 9:48am UTC](https://discourse.citationstyles.org/t/what-editors-do-you-use-for-style-development/1552 "2019-07-18T09:48:22Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![Denis\_Maier](https://avatars.discourse-cdn.com/v4/letter/d/8491ac/32.png) [@Denis\_Maier](https://discourse.citationstyles.org/u/Denis_Maier)\
**Post date:** [July 18, 2019, 9:48am UTC](https://discourse.citationstyles.org/t/what-editors-do-you-use-for-style-development/1552/1 "2019-07-18T09:48:22Z")

</div>

Which tools do you use for style development? I’ve tried to configure VS Code so that it can validate CSL files… no success so far. So for the moment I’ll have to stay with Emacs, but perhaps there are easier solutions?

---

<div class="post-metadata">

**Author:** ![Bruce\_D\_Arcus1](https://avatars.discourse-cdn.com/v4/letter/b/4bbf92/32.png) [@Bruce\_D\_Arcus1](https://discourse.citationstyles.org/u/Bruce_D_Arcus1)\
**Post date:** [July 18, 2019, 10:43am UTC](https://discourse.citationstyles.org/t/what-editors-do-you-use-for-style-development/1552/2 "2019-07-18T10:43:41Z")

</div>

Been awhile since I’ve edited style files, but I was quite happy doing it in emacs.

Another good rng-validating xml editor, though not free, is Oxygen. May be easier to use for some.

---

<div class="post-metadata">

**Author:** ![Sebastian\_Karcher](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.citationstyles.org/sebastian_karcher/32/176_2.png) [@Sebastian\_Karcher](https://discourse.citationstyles.org/u/Sebastian_Karcher)\
**Post date:** [July 18, 2019, 12:19pm UTC](https://discourse.citationstyles.org/t/what-editors-do-you-use-for-style-development/1552/3 "2019-07-18T12:19:44Z")

</div>

I’ve been using Atom with linter-autocomplete-jing which does validate and even autocompletes (and, of course, you get excellent git integration as a freeby). Before that emacs with nxml mode and magit. Still occasionally use that.

---

<div class="post-metadata">

**Author:** ![Denis\_Maier](https://avatars.discourse-cdn.com/v4/letter/d/8491ac/32.png) [@Denis\_Maier](https://discourse.citationstyles.org/u/Denis_Maier)\
**Post date:** [July 20, 2019, 1:17pm UTC](https://discourse.citationstyles.org/t/what-editors-do-you-use-for-style-development/1552/4 "2019-07-20T13:17:28Z")

</div>

Ok. So at the moment it seems to boil down to Emacs and Atom if you prefer free options. Thanks.

---

<div class="post-metadata">

**Author:** ![Bruce\_D\_Arcus1](https://avatars.discourse-cdn.com/v4/letter/b/4bbf92/32.png) [@Bruce\_D\_Arcus1](https://discourse.citationstyles.org/u/Bruce_D_Arcus1)\
**Post date:** [May 24, 2020, 11:34am UTC](https://discourse.citationstyles.org/t/what-editors-do-you-use-for-style-development/1552/5 "2020-05-24T11:34:23Z")

</div>

> [@Sebastian\_Karcher](#):
>
> I’ve been using Atom with linter-autocomplete-jing which does validate and even autocompletes (and, of course, you get excellent git integration as a freeby).

I was just playing with this and am really impressed with how far Atom and XML-edting on Atom has come.

So I created a CSL validation package [here](https://github.com/bdarcus/atomic-csl).

Two issues I could use help on:

1. how to get it to validate also using the embedded schematron schema (the version in the package repo is updated per a PR I just submitted).
2. how to auto apply the CSL grammar to all files with the csl extension (now, one has to manually select the correct “CSL Style” grammar).

It occurred to me if we could iron this out, we could promote this as the easiest and free approach to CSL editing/validation. Also works across the major platforms; Windows, Mac, Linux.

---

<div class="post-metadata">

**Author:** ![Denis\_Maier](https://avatars.discourse-cdn.com/v4/letter/d/8491ac/32.png) [@Denis\_Maier](https://discourse.citationstyles.org/u/Denis_Maier)\
**Post date:** [May 24, 2020, 2:51pm UTC](https://discourse.citationstyles.org/t/what-editors-do-you-use-for-style-development/1552/6 "2020-05-24T14:51:58Z")

</div>

Very cool, thanks! I’ll have a look.

Concerning 2: I have this in my atom config:

```auto
  "linter-autocomplete-jing":
    rules: [
      {
        outcome:
          schemaProps: [
            {
              lang: "rnc"
              path: "c:/users/denis/.schema/csl/csl-mlz.rnc"
            }
          ]
        priority: 1
        test:
          pathRegex: "\\.csl$"
          rootAttributes:
            version: "1.1mlz1"
      }
      {
        outcome:
          schemaProps: [
            {
              lang: "rnc"
              path: "c:/users/denis/.schema/csl/csl.rnc"
            }
          ]
        priority: 1
        test:
          pathRegex: "\\.csl$"
      }
    ]

```

This selects the appropriate schema for files with the csl extension. Depending on the version attribute it will also use the CSL-M schema.

---

<div class="post-metadata">

**Author:** ![Bruce\_D\_Arcus1](https://avatars.discourse-cdn.com/v4/letter/b/4bbf92/32.png) [@Bruce\_D\_Arcus1](https://discourse.citationstyles.org/u/Bruce_D_Arcus1)\
**Post date:** [May 24, 2020, 4:23pm UTC](https://discourse.citationstyles.org/t/what-editors-do-you-use-for-style-development/1552/7 "2020-05-24T16:23:29Z")

</div>

> [@Denis\_Maier](#):
>
> This selects the appropriate schema for files with the csl extension.

I can’t get that to work ATM. I also don’t know why I need to add that anyway, since Atom does understand the CSL extension.

Anyway, I’ve added these two issues to the README, and added one for future additions. It seems to me it would benefit from some templates and scripts to automate a few pain points in CSL creation and editing.

---

<div class="post-metadata">

**Author:** ![Denis\_Maier](https://avatars.discourse-cdn.com/v4/letter/d/8491ac/32.png) [@Denis\_Maier](https://discourse.citationstyles.org/u/Denis_Maier)\
**Post date:** [May 24, 2020, 7:41pm UTC](https://discourse.citationstyles.org/t/what-editors-do-you-use-for-style-development/1552/8 "2020-05-24T19:41:31Z")

</div>

> [@Bruce\_D\_Arcus1](#):
>
> I can’t get that to work ATM. I also don’t know why I need to add that anyway, since Atom does understand the CSL extension.

Well, I need it because I use CSL-M and CSL so I need to use the appropriate schema. But even without this, how is Atom able to locate the appropriate schema for a csl file?

---

<div class="post-metadata">

**Author:** ![Bruce\_D\_Arcus1](https://avatars.discourse-cdn.com/v4/letter/b/4bbf92/32.png) [@Bruce\_D\_Arcus1](https://discourse.citationstyles.org/u/Bruce_D_Arcus1)\
**Post date:** [May 24, 2020, 7:58pm UTC](https://discourse.citationstyles.org/t/what-editors-do-you-use-for-style-development/1552/9 "2020-05-24T19:58:54Z")

</div>

My naive understanding was Atom knows csl files (see [here](https://github.com/atom/language-xml/search?q=csl&unscoped_q=csl)), and I provided code to tell where the schema is for that file type.

But clearly I’m missing something.

---

<div class="post-metadata">

**Author:** ![Denis\_Maier](https://avatars.discourse-cdn.com/v4/letter/d/8491ac/32.png) [@Denis\_Maier](https://discourse.citationstyles.org/u/Denis_Maier)\
**Post date:** [May 24, 2020, 8:04pm UTC](https://discourse.citationstyles.org/t/what-editors-do-you-use-for-style-development/1552/10 "2020-05-24T20:04:12Z")

</div>

I think Atom will treat csl files as xml files, but that doesn’t necessarily involve auto-completion or validation.

---

<div class="post-metadata">

**Author:** ![gduffner](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.citationstyles.org/gduffner/32/208_2.png) [@gduffner](https://discourse.citationstyles.org/u/gduffner)\
**Post date:** [May 25, 2020, 7:51pm UTC](https://discourse.citationstyles.org/t/what-editors-do-you-use-for-style-development/1552/11 "2020-05-25T19:51:33Z")

</div>

In case of interest for anybody, I’m using Vim together with citeproc-test-runner. Recently, I added a jing syntastic plugin for syntax checking in Vim.

---

<div class="post-metadata">

**Author:** ![Bruce\_D\_Arcus1](https://avatars.discourse-cdn.com/v4/letter/b/4bbf92/32.png) [@Bruce\_D\_Arcus1](https://discourse.citationstyles.org/u/Bruce_D_Arcus1)\
**Post date:** [May 26, 2020, 12:15pm UTC](https://discourse.citationstyles.org/t/what-editors-do-you-use-for-style-development/1552/12 "2020-05-26T12:15:13Z")

</div>

> [@Denis\_Maier](#):
>
> I think Atom will treat csl files as xml files, but that doesn’t necessarily involve auto-completion or validation.

My understanding is Atom will associate .csl extensions with the `text.xml.csl` document type, and that my code then says how to validate that type.

But obviously I’m missing something.

---

<div class="post-metadata">

**Author:** ![gduffner](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.citationstyles.org/gduffner/32/208_2.png) [@gduffner](https://discourse.citationstyles.org/u/gduffner)\
**Post date:** [May 26, 2020, 2:33pm UTC](https://discourse.citationstyles.org/t/what-editors-do-you-use-for-style-development/1552/13 "2020-05-26T14:33:22Z")

</div>

> [@Bruce\_D\_Arcus1](#):
>
> that my code then says how to validate that type

This would work if the code included a resolvable schema url but it doesn’t. Therefore the editor can only check validity against generic XML.

---

<div class="post-metadata">

**Author:** ![Bruce\_D\_Arcus1](https://avatars.discourse-cdn.com/v4/letter/b/4bbf92/32.png) [@Bruce\_D\_Arcus1](https://discourse.citationstyles.org/u/Bruce_D_Arcus1)\
**Post date:** [May 26, 2020, 2:44pm UTC](https://discourse.citationstyles.org/t/what-editors-do-you-use-for-style-development/1552/14 "2020-05-26T14:44:03Z")

</div>

The repo includes the schema, and the path to that schema 😉

---

<div class="post-metadata">

**Author:** ![gduffner](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.citationstyles.org/gduffner/32/208_2.png) [@gduffner](https://discourse.citationstyles.org/u/gduffner)\
**Post date:** [May 26, 2020, 3:56pm UTC](https://discourse.citationstyles.org/t/what-editors-do-you-use-for-style-development/1552/15 "2020-05-26T15:56:09Z")

</div>

Oh, of course. My bad.

I, however, had problems validating against the rng files that I automatically created with trang.

---

<div class="post-metadata">

**Author:** ![Bruce\_D\_Arcus1](https://avatars.discourse-cdn.com/v4/letter/b/4bbf92/32.png) [@Bruce\_D\_Arcus1](https://discourse.citationstyles.org/u/Bruce_D_Arcus1)\
**Post date:** [May 26, 2020, 4:23pm UTC](https://discourse.citationstyles.org/t/what-editors-do-you-use-for-style-development/1552/16 "2020-05-26T16:23:37Z")

</div>

That’s not the issue here though.

I only don’t currently have the association automatic; I have to manually select the “CSL Style” grammar from the UI. I want that to be set when I open a csl file.
