Last active
July 26, 2020 23:34
-
-
Save msyfls123/7633b859f8edbc930783e615af5638e0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#enables colorin the terminal bash shell export | |
export CLICOLOR=1 | |
#sets up thecolor scheme for list export | |
export LSCOLORS=gxfxcxdxbxegedabagacad | |
#sets up theprompt color (currently a green similar to linux terminal) | |
export PS1='\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;36m\]\w\[\033[00m\]\$ ' | |
#enables colorfor iTerm | |
export TERM=xterm-color | |
alias ebichu='ssh [email protected]' | |
alias ark='ssh [email protected]' | |
alias jd='ssh [email protected]' | |
alias old='ssh [email protected]' | |
alias encaa='enca -L zh -x UTF-8' | |
alias mov='cd ~/Movies/movie' | |
alias st='git status' | |
alias d='cd ~/Documents' | |
alias g='cd ~/Git' | |
alias work='cd ~/work' | |
alias mwork='sshfs -C -o reconnect [email protected]:/home/shenyan ~/work' | |
alias mbal='sshfs -C -o reconnect [email protected]:/mfs/user/shenyan ~/balrog2' | |
alias uwork='sudo umount -f ~/work' | |
alias mebichu='sshfs -C -o reconnect [email protected]:/opt ~/ebichu' | |
alias diablo='open /Applications/Diablo\ II/Diablo\ II.app --args -w -skiptobnet' | |
alias fetch='git fetch ark && git rebase ark/master' | |
alias py='python2.7' | |
alias git='LANG=en_GB git' | |
alias python2='python' | |
dssh() { | |
ssh -t shenyan@balrog2 "cd ~/ark; ~/dae/venv/bin/dae pre ssh --pre $1" | |
} | |
function git-branch-name { | |
git symbolic-ref HEAD 2>/dev/null | cut -d"/" -f 3 | |
} | |
function git-branch-prompt { | |
local branch=`git-branch-name` | |
if [ $branch ]; then printf " [%s]" $branch; fi | |
} | |
PS1="\[\033[0;33m\]\u@\h \[\033[0;36m\]\w\[\033[0m\]\[\033[0;32m\]\$(git-branch-prompt)\[\033[0m\] \$ " | |
export PATH="$HOME/.cargo/bin:$PATH" | |
export RUST_SRC_PATH="$HOME/.rustup/rust/src" | |
export ANDROID_HOME="$HOME/Library/Android/sdk" | |
export PATH=$PATH:$ANDROID_HOME/tools | |
export PATH=$PATH:$ANDROID_HOME/platform-tools | |
export PATH=$PATH:$HOME/Git/dae/venv/bin | |
export PATH=$PATH:$HOME/FlutterSDK/flutter/bin | |
export PATH=$PATH:$HOME/emsdk-portable | |
export PATH=$PATH:$HOME/emsdk-portable/clang/fastcomp/build_incoming_64/bin | |
export PATH=$PATH:$HOME/emsdk-portable/emscripten/incoming | |
export PYTHONPATH=$PYTHONPATH:/usr/local/lib/python2.7/site-packages | |
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function* | |
# source /Users/kimi/.dae/dae-completion.sh | |
export RUSTUP_DIST_ROOT=https://mirrors.ustc.edu.cn/rust-static | |
export RUSTUP_UPDATE_ROOT=http://mirrors.ustc.edu.cn/rust-static/rustup | |
export PUB_HOSTED_URL=https://pub.flutter-io.cn | |
export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn | |
export WASMTIME_HOME="$HOME/.wasmtime" | |
export WASI_SYSROOT=/opt/wasi-sysroot | |
export PATH="$WASMTIME_HOME/bin:$PATH" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set nocompatible " be iMproved, required | |
filetype off " required | |
" set the runtime path to include Vundle and initialize | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
" alternatively, pass a path where Vundle should install plugins | |
"call vundle#begin('~/some/path/here') | |
" | |
" let Vundle manage Vundle, required | |
Plugin 'VundleVim/Vundle.vim' | |
Plugin 'scrooloose/nerdtree' | |
Plugin 'keitheis/vim-plim' | |
Plugin 'wavded/vim-stylus' | |
Plugin 'ternjs/tern_for_vim' | |
Plugin 'godlygeek/tabular' | |
Plugin 'plasticboy/vim-markdown' | |
Plugin 'jiangmiao/auto-pairs' | |
Plugin 'mattn/emmet-vim' | |
Plugin 'lambdatoast/elm.vim' | |
Plugin 'jiko/nginx-vim-syntax' | |
Plugin 'tomasr/molokai' | |
Plugin 'rust-lang/rust.vim' | |
Plugin 'racer-rust/vim-racer' | |
Plugin 'mxw/vim-jsx' | |
Plugin 'majutsushi/tagbar' | |
Plugin 'leafgarland/typescript-vim' | |
" " All of your Plugins must be added before the following line | |
call vundle#end() " required | |
filetype plugin indent on " required | |
" " To ignore plugin indent changes, instead use: | |
" filetype plugin on | |
" " | |
" " Brief help | |
" " :PluginList - lists configured plugins | |
" " :PluginInstall - installs plugins; append `!` to update or just | |
" :PluginUpdate | |
" " :PluginSearch foo - searches for foo; append `!` to refresh local cache | |
" " :PluginClean - confirms removal of unused plugins; append `!` to | |
" auto-approve removal | |
" " | |
" " see :h vundle for more details or wiki for FAQ | |
" " Put your non-Plugin stuff after this line | |
set hidden | |
let g:racer_cmd = '/Users/kimi/.cargo/bin' | |
let $RUST_SRC_PATH= 'Users/kimi/.rustup/rust/src' | |
let g:racer_experimental_completer = 1 | |
let g:vim_markdown_math = 1 | |
let g:vim_markdown_frontmatter = 1 | |
let g:vim_markdown_toml_frontmatter = 1 | |
let g:vim_markdown_json_frontmatter = 1 | |
let g:ycm_key_list_select_completion = ['<Down>'] | |
let g:ycm_key_list_previous_completion = ['<Up>'] | |
let g:ycm_confirm_extra_conf=0 "关闭加载.ycm_extra_conf.py提示 | |
let g:ycm_min_num_of_chars_for_completion=2 " 从第2个键入字符就开始罗列匹配项 | |
let g:ycm_cache_omnifunc=0 " 禁止缓存匹配项,每次都重新生成匹配项 | |
let g:ycm_seed_identifiers_with_syntax=1 " 语法关键字补全 | |
" 在注释输入中也能补全 | |
let g:ycm_complete_in_comments = 1 | |
" 在字符串输入中也能补全 | |
let g:ycm_complete_in_strings = 1 | |
"注释和字符串中的文字也会被收入补全 | |
" let g:ycm_collect_identifiers_from_comments_and_strings = 0 | |
" let g:ycm_global_ycm_extra_conf = | |
" '~/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp/ycm/.ycm_extra_conf.py' | |
nnoremap <F5> :YcmForceCompileAndDiagnostics<CR> | |
let mapleader = "," | |
nnoremap <leader>lo :lopen<CR> "open locationlist | |
nnoremap <leader>lc :lclose<CR> "close locationlist | |
inoremap <leader><leader> <C-x><C-o>" | |
inoremap <leader><leader> <C-x><C-o> | |
nnoremap <leader>jd :YcmCompleter GoToDefinitionElseDeclaration<CR> | |
nmap <leader>v "+gp | |
nmap <leader>c "+y | |
" nerd tree | |
let NERDTreeQuitOnOpen=1 "打开文件时关闭树 | |
let NERDTreeShowBookmarks=1 "显示书签 | |
let mapleader = "," | |
map <F3> :NERDTreeToggle<CR> | |
map <F2> :NERDTreeMirror<CR> | |
nnoremap <leader>ma :set mouse=a<cr> | |
nnoremap <leader>mu :set mouse=<cr> | |
set modelines=0 | |
highlight WhitespaceEOL ctermbg=red guibg=red | |
match WhitespaceEOL /\s\+$/ | |
nmap <F1> :TagbarToggle<CR> | |
let g:tagbar_ctags_bin='/usr/local/Cellar/ctags/5.8_1/bin/ctags' | |
let g:Tlist_Ctags_Cmd='/usr/local/Cellar/ctags/5.8_1/bin/ctags' | |
"设置更好的删除 | |
"set backspace=2 | |
" | |
syntax on "语法高亮 | |
" | |
""用浅色高亮当前行 | |
autocmd InsertLeave * se nocul | |
autocmd InsertEnter * se cul | |
set smartindent "智能对齐 | |
set autoindent "自动对齐 | |
set confirm "在处理未保存或只读文件的时候,弹出确认框 | |
set tabstop=2 "tab键的宽度 | |
set softtabstop=2 | |
set shiftwidth=2 "统一缩进为4 | |
set expandtab "不要用空格替代制表符 | |
set number "显示行号 | |
set history=50 "历史纪录数 | |
set hlsearch | |
set incsearch "搜素高亮,搜索逐渐高亮 | |
set gdefault "行内替换 | |
set encoding=utf-8 | |
set fileencodings=utf-8,ucs-bom,shift-jis,gb18030,gbk,gb2312,cp936,utf-16,big5,euc-jp,latin1 "编码设置 | |
colorscheme molokai | |
set guifont=Menlo:h16:cANSI "设置字体 | |
set langmenu=zn_CN.UTF-8 | |
set helplang=cn "语言设置 | |
set ruler "在编辑过程中,在右下角显示光标位置的状态行 | |
set laststatus=1 "总是显示状态行 | |
set showcmd "在状态行显示目前所执行的命令,未完成的指令片段也会显示出来 | |
set scrolloff=3 "光标移动到buffer的顶部和底部时保持3行的距离 | |
set showmatch "高亮显示对应的括号 | |
set matchtime=5 "对应括号高亮时间(单位是十分之一秒) | |
set autowrite "在切换buffer时自动保存当前文件 | |
set wildmenu "增强模式中的命令行自动完成操作 | |
set linespace=2 "字符间插入的像素行数目 | |
set whichwrap=b,s,<,>,[,] "开启normal 或visual模式下的backspace键空格键,左右方向键,insert或replace模式下的左方向键,右方向键的跳行功能 | |
filetype plugin indent on "分为三部分命令:file on,file plugin on,file indent on 分别是自动识别文件类型, 用用文件类型脚本,使用缩进定义文件 | |
set foldenable "允许折叠 | |
set cursorline "突出显示当前行 | |
set magic "设置魔术?神马东东 | |
set ignorecase "搜索忽略大小写 | |
filetype on "打开文件类型检测功能 | |
set background=dark | |
set t_Co=256 "256色 | |
set mouse=a "允许鼠标 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment