标签:turn file can struct edit ash g++ register 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)
大括号{}:({)
{$1}
freopen:(freopen)
freopen("$1", "$2", $3);
标签:turn file can struct edit ash g++ register gedit
原文地址:https://www.cnblogs.com/longdie/p/gedit.html