Questions tagged [cson]

CoffeeScript-Object-Notation

A serialized form of CoffeeScript.

22 questions
3
votes
2 answers

React Editable Text Component with Custom Syntax Highlighting Support

Good evening all, I need an editable textarea-like component for my React project that supports custom syntax highlighting, preferably with the CSON and CSS. I have been searching it for ages. I finally gave up and decided to ask here. Does anyone…
hevele
  • 903
  • 6
  • 20
  • 38
3
votes
0 answers

Any way to load CSON files via jQuery?

I'm wondering if there's some way I can use something like $.getJSON() to load a CSON file from a server. I don't even know where to start. I've been Googling around but haven't found anything solid. Node.js has a CSON library it can use: data =…
CaptSaltyJack
  • 15,283
  • 17
  • 70
  • 99
2
votes
0 answers

Variables for Javascript in snippets.cson does not work

I am trying to add dynamic snippet on Snippet conf file of Atom : "snippets.cson" . I relied on this thread And i make the following attempts : 1 . body:'var nowSec=${sec}'; variables: sec:'new Date().getSeconds()' 2. body:'var…
Abdennour TOUMI
  • 87,526
  • 38
  • 249
  • 254
2
votes
0 answers

Atom Editor Snippets

I have a simple snippet: '.source.js': 'Console log': 'prefix': '>log' 'body': 'console.log($1)' It worked as expected for a while, perhaps I installed a package or something, but now when I hit tab after typing >log the right brace…
ilrein
  • 3,833
  • 4
  • 31
  • 48
2
votes
1 answer

Atom editor: How do I change toggle-line-comment in the keymap?

This here is what I come up with this far, but can't get it to work '.workspace .editor': 'cmd-7': 'unset!' 'cmd-7': 'editor:toggle-line-comment'
Jørgen
  • 107
  • 1
  • 7
1
vote
1 answer

Only first two code snippets in my snippets.cson work in Atom

I want to use my own code snippets in Atom, but after hours of trying I am still not able to use more than first two of them and I cannot find a mistake. When I was looking for a solution I found many, many topics but the mistake in each of them was…
1
vote
1 answer

Find a string in a file and replace the next lines

I have a CSON (Coffeescript JSON) file that looks something like this: 'main key': subkey: someKey: 'some value' someKey: 'some value' subkey: someKey: 'some value' someKey: 'some value' specialKey: [ …
C1N14
  • 111
  • 10
1
vote
1 answer

Inserting triple quotes inside of triple quotes in cson file

I'm trying to write a some python snippets for the Atom text editor and I would like to have triple quotes inside of a multi-line body but for some reason Atom does not like that. I've tried \\ to escape (as mentioned here near the page) but that…
James Draper
  • 5,110
  • 5
  • 40
  • 59
1
vote
1 answer

Java CSON parser?

Is there already a CSON parser for Java? JSON is very difficult to hand-write (which I will be doing a lot of for this project) and I would rather not make my own CSON parser. If not, is there another easy-to-use alternative to JSON that there is…
Hactar
  • 153
  • 1
  • 10
1
vote
0 answers

Split atom grammar into multiple files

Is it possible to split an Atom cson grammar file into multiple files? eg language.cson would turn into: language.cson ->language.types.cson ->language.statements.cson perhaps something like: 'repository': 'types': 'language.types.cson' …
Allan Chau
  • 693
  • 1
  • 5
  • 15
1
vote
0 answers

How can I modify a language definition file for Atom and have it live-update?

I'm trying to tweak the language definition file for Python, and while it's easy enough to clone and fork the atom/language-python repo, I'm not quite sure how give my edited CSON grammar definition file to Atom to use. Under Windows, the Atom…
Nick T
  • 25,754
  • 12
  • 83
  • 121
1
vote
2 answers

Loading valid CSON always returns [TypeError: undefined is not a function]

I am using the exact CSON from the official CSON docs { # an array abc: [ 'a' 'b' 'c' ] # an object a: b: 'c' } Loading this file (saved in test.cson) always returns an error: #!/usr/bin/env…
mikemaccana
  • 110,530
  • 99
  • 389
  • 494
0
votes
0 answers

Atom language-jenkins plugin to support Jenkinsfile name with wildcard?

The Atom editor plugin language-jenkins highlights the syntax for Jenkinsfile. However, my Jenkinsfiles are not always named Jenkinsfile, but usually have extension: Jenkinsfile-x86, Jenkinsfile-arm, Jenkinsfile-test, etc. How would I need to modify…
Danijel
  • 8,198
  • 18
  • 69
  • 133
0
votes
1 answer

Set Atom config.cson location

Is it possible to set Atom config.cson location, instead of using the default ~/.atom/config.cson? Or at least to be able to use project-relative paths in the config.cson?
user2340939
  • 1,791
  • 2
  • 17
  • 44
0
votes
1 answer

New grammar / syntax highlighting in Atom

I'm trying to make a new, quite simple grammar for Atom, just for my text editing needs. Either that or be able to modify the Markdown grammar. My problem is I cannot seem to even get a test working... This is the guide I followed, I've also tried…
reanseih
  • 73
  • 11
1
2