Skip to main content

All Questions

0 votes
1 answer
22 views

Can Atom Editor snippets be composed for expansion

Does there exist some inclusion mechanism whereby snippet expansion results in the expansion of other snippets? For example, something along the lines of: 'Part 1' : 'prefix': 'part1' 'body' : '...
w_mark_c's user avatar
0 votes
1 answer
81 views

Atom Snippets for tex files

I have a .tex file to which I want to add snippets. I have tried the following '.source.tex': 'console.log': 'prefix': 'Hello' 'body': 'Hello World!' but it doesn't seem to work. (I have ...
IloveMath's user avatar
  • 241
0 votes
1 answer
109 views

Editing a snippet in a package in Atom

In Atom, if a package contains snippets, how do you edit them or delete/deactivate some whilst keeping the rest? I know I can disable the snippets and copy them into Atom->File->Snippets. ...
user716881's user avatar
0 votes
1 answer
85 views

How can I modify Atom HTML auto complete to change what <p> completes?

I am having trouble changing the autocomplete for <p> in Atom. I want to change the autocomplete from <p></p> to <p> For my snippets.cson I have: '.text.html.paragraph': '...
Kex's user avatar
  • 8,639
1 vote
2 answers
218 views

Atom: how to make newlines with snippets

I'm trying to create a simple snippet: '.source.c': 'prinf': 'prefix': 'souf' 'body': 'printf("%$1\n");' The problem is: it actually makes the newline instead of writing \n: ...
bopol's user avatar
  • 121
1 vote
1 answer
69 views

How to alter existing Atom.io Snippets

I'm looking to alter Atom.io preset HTML/CSS snippets, rather than creating new ones. Specifially looking to change tab Ive tried using the .source in snippets.cson but had no luck I want: link rel=...
Gunnar Hudson's user avatar
-1 votes
1 answer
335 views

VSCode same Snippet with different placeholder

"test": { "prefix": "test", "body": "${1:hello} ${1:world}" } Expected Result: hello world Current Result: hello hello I am trying to create snippet with same index and different ...
Wasim A.'s user avatar
  • 9,878
2 votes
1 answer
105 views

Is there a way to add custom variables when creating custom Atom code snippets?

I want to create custom snippets in Atom, but I want to be able to supply custom variables and it automatically uses those. For example, I want to be able to type something like nm methodName param1 ...
stephenpassero's user avatar
1 vote
1 answer
55 views

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 ...
danielbernatek's user avatar
1 vote
1 answer
105 views

Atom Snippets - Getting saved but not listed and doesn't work

My snippets.cson file : 'source.css': 'Default': 'prefix':'dcss' 'body':""" * { padding : 0; margin : 0; $1 } """ When I save this file, I get no error, but when I type "dcss" ...
Raghunathan's user avatar
2 votes
1 answer
194 views

Atom - Nested snippets with tab stops error

I just started using Atom for LaTeX, and i use a lot of snippets to make my life easier. Now, this often means that i will "nest" snippets, meaning i might use a snippet for a fraction ... \frac{$1}{...
soer9459's user avatar
0 votes
1 answer
273 views

Code snippet in the Atom text editor returns the error: unexpected newline

I've been trying to add my first snippet in the Atom text editor and I keep getting the error that there's an unexpected newline: '.source.js': 'Console log': 'prefix': 'log' 'body': '...
rushikeshmore's user avatar
0 votes
1 answer
43 views

atom <script> snippet, one line

I would like the atom script snippet when I type "script" followed by TAB to be one line instead of as now: <script type="text/javascript"> </script> I am not sure how to add such a ...
Thomas James Thorstensson's user avatar
0 votes
2 answers
81 views

Text editor supports snippets inside snippets without breaking cursor next position

I'm using Atom to write LaTeX and C++. When I use for example a snippet: Prefix 'fr' expands to '\frac{$1}{$2} $3' meaning that typing 'f r TAB' creates the sentence '/frac{}{}' and places the cursor ...
João Pedro's user avatar
0 votes
1 answer
267 views

Atom Snippets not working for Shell Script

I am trying to make a snippet for the headings of a Shell Script, #!/bin/bash Name of program Author And that kind of stuff. But my snippet is not working! Here's my Snippet: "'.text.sh': '...
GlitchyShadowZ's user avatar

15 30 50 per page