Skip to content

Commit 31dae54

Browse files
committed
Update README.md
1 parent 00d11f9 commit 31dae54

File tree

1 file changed

+41
-16
lines changed

1 file changed

+41
-16
lines changed

README.md

Lines changed: 41 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,19 @@
66
77
[![Version](https://img.shields.io/github/release/runxel/GDL-sublime.svg?style=flat-square)](https://github.com/runxel/GDL-sublime/releases/latest)
88
[![Downloads](https://img.shields.io/packagecontrol/dt/GDL?logo=sublime%20text&style=flat-square)](https://packagecontrol.io/packages/GDL)
9+
[![Discord](https://img.shields.io/discord/700328186642432040?color=738ad6&label=Join%20the%20Discord%20server&logo=discord&logoColor=ffffff)](https://discord.gg/6R4a5qQ)
910

1011
---
1112

12-
![dark color scheme](https://i.imgur.com/OEurk9A.png)
13-
1413
# What is GDL?
1514
GDL means 'Geometric Description Language'. [ArchiCAD](http://www.graphisoft.com/) uses it to define a library part.
1615

1716
Many ArchiCAD users are making their own library parts, sell them or even publish them for free on sites like [BIMComponents](https://bimcomponents.com/), while others just want to modify the provided ones. But they are all tied to the – unfortunately horrible – built-in object editor which is stuck in the 80's or so. It doesn't even have line numbers!
1817

1918
But salvation is here!
20-
The purpose of this package is to give you the chance to comfortably write code in the best editor of the galaxy – [Sublime Text](https://www.sublimetext.com/).
19+
The purpose of this package is to give you the chance to comfortably write code in[Sublime Text](https://www.sublimetext.com/).
2120

22-
This package provides the whole thing: from **syntax highlighting** (with a well aligned **color scheme**) to **auto completion**, **global goto**, **snippets**, and last but not least a **build system** for your scripts.
21+
This package provides the whole thing: from **syntax highlighting** (with a well aligned **color schemes**) to **auto completion**, **global goto**, **snippets**, and last but not least a **build system** for your scripts.
2322

2423
## Installation
2524

@@ -55,14 +54,19 @@ Copy _one_ of these into the file on the right and save:
5554
}
5655
```
5756

57+
![dark color scheme](https://i.imgur.com/OEurk9A.png)
58+
59+
5860
#### **Light:**
5961
```json
6062
{
6163
"color_scheme": "Packages/GDL/GDL-light.sublime-color-scheme"
6264
}
6365
```
66+
6467
![light color scheme](https://i.imgur.com/OQx2IF2.png)
6568

69+
6670
#### Don't like the themes?
6771
You can edit the `.sublime-color-scheme` files directly – they are nothing else than `.json` files basically. But remember to copy your own color scheme into the `User` folder! Otherwise an update would overwrite your changes. (Of course you then need to point Sublime Text to your new color scheme like above.)
6872

@@ -81,9 +85,11 @@ With the advent of ARCHICAD 23 we don't longer need third-party apps like [GDLnu
8185

8286
To use this feature you first need to set the path to where your ARCHICAD is installed. Open the package settings again and copy the respective item from the left to the right pane. Change the path accordingly.
8387

84-
Afterwards drag and drop a folder with your 'gsm' (I recommend different folders for different gsm's) into Sublime Text and then create a Sublime project via `Project > Save Project As…`. Other benefits are a better working 'goto', 'auto completion', and the possibility to fast switch between different coding sessions on various gsm's.
88+
Afterwards drag and drop a folder with your 'gsm' (I recommend different folders for different gsm's) into Sublime Text and then create a Sublime project via `Project > Save Project As…`. Other benefits are a better working 'goto', 'auto completion', and the possibility to fast switch between different coding sessions on various gsm's. All the files inside the folder you just dragged into Sublime Text will be visible in the sidebar, and can also easily be accessed via the quick open palette.
89+
For all the possible ways to structure your folders see [below](#structure)
90+
8591
You can now use the the two conversion options in `Tools > GDL`. For a quick access both items are reachable via a right mouse click on the editor pane. There are also key bindings on each.
86-
The default for `Convert to script (gsm → hsf/gdl)` is <kbd>ctrl</kbd>+<kbd>shift</kbd>+<kbd>H</kbd>. `Build GSM from HSF (hsf/gdl → gsm)` has <kbd>ctrl</kbd>+<kbd>shift</kbd>+<kbd>alt</kbd>+<kbd>G</kbd>. Of course these can be adjusted to your taste.
92+
The default for `Convert to script (gsm → hsf/gdl)` is <kbd>ctrl</kbd>+<kbd>shift</kbd>+<kbd>H</kbd>. `Build GSM from HSF (hsf/gdl → gsm)` has <kbd>ctrl</kbd>+<kbd>shift</kbd>+<kbd>alt</kbd>+<kbd>G</kbd> assigned OOTB. Of course these can be adjusted to your taste.
8793

8894
### Places
8995
If you convert between HSF and GSM the default place will be next to each other. However you can define a _global default path_ (see [example](#syntax-settings-example) below) where any GSMs should be deployed to. This is useful if you have a central library already linked in Archicad.
@@ -102,10 +108,21 @@ If you substitute the path with `"default"` you can mimic the standard behavior:
102108

103109
Note: There's no path checking implemented at the moment! You have to take care by yourself that you're allowed to write at the paths accordingly.
104110

105-
What to do if you have nested structures? Let's take a look at the structure of this very repo:
111+
#### Structure
112+
Let's have a look on how you can organize your folder structure!
113+
<sub>(Please note: the names are just examples.)</sub>
114+
115+
The basic structure looks like this:
116+
```
117+
<Project Root Folder>
118+
├─ example object\.. # <- this is the HSF; the folder with the script parts
119+
└─ example object.gsm
120+
```
121+
Simple, right?
106122

123+
But what if you deploy a nested folder structure, like below? In this case you can make use of the 'sub root' feature, which let's you dig into a nested structure (can be arbitrarily deep, but keep in mind you might run in the hard 255 path character limit of Windows).
107124
```
108-
<Project Root>
125+
<Project Root Folder>
109126
├─ .editorconfig
110127
├─ README.md
111128
├─ docs\..
@@ -118,19 +135,26 @@ What to do if you have nested structures? Let's take a look at the structure of
118135
│ └─ (all scripts)
119136
└─ Object-3.gsm ## the .gsm share exactly the same name!
120137
```
121-
122-
We want to declare a new 'root', a place where we store the HSFs.
138+
What you can do is to declare a new 'root'.
123139
All you need to do is to put the following statement into your `.sublime-project` file:
124-
125140
```jsonc
126141
{
127142
"root": "Objects"
128-
// for deeper nesting use slashes: "Objects/deeper"
143+
// for deeper nesting use forward slashes: "Objects/deeper"
129144
}
130145
```
146+
You could even point to one of the objects directly to circumvent the selection dialog.
131147

132-
<!-- ![Project path setting](https://i.imgur.com/71LeiOW.png) -->
148+
Another and very comfortable way is to tell GDL-Sublime it should convert the current GDL being edited everytime you save the GDL:
149+
```jsonc
150+
{
151+
"convert_on_save": true
152+
}
153+
```
133154

155+
_Note: Multi root environments are not supported at the moment._
156+
157+
<!-- ![Project path setting](https://i.imgur.com/71LeiOW.png) -->
134158

135159
### Syntax Settings Example:
136160
```json
@@ -160,12 +184,13 @@ where `<args>` is to be replaced. If you don't need it, you can leave it empty.
160184
&nbsp;
161185
-->
162186

163-
## Getting Started With Sublime Text
187+
## Getting started with Sublime Text
164188
New to Sublime? Then I can recommend this excellent and free video tutorial by nettuts: [Perfect Workflow in Sublime Text](http://net.tutsplus.com/articles/news/perfect-workflow-in-sublime-text-free-course/).
165189

166190
## Support
167-
Does this plugin help you in your daily work, or just want to say thanks?
168-
Please consider donating to sustain working on this plugin.
191+
Does this plugin help you in your daily work, or you just want to say thanks?
192+
Countless hours went into the development of GDL-Sublime.
193+
Please consider donating to sustain working on this plugin!
169194

170195
[![ko-fi](https://www.ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/Y8Y5VOOM)
171196

0 commit comments

Comments
 (0)