Author Topic: DNH Sublime Text Package - feedback pls  (Read 4012 times)

Drake

  • *
DNH Sublime Text Package - feedback pls
« on: December 07, 2013, 06:12:32 AM »


Sublime Text package for Danmakufu (ph3), including syntax highlighting and function autocompletions with fuzzy matching and tabbable parameters.
In the works.

Things to work on:

- Redundant completions occurring when a function's name is already present in the text (i.e. often); one gives the nice generated tabbable parameters and the other just gives the matched text
- I'd like to make the libraries easier to add to than how I currently do it, since I have to write two formatting strings for completions and a regex for syntax highlighting
- Function documentation somehow

(absolute being counted as a keyword instead of a function was unexpected and is fixed)

Does anyone have any suggestions? Does the formatting in the completions list seem nice? How should I name the more generic parameters? The return types?
Extra functionality probably won't be considered but feel free to suggest anyways in case it's a really good idea that doesn't take a ton of work.
Also, I don't have much time to work on this so please don't expect anything good soon, but now that I have completions working I figured I'd post about it.
« Last Edit: January 05, 2014, 12:51:28 AM by Drake »

A Colorful Calculating Creative and Cuddly Crafty Callipygous Clever Commander
- original art by Aiけん | ウサホリ -

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: A thing I've been doing recently, feedback pls
« Reply #1 on: December 07, 2013, 03:10:19 PM »
This looks great!

Some suggestions:

== != > < >= <= || && highlighting in red

Also, will this be for .dnh, .ph3, or will it be applicable to multiple file types? If it's .dnh or .ph3, I'll probably stop using my default text editor (since this is better).

Drake

  • *
Re: A thing I've been doing recently, feedback pls
« Reply #2 on: December 08, 2013, 12:31:44 AM »
The scope is on dnh files (and currently txt files because lazy). Including a .ph3 extension would be easy but I have to ask why you bother using a .ph3 extension in the first place.
Highlighting the logical operators done. Not sure why I didn't already have it.

A Colorful Calculating Creative and Cuddly Crafty Callipygous Clever Commander
- original art by Aiけん | ウサホリ -

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: A thing I've been doing recently, feedback pls
« Reply #3 on: December 08, 2013, 01:13:29 AM »
Can you release a preliminary version for testing? I'm getting tired of using a crashing TextEdit for Danmakufu.

Drake

  • *
Re: A thing I've been doing recently, feedback pls
« Reply #4 on: December 08, 2013, 07:48:47 AM »
Well I posted the language file before, so there's that. Get Sublime, download the below, put in the Data/Packages/User folder. It's probably the same on your Mac.

https://mega.co.nz/#!F5lCRaLa!L--4dVYNZGzadanWOlfluS_mGbEd98D_-IHh8H-HA7U

A Colorful Calculating Creative and Cuddly Crafty Callipygous Clever Commander
- original art by Aiけん | ウサホリ -

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: A thing I've been doing recently, feedback pls
« Reply #5 on: December 08, 2013, 04:13:05 PM »
Actually, that might be problematic. I can't find the folder. It's not inside the bundle, and I'm searching through hidden directories to find it.

I'm using Sublime Text 2 (unregistered). Is there a way to install it by telling Sublime Text the path (like with Notepad++?)

Edit: I have a bad feeling that I'm going to have to pay $70 in order to do this in a non-manual fashion... -_-

Edit2:
Full path: Macintosh HD/Users/<yournamehere>/Library/Application Support/Sublime Text 2/Packages/User

Note that Library is a hidden folder that is most easily accessed using the command prompt.
Code: [Select]
mv Danmakufu.tmLanguage ~/Library/Application\ Support/Sublime\ Text\ 2/Packages/User*USE THIS CODE AT YOUR OWN RISK. I HAVE NOT CHECKED IT.

Edit 3: Drake, you provided the one without highlighted ==, etc.
« Last Edit: December 08, 2013, 04:27:56 PM by Sparen »

Re: A thing I've been doing recently, feedback pls
« Reply #6 on: December 10, 2013, 09:15:46 PM »
I've just started reading about how to make something like this for Sublime Text, and then I saw this thread.
I'm really looking forward to see the full version of this! I'm using your highlighting for now

SilentYukiro

  • Silent Soul of the Electronic Skies
  • Clearly a Satori lover :3
Re: A thing I've been doing recently, feedback pls
« Reply #7 on: December 18, 2013, 09:18:56 AM »
I hope this project of yours will bear great success.

I've been using Sublime since I started scripting Danmakufu, a really handy software. Wish you good luck!

*wishing for a 0.12m version of the package  :derp: *

"UNYUUU?"

Music is the essence of my soul.
Planned Fan-game: Touhou: Mad Tengu ~ Hellic Memories

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: A thing I've been doing recently, feedback pls
« Reply #8 on: January 04, 2014, 09:32:22 PM »
Is there a plan to update the color sheet to include new ph3 functions such as SetCameraYaw, etc.? It's not absolutely necessary, but I decided to experiment and then I realized that I downloaded the color sheet before pre23 was released

Re: A thing I've been doing recently, feedback pls
« Reply #9 on: January 04, 2014, 10:05:21 PM »
I saw this topic before but only now, I realized what the actual meaning was about.
Funny things is I'm not using any of the fancy text editors like Sublime Text. Instead I resort to the most basic,
Spoiler:
and probably the worst to code on,
Text Document, which is the free text editor that doesn't include syntax highlighting. I'm kind of wondering why I even tried to code a whole game with it.

Well, not anymore. I will look forward to this as I transition into ph3. Good luck with the package.
Currently a normal player

Drake

  • *
Re: DNH Sublime Text Package - feedback pls
« Reply #10 on: January 05, 2014, 12:39:31 AM »
Is there a plan to update the color sheet to include new ph3 functions such as SetCameraYaw, etc.? It's not absolutely necessary, but I decided to experiment and then I realized that I downloaded the color sheet before pre23 was released
Yeah I'll be adding the rest of the library functions as I go. These will all be colored blue as shown in the OP unless someone has a better idea.
« Last Edit: January 05, 2014, 12:51:36 AM by Drake »

A Colorful Calculating Creative and Cuddly Crafty Callipygous Clever Commander
- original art by Aiけん | ウサホリ -