What I have to do after reinstalling the system
Install Brew
1/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
关闭每次运行时的自动更新
1 # 临时关闭 在Terminal中运行
2 # 永久关闭 在Terminal配置文件中加入下面这一行 .bash_profile
3export HOMEBREW_NO_AUTO_UPDATE=true
安装 g++
1# 查询可用版本
2brew search gcc
3# 安装
4brew install gcc@7
设置gcc7为默认编译器
1# Setting gcc7 as default gcc compiler
2alias gcc='gcc-7'
3alias gcc='g++-7'
4alias gcc='cpp-7'
5alias gcc='c++-7'
.bash_profile
1# System Command
2alias ll='ls -al'
3alias c='clear'
4
5# Setting for my command
6export PATH=$PATH:~/.my_command
7
8# Setting gcc7 as default gcc compiler
9alias gcc='gcc-7'
10alias gcc='g++-7'
11alias gcc='cpp-7'
12alias gcc='c++-7'
13
14# For ACM-ICPC
15alias acm='cd /Users/akvicor/Documents/GitHub/Problem-set'
16
17# Use 'safe-rm' as 'rm'
18alias rm='safe-rm'
19
20# Close Homebrew auto update
21export HOMEBREW_NO_AUTO_UPDATE=true
.vimrc
1filetype plugin indent on
2colorscheme desert
3syntax on
4set nu
5set backspace=2
6set hlsearch
7set syntax=on
8set tabstop=2
9set shiftwidth=2
10set smarttab
11set smartindent
12set showmatch
13set matchtime=0
14set report=0
15
16function Close(char)
17 if getline('.')[col('.') - 1] == a:char
18 return "\<Right>"
19 else
20 return a:char
21 endif
22endfunction
23
24map <C-A> ggVG"+y
25map <F5> :call Run()<CR>
26map <F4> :call Run2()<CR>
27func! Run()
28 exec "w"
29 exec "!g++-7 -O2 -std=c++11 -Wall % -o .%<.sol"
30 exec "!./.%<.sol"
31endfunc
32func! Run2()
33 exec "w"
34 exec "!g++-7 -O2 -std=c++11 -Wall % -o .%<.sol"
35 exec "!./.%<.sol < in"
36endfunc
37
38map <F12> :call SetTitle()<CR>
39func SetTitle()
40let l = 0
41let l = l + 1 | call setline(l,'/* ***********************************************')
42let l = l + 1 | call setline(l,'Author : Akvicor')
43let l = l + 1 | call setline(l,'Created Time : '.strftime('%c'))
44let l = l + 1 | call setline(l,'File Name : '.expand('%'))
45let l = l + 1 | call setline(l,'************************************************ */')
46let l = l + 1 | call setline(l,'')
47let l = l + 1 | call setline(l,'#include <bits/stdc++.h>')
48let l = l + 1 | call setline(l,'')
49let l = l + 1 | call setline(l,'#define FAST_IO ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);')
50let l = l + 1 | call setline(l,'#define endl ''\n''')
51let l = l + 1 | call setline(l,'#define ASB using namespace std; typedef long long ll; namespace AkvicorS {')
52let l = l + 1 | call setline(l,'#define ASE } int main() { return AkvicorS::sol(); }')
53let l = l + 1 | call setline(l,'')
54let l = l + 1 | call setline(l,'ASB')
55let l = l + 1 | call setline(l,'')
56let l = l + 1 | call setline(l,'')
57let l = l + 1 | call setline(l,'')
58let l = l + 1 | call setline(l,'int sol(){')
59let l = l + 1 | call setline(l,' FAST_IO;')
60let l = l + 1 | call setline(l,' ')
61let l = l + 1 | call setline(l,' ')
62let l = l + 1 | call setline(l,' ')
63let l = l + 1 | call setline(l,' return 0;')
64let l = l + 1 | call setline(l,'}')
65let l = l + 1 | call setline(l,'')
66let l = l + 1 | call setline(l,'ASE')
67let l = l + 1 | call setline(l,'')
68exec "21"
69endfunc
除另有声明外,本博客文章均采用 知识共享 (Creative Commons) 署名 4.0 国际许可协议 进行许可。转载请注明原作者与文章出处。