其他分享
首页 > 其他分享> > Gedit配置

Gedit配置

作者:互联网

gedit自动编译:

#!/bin/sh
name=$GEDIT_CURRENT_DOCUMENT_NAME
dir=$GEDIT_CURRENT_DOCUMENT_DIR
pre=${name%.*}
g++ $dir/$name -o $pre -std=c++11 -w
if test $? -eq 0; then
   gnome-terminal -x bash -c "time $dir/$pre;echo;read;"
fi  

for循环:(for)
for(register int $1; $2; $3) $4

函数:(F)
${1:name}($2)  

#include:(inc)
#include <${1:file}>
$0

main函数:(main)
int main() {
	$0
	return 0;
}

结构体:(struct)
struct ${1:name} {
	$0
};

if语句:(if) 
if($1) 

while循环:(while) 
while($1) {
	$0
}

读入scanf:(scanf) 
scanf("$1", $2)

输出printf:(printf)
printf("$1", $2)

标签:pre,name,scanf,配置,Gedit,while,printf,main
来源: https://www.cnblogs.com/longdie/p/gedit.html