-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
171 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -127,3 +127,5 @@ dmypy.json | |
|
||
# Pyre type checker | ||
.pyre/ | ||
|
||
*.DS_Store |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
``` | ||
alias ll='ls -alF' | ||
alias e='exit' | ||
alias c='clear' | ||
alias dockerps='docker ps --format "{{.ID}}\t{{.Names}}"' | ||
# Git branch in prompt. | ||
parse_git_branch() { | ||
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | ||
} | ||
export PS1="\[\033[34m\]\t\[\033[00m\] \W\[\033[32m\]\$(parse_git_branch)\[\033[00m\] $ " | ||
[[ -r "/usr/local/etc/profile.d/bash_completion.sh" ]] && . "/usr/local/etc/profile.d/bash_completion.sh" | ||
source ~/.git-completion.bash | ||
source /Users/lian/python3.11-venv/bin/activate | ||
# Added by Toolbox App | ||
export PATH="$PATH:/usr/local/bin" | ||
eval "$(/usr/local/bin/brew shellenv)" | ||
# Set PATH, MANPATH, etc., for Homebrew. | ||
export HOMEBREW_BREW_GIT_REMOTE="https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git" | ||
export HOMEBREW_CORE_GIT_REMOTE="https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git" | ||
# export http_proxy="socks5://127.0.0.1:1080" | ||
# export https_proxy="socks5://127.0.0.1:1080" | ||
``` |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,134 @@ | ||
vi ~/.vimrc | ||
|
||
``` | ||
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 'ycm-core/YouCompleteMe' | ||
Plugin 'yegappan/mru' | ||
nnoremap <silent> <F7> :MRU<CR> | ||
Plugin 'ntpeters/vim-better-whitespace' | ||
nnoremap <silent> <F8> :StripWhitespace<CR> | ||
Plugin 'Exafunction/codeium.vim' | ||
imap <script><silent><nowait><expr> <C-h> codeium#Accept() | ||
Plugin 'yegappan/grep' | ||
nnoremap <silent> <F12> :Rgrep<CR> | ||
let Grep_Default_Filelist = '*.py *.html *.js' | ||
Plugin 'vim-syntastic/syntastic' | ||
" pip3 install flake8 | ||
set statusline+=%#warningmsg# | ||
set statusline+=%{SyntasticStatuslineFlag()} | ||
set statusline+=%* | ||
let g:syntastic_always_populate_loc_list = 1 | ||
let g:syntastic_auto_loc_list = 1 | ||
let g:syntastic_check_on_open = 0 | ||
let g:syntastic_check_on_wq = 0 | ||
let g:syntastic_python_checkers = ['flake8'] | ||
let g:syntastic_python_flake8_args="--max-line-length=120" | ||
" 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 | ||
map <F5> :call PRUN()<CR> | ||
func! PRUN() | ||
exec "w" | ||
if &filetype == 'python' | ||
exec "!python %" | ||
endif | ||
endfunc | ||
" Syntax highlighting | ||
syntax on | ||
set number | ||
set textwidth=79 | ||
" highlight | ||
:set listchars=tab:>-,trail:- | ||
" Auto indent | ||
set autoindent | ||
" Smart indent | ||
set smartindent | ||
" Ignore case when searching | ||
set ignorecase | ||
" Remember info about open buffers on close | ||
set viminfo^=% | ||
" Set 7 lines to the cursor - when moving vertically using j/k | ||
set scrolloff=7 | ||
" Always show current position | ||
set ruler | ||
" When searching try to be smart about cases | ||
set smartcase | ||
" Highlight search results | ||
set hlsearch | ||
:nnoremap <silent> <Space> :nohlsearch<Bar>:echo<CR> | ||
" Return to last edit position when opening files (You want this!) | ||
autocmd BufReadPost * | ||
\ if line("'\"") > 0 && line("'\"") <= line("$") | | ||
\ exe "normal! g`\"" | | ||
\ endif | ||
set backspace=2 | ||
set encoding=utf-8 | ||
set clipboard=unnamed | ||
" ********************************************* | ||
" 分割布局相关 | ||
" ********************************************* | ||
set splitbelow | ||
set splitright | ||
"快捷键,ctrl+l切换到左边布局,ctrl+h切换到右边布局 | ||
"ctrl+k切换到上面布局,ctrl+j切换到下面布局 | ||
nnoremap <C-J> <C-W><C-J> | ||
nnoremap <C-K> <C-W><C-K> | ||
nnoremap <C-L> <C-W><C-L> | ||
nnoremap <C-H> <C-W><C-H> | ||
set statusline+=%F | ||
``` |
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