[TxMt] Few extensions to C Bundle

Wezzy wezzy at despammed.com
Thu Sep 15 12:07:39 UTC 2005


Hi, this is my fist post on this ML, i want to share some little
extensions that i've made to C Language Bundle.

Hope these helps

Name : Run
Activation : command-R

#!/usr/bin/python
import os
file = os.environ['TM_FILEPATH']
path = os.path.split(file)
filename = path[1].split('.')
os.system("gcc -Os " + path[1] + " -o " + filename[0])
os.system("./" + filename[0])

Name : Run Project
Activation : command-shift-R

#!/usr/bin/python
import os
file = os.environ['TM_PROJECT_FILEPATH']
path = os.path.split(file)
projectName = path[-1].split('.')
projectName = projectName[0]
os.system("make -k")
os.system("./" + projectName)

Name : Compile
Activation : command-B

#!/usr/bin/python
import os
file = os.environ['TM_FILEPATH']
os.system("gcc -c -Os " + file);

Name : Compile Project
Activation : command-shift-B

make -k

-- 
Ciao
Fabio

	

	
		
___________________________________ 
Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB 
http://mail.yahoo.it



More information about the textmate mailing list