tools

\(\rm init.sh\) 这个是用在机房快速初始化 \(\rm cygwin\) 环境的。不知道在 \(\rm Linux\) 下可不可以使用。

#!/bin/bash
echo lsy-cmake

cat > ~/.vimrc << EOF
set nu
set autoindent
set expandtab
set tabstop=2
set shiftwidth=2
inoremap [ []<LEFT>
inoremap ' ''<LEFT>
inoremap { {}<LEFT>
inoremap " ""<LEFT>
inoremap ( ()<LEFT>
EOF
echo .vimrc-processing

cat > /usr/bin/g+ << EOF
#!/bin/bash
g++ \$1.cpp -o \$1.exe -std=c++14 -Wall -Wextra -Wl,-stack=999999999 -O2 -g
EOF
echo g+-processing

cat > /usr/bin/r+ << EOF
#!/bin/bash
g+ \$1;time ./\$1.exe
EOF
echo r+-processing

chmod a+x /usr/bin/g+
chmod a+x /usr/bin/r+
echo chmod-processing

echo lsy-Linux-init-finished
echo testing:

cat > ~/qwq.cpp << EOF
#include<bits/stdc++.h>
using namespace std;

signed main(){
  ios::sync_with_stdio(0);
  cin.tie(0); cout.tie(0);
  cout << "lsy_init_sh qwq";

  return 0;
}
EOF
echo testing g+:
g+ qwq
echo testing r+
r+ qwq
echo testing vim:
echo that is for you!
echo end

\(\rm g+\) 编译命令。

\(\rm r+\) 编译运行。

\(\rm .vimrc\) 我的 \(\rm vim\) 配置。

posted @ 2024-12-14 10:45  Little_corn  阅读(28)  评论(0)    收藏  举报