Por si alguien quiere usar Sublime text 3 en vez de Notepad++, aquí les dejo los dos archivos para hacerlo funcionar:
Primero: necesitamos agregar la ruta donde tengamos el Cramel a la variable de entorno de windows llamada PATH
Segundo: agregamos a sublime text 3 el proyecto de Cramel con el que vamos a trabajar.
Tercer: editamos nuestra configuración de sublime (Preferences>Settings) y agregamos
"translate_tabs_to_spaces": true
Para agregar el proyecto a sublime text nos vamos a Project>Add Folder to Project
(http://i.imgur.com/wtg7h59.png)
Creamos un archivo llamado Cramel3.sublime-syntax y pegamos lo siguiente:
%YAML 1.2
---
file_extensions:
- cml
scope: source.cml
contexts:
main:
# Comentarios
- match: "'|;"
scope: punctuation.definition.comment.c
push: line_comment
- match: \"
scope: punctuation.definition.string.begin.c
push:
- meta_scope: string.quoted.other.lt-gt.include.c
- match: \"
scope: punctuation.definition.string.end.c
pop: true
# Palabras de variables
- match: '\b(Opcional|Referencia|Var|ClaseVar|ClaseVarPriv|Const|Local|Global|Parámetro)\b'
scope: keyword.control.c
# Palabras reservadas
- match: '\b(CDECL|VBCALL|STDCALL|API|Alias|Contar|Seguir|Constructor|Clase|FinClase|Crear|Devolver|Destructor|Destruir|Estruct|Exportar|Escritura|Importar|Lectura|Mientras|FinMientras|NoResultado|Nulo|Prototipo|Proc|FinProc|Preservar|Paso|Prop|FinProp|Repetir|PorSiempre|HastaQue|MientrasQue|FinRepetir|ReDim|Resultado|Referencia|Seleccionar|Caso|Otro|FinSeleccionar|Si|Entonces|OSi|SiNo|FinSi|Salir|Sección Privada|Sección Pública|Unión|AdmErr|Controlar|FinAdmErr)\b'
scope: keyword.control.c
#Tipo de datos
- match: '\b(Booleano|Byte|Word|Entero|Real|Cadena|Nulo)\b'
scope: storage.type.c
#Misc
- match: '\(|\)|\:'
scope: storage.type.c
# Numeros
- match: '\b((-)?[0-9.]+)\b'
scope: constant.numeric.c
- match: '\b((0(x|X)[0-9a-fA-F]*(\.[0-9a-fA-F]+p-?\d+)?)|(([0-9]+\.?[0-9]*)|(\.[0-9]+))((e|E)(\+|-)?[0-9]+)?)(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\b'
scope: constant.numeric.c
# Operadores Aritmeticos
- match: \+|\-|\^|\*|\/|Shl|Shr|Rol|Ror
scope: keyword.operator.arithmetic.c
# Operadores Lógicos
- match: \>|\<|\>\=|\<\=|\<\>|Not|Neg|And|Y|Or|O|Xor|\!\=|\=|\&|\@
scope: keyword.operator.c
line_comment:
- meta_scope: comment.line.example-c
- match: $
pop: true
Y creamos otro archivo llamado Cramel3.sublime-build y pegamos lo siguiente:
{
"shell_cmd": "(IF EXIST \"${file_base_name}.exe\" del \"${file_base_name}.exe\") && %Cramel% /f \"${file}\" /d \"${file_path}/${file_base_name}.exe\"",
"selector": "source.cml",
"variants": [
{
"name": "Compilar DLL",
"shell_cmd": "(IF EXIST \"${file_base_name}.dll\" del \"${file_base_name}.dll\") && %Cramel% /f \"${file}\" /dll /d \"${file_path}/${file_base_name}.dll\"",
"shell": true
},
{
"name": "Compilar & Ejecutar",
"shell_cmd": "(IF EXIST \"${file_base_name}.exe\" del \"${file_base_name}.exe\") && %Cramel% /f \"${file}\" /d \"${file_path}/${file_base_name}.exe\" /ej",
"shell": true
},
]
}
Una vez teniendo los dos archivos creados nos vamos a la carpeta Package>User, para ello nos dirigimos a Preferences>Browse Packages y damos click en la carpeta User; en esa carpeta pegamos los dos archivos.
(http://i.imgur.com/TPEMRtl.png)
(http://i.imgur.com/piJeUkn.png)
Ya solo queda abrir tu archivo cramel y programar; una vez terminado solo nos toca guardar y dar Ctrl + b para compilar o Ctrl + Shift + b para elegir entre compilar & ejecutar, compilar DLL, o compilar & generar ASM
Que capo!! Terrible aporte!! Mil gracias bro!!
Te dejo +Karma y gracias por contribuir con el proyecto!!
Saludos!
ANTRAX