All Projects โ†’ runxel โ†’ GDL-sublime

runxel / GDL-sublime

Licence: MIT License
๐Ÿ“ A Sublime Text package for the programming language GDL (Geometric Description Language)

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to GDL-sublime

Packagedev
Tools to ease the creation of snippets, syntax definitions, etc. for Sublime Text.
Stars: โœญ 378 (+1412%)
Mutual labels:  syntax-highlighting, snippets, sublime-text, color-scheme
ST-ShellScriptImproved
โŒ [Deprecated] A better ShellScript (Bash) syntax highlight for Sublime Text >= 3143
Stars: โœญ 25 (+0%)
Mutual labels:  syntax-highlighting, sublime-text, color-scheme
Laravel.tmTheme
A Sublime Text 3 theme based on the Laravel documentation colour scheme
Stars: โœญ 40 (+60%)
Mutual labels:  syntax-highlighting, sublime-text, color-scheme
opentype-feature-bundle
Syntax highlighting and snippets for OpenType feature development in TextMate/Sublime Text
Stars: โœญ 35 (+40%)
Mutual labels:  syntax-highlighting, snippets, sublime-text
sublime-PICO-8
PICO-8 plugin for the Sublime Text 3 editor.
Stars: โœญ 42 (+68%)
Mutual labels:  syntax-highlighting, snippets, sublime-text
network tech
Cisco config syntax and snippets for Sublime Text
Stars: โœญ 82 (+228%)
Mutual labels:  syntax-highlighting, snippets, sublime-text
Nord Sublime Text
An arctic, north-bluish clean and elegant Sublime Text theme.
Stars: โœญ 109 (+336%)
Mutual labels:  syntax-highlighting, sublime-text, color-scheme
Inspiredgithub.tmtheme
A color scheme for Sublime Text 3.
Stars: โœญ 117 (+368%)
Mutual labels:  syntax-highlighting, sublime-text, color-scheme
Milotic
Color Full Theme for All Text Editors!
Stars: โœญ 23 (-8%)
Mutual labels:  sublime-text, color-scheme
gray-matter
A colour scheme for Sublime Text and Visual Studio Code that takes design cues from popular minimalist Markdown text editors.
Stars: โœญ 69 (+176%)
Mutual labels:  syntax-highlighting, sublime-text
aquarium-vim
๐ŸŒŠ Aquarium, a simple vibrant dark theme for vim ๐Ÿ—’
Stars: โœญ 151 (+504%)
Mutual labels:  syntax-highlighting, color-scheme
Clojure-Sublimed
Clojure support for Sublime Text 4
Stars: โœญ 268 (+972%)
Mutual labels:  syntax-highlighting, sublime-text
Sublime-GenericConfig
Generic highlighting of the configuration files for Sublime Text 2 and Sublime Text 3
Stars: โœญ 39 (+56%)
Mutual labels:  syntax-highlighting, sublime-text
github markdown snippets
GitHub flavored Markdown with plain'ol HTML knowledge! Boom!
Stars: โœญ 23 (-8%)
Mutual labels:  snippets, sublime-text
chelevra.tmtheme
Sublime Text Syntax Highlighting Theme
Stars: โœญ 23 (-8%)
Mutual labels:  sublime-text, color-scheme
rocketnative-sublime-snippets
[DEPRECATED] Rocketseat React Native snippets for Sublime Text Editor
Stars: โœญ 16 (-36%)
Mutual labels:  snippets, sublime-text
spacegray
A Hyperminimal UI Theme for Sublime Text
Stars: โœญ 7,260 (+28940%)
Mutual labels:  sublime-text, color-scheme
Nineties
๐Ÿ’พ Colors for World Wide Web pioneers
Stars: โœญ 16 (-36%)
Mutual labels:  syntax-highlighting, sublime-text
YaraSyntax
YARA package for Sublime Text
Stars: โœญ 15 (-40%)
Mutual labels:  syntax-highlighting, sublime-text
SubLilyPond
LilyPond syntax highlighting in Sublime Text 2 and 3.
Stars: โœญ 26 (+4%)
Mutual labels:  syntax-highlighting, sublime-text

GDL-sublime

A bundle to make GDL available in Sublime Text.

Version Downloads Discord


What is GDL?

GDL means 'Geometric Description Language'. ArchiCAD uses it to define a library part.

Many ArchiCAD users are making their own library parts, sell them or even publish them for free on sites like BIMComponents, 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!

But salvation is here!
The purpose of this package is to give you the chance to comfortably write code inSublime Text.

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.

Installation

Using Sublime Package Control

โœ… recommended
If you are using Sublime Package Control, you can easily install the bundle via the Sublime Text -> Preferences > Package Control: Install Package menu item.

Using Git

๐Ÿค– Alternatively you can install the bundle and keep up to date by cloning the repo directly into your Packages directory in the Sublime Text application settings area.

