Skip to content

Commit 1627c2a

Browse files
point removed from types, @ added to operators, general cleanup
1 parent 45e116c commit 1627c2a

9 files changed

Lines changed: 154 additions & 116 deletions

File tree

CHANGES.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@ Version 1.5.0
33
Houdini version 16.0 update.
44

55
Changes:
6-
Function highlighting and completions ammended to support 16.0.
6+
Function highlighting and completions updated to support 16.0.
7+
8+
Todo:
9+
Raw string support.
710

811

912
Version 1.4.0

VEX.YAML-tmLanguage

Lines changed: 63 additions & 62 deletions
Large diffs are not rendered by default.

VEX.sublime-completions

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -356,18 +356,10 @@
356356
"contents": "ch4(${1})",
357357
"trigger": "ch4\tfunction"
358358
},
359-
{
360-
"contents": "chadd(${1})",
361-
"trigger": "chadd\tfunction"
362-
},
363359
{
364360
"contents": "chattr(${1})",
365361
"trigger": "chattr\tfunction"
366362
},
367-
{
368-
"contents": "chattrnames(${1})",
369-
"trigger": "chattrnames\tfunction"
370-
},
371363
{
372364
"contents": "chend(${1})",
373365
"trigger": "chend\tfunction"
@@ -396,18 +388,10 @@
396388
"contents": "chinput(${1})",
397389
"trigger": "chinput\tfunction"
398390
},
399-
{
400-
"contents": "chinputlimits(${1})",
401-
"trigger": "chinputlimits\tfunction"
402-
},
403391
{
404392
"contents": "chname(${1})",
405393
"trigger": "chname\tfunction"
406394
},
407-
{
408-
"contents": "chnames(${1})",
409-
"trigger": "chnames\tfunction"
410-
},
411395
{
412396
"contents": "chnumchan(${1})",
413397
"trigger": "chnumchan\tfunction"
@@ -432,18 +416,6 @@
432416
"contents": "chreadbuf(${1})",
433417
"trigger": "chreadbuf\tfunction"
434418
},
435-
{
436-
"contents": "chremove(${1})",
437-
"trigger": "chremove\tfunction"
438-
},
439-
{
440-
"contents": "chremoveattr(${1})",
441-
"trigger": "chremoveattr\tfunction"
442-
},
443-
{
444-
"contents": "chrename(${1})",
445-
"trigger": "chrename\tfunction"
446-
},
447419
{
448420
"contents": "chresizebuf(${1})",
449421
"trigger": "chresizebuf\tfunction"
@@ -456,18 +428,6 @@
456428
"contents": "chsetattr(${1})",
457429
"trigger": "chsetattr\tfunction"
458430
},
459-
{
460-
"contents": "chsetlength(${1})",
461-
"trigger": "chsetlength\tfunction"
462-
},
463-
{
464-
"contents": "chsetrate(${1})",
465-
"trigger": "chsetrate\tfunction"
466-
},
467-
{
468-
"contents": "chsetstart(${1})",
469-
"trigger": "chsetstart\tfunction"
470-
},
471431
{
472432
"contents": "chsraw(${1})",
473433
"trigger": "chsraw\tfunction"

VEX.tmLanguage

Lines changed: 3 additions & 3 deletions
Large diffs are not rendered by default.

src/vcc_utils.py

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@
44
import subprocess
55
import json
66

7-
VCC_PATH = 'C:/Program Files/Side Effects Software/Houdini 16.0.600/bin/vcc.exe'
8-
SUB_PATH = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'VEX.sublime-completions')
9-
7+
VCC_PATH = 'C:/Program Files/Side Effects Software/Houdini 16.0.600/bin/vcc.exe'
8+
SYN_PATH = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..')
9+
COMP_PATH = os.path.join(SYN_PATH, 'VEX.sublime-completions')
10+
FUNC_PATH = os.path.join(os.path.join(SYN_PATH, 'syntax_lists'), 'VexFunctions.txt')
11+
1012

1113
def contexts(vcc_path=VCC_PATH):
1214
"""Return a sorted list of all vex contexts."""
@@ -49,12 +51,20 @@ def context_function_signatures(context, vcc_path=VCC_PATH):
4951
return sigs
5052

5153

52-
def all_functions(vcc_path=VCC_PATH):
54+
def all_functions(vcc_path=VCC_PATH, write_functions=True, function_path=FUNC_PATH):
5355
"""Returns a sorted list of all vex functions in all contexts."""
5456
all_funcs = set()
5557
for ctx in contexts():
5658
all_funcs.update(context_functions(ctx, as_set=True))
57-
return sorted(all_funcs)
59+
60+
all_funcs_sorted = sorted(all_funcs)
61+
62+
if write_functions:
63+
with open(function_path, 'w') as f:
64+
for func in all_funcs_sorted:
65+
f.write('{}\n'.format(func))
66+
67+
return all_funcs_sorted
5868

5969

6070
def all_function_signatures(vcc_path=VCC_PATH):
@@ -72,7 +82,7 @@ def all_function_signatures(vcc_path=VCC_PATH):
7282
return all_sigs
7383

7484

75-
def generate_simple_completions(sublime_completion_path=SUB_PATH):
85+
def generate_simple_completions(sublime_completion_path=COMP_PATH):
7686
"""Converts the function signitures generated by vcc into SublimeText compatable completion
7787
JSON files."""
7888
completions = []
@@ -86,7 +96,7 @@ def generate_simple_completions(sublime_completion_path=SUB_PATH):
8696
json.dump(data, f, sort_keys=True, indent=4, separators=(',', ': '))
8797

8898

89-
def generate_completions(sublime_completion_path=SUB_PATH):
99+
def generate_completions(sublime_completion_path=COMP_PATH):
90100
"""Converts the function signitures generated by vcc into SublimeText compatable completion
91101
JSON files."""
92102
completions = []

0 commit comments

Comments
 (0)