Skip to content

Instantly share code, notes, and snippets.

@Sciorz
Sciorz / .vimrc
Created March 16, 2018 06:14
acm-vim配置
set cin nu ts=4 sw=4 sts=4 cul mouse=a
set smarttab
syn on
map <C-B> :call CR()<CR>
func! CR()
exec "w"
exec "! clear && g++ -std=c++11 % -o %< && ./%< "
endfunc
@Sciorz
Sciorz / build_cpp.sublime-build
Created December 3, 2017 04:17
ubuntu-gnome 使用sublime编译运行C++/C
{
"cmd": ["g++", "${file}", "-std=c++11", "-o", "${file_path}/${file_base_name}"],
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"working_dir": "${file_path}",
"selector": "source.c, source.c++",
"variants":
[
{
"name": "Run",
"cmd":["gnome-terminal", "--", "bash", "-c", "g++ '${file}' -std=c++11 -o '${file_path}/${file_base_name}' && '${file_path}/${file_base_name}' ;read -n1 -p '\npress any key to continue.'"]
@Sciorz
Sciorz / build_py3.sublime-build
Created August 6, 2017 09:23
Ubuntu-xfce 下使用sublime编译Python3
{
"cmd": ["python3", "-i", "-u", "$file"],
"file_regex": "^[ ]File \"(...?)\", line ([0-9]*)",
"selector": "source.python",
"variants":
[
{
"name": "Run",
"cmd":["xfce4-terminal", "-x", "bash", "-c", "python3 -i -u '${file}';read -n1 -p '\npress any key to continue.'"]