Go to your Sublime Text Packages directory and clone the repository using the command below:
git clone https://github.com/runxel/GDL-sublime "GDL"

Download Manually

โฌ‡๏ธ not recommended โ€“ you won't get updates! ๐Ÿšจ

  • Download the files using the GitHub .zip download option
  • Unzip the files and rename the folder to 'GDL'
  • Copy the folder to your Sublime Text Packages directory i.e.
    • Windows C:\Users\<yourname>\AppData\Roaming\Sublime Text 3\Packages\GDL
    • OS X: ~/Library/Application Support/Sublime Text 3/Packages/GDL

Usage

From now on you can select GDL as the current language in the bottom right corner of ST and enjoy all the benefits. For files with the .gdl extension it will be automatically active.
For the coloring (meaning the proper highlighting) there are two choices. By default a light color scheme will be applied.
I personly like the dark coloring more, providing fatigue-proof coding. To change the use of a color scheme go to Preferences > Package Settings > GDL > Settings.

Copy one of these into the file on the right and save:

Dark:

{  
	"color_scheme": "Packages/GDL/GDL-dark.sublime-color-scheme"  
}

dark color scheme

Light:

{  
	"color_scheme": "Packages/GDL/GDL-light.sublime-color-scheme"  
}

light color scheme

Don't like the themes?

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.)

GoTo, Auto completion, Snippets

The "Goto" feature of Sublime Text is pretty powerful. To gain full access you must use Sublime projects. If you e.g. quickly want to got to a subroutine place your cursor into the name and press F12. You will then jump directly to the definition.
Auto completion takes place automatically, if you're typing. You can force auto completion via ctrl + space.
I have included some example snippets. Try it out by typing in: comline and then press TAB โ†น.
Voilรก! There's a divider.
! ---------------------------------------------------------------------- !

I hardly encourage you to modify and extend the snippets, so they will suit your needs.
You will find all the shipped snippets in the Snippets folder.

Workflow

With the advent of ARCHICAD 23 we don't longer need third-party apps like GDLnucleus for a Sublime Text driven workflow. The LP_XMLConverter, which is part of every Archicad installation, can now convert .gsm directly into subsequent .gdl scripts and vice-versa. This means an end to the abundant copy & pasting orgy of the past.

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.

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.
For all the possible ways to structure your folders see below

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.
The default for Convert to script (gsm โ†’ hsf/gdl) is ctrl+shift+H. Build GSM from HSF (hsf/gdl โ†’ gsm) has ctrl+shift+alt+G assigned OOTB. Of course these can be adjusted to your taste.

Places

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 below) where any GSMs should be deployed to. This is useful if you have a central library already linked in Archicad.
Of course you can overwrite this behavior by having a path on project basis. This can be set by opening the corresponding .sublime-project file and adding:

{
	"cmdargs":
    {
        "proj_gsm_path": "C:/Users/runxel/gsm-dev"
    }
}

If you substitute the path with "default" you can mimic the standard behavior: the GSM will be built next to the HSF. This is useful if you have set a global path in the package settings. Remember: Project settings override global settings.

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.

Structure

Let's have a look on how you can organize your folder structure!
(Please note: the names are just examples.)

The basic structure looks like this:

<Project Root Folder>
 โ”œโ”€ example object\..     # <- this is the HSF; the folder with the script parts
 โ””โ”€ example object.gsm

Simple, right?

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).

<Project Root Folder>
 โ”œโ”€ .editorconfig
 โ”œโ”€ README.md
 โ”œโ”€ docs\..
 โ”œโ”€ images\..
 โ””โ”€ Objects\
 	โ”œโ”€ Object-1\..
	โ”œโ”€ Object-2\..
	โ””โ”€ Object-3\             ## be sure that the outer AND
	   โ”œโ”€ Object-3\          ## the inner folder AND also
	   โ”‚  โ””โ”€ (all scripts)
	   โ””โ”€ Object-3.gsm       ## the .gsm share exactly the same name!

What you can do is to declare a new 'root'.
All you need to do is to put the following statement into your .sublime-project file:

{
	"root": "Objects"
	// for deeper nesting use forward slashes: "Objects/deeper"
}

You could even point to one of the objects directly to circumvent the selection dialog.

Another and very comfortable way is to tell GDL-Sublime it should convert the current GDL being edited everytime you save the GDL:

{
	"convert_on_save": true
}

Note: Multi root environments are not supported at the moment.

Syntax Settings Example:

{
	"AC_path": "C:/Program Files/GRAPHISOFT/ARCHICAD 23",
	"color_scheme": "Packages/GDL/GDL-dark.sublime-color-scheme",
	"global_gsm_path": "D:/office/aclibrary"
}

The AC_path can be overwritten in your .sublime-project file.

Support

Does this plugin help you in your daily work, or you just want to say thanks?
Countless hours went into the development of GDL-Sublime.
Please consider donating to sustain working on this plugin!

ko-fi

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].