Aliens

dotfiles

April 8, 2023

.tmux.conf

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
unbind-key C-b
set-option -g prefix M-a
set -g default-terminal "xterm-256color"
set -ga terminal-overrides ",*256col*:Tc"
setw -g mode-keys vi

unbind %
bind | split-window -h      # 使用|竖屏,方便分屏
unbind '"'
bind - split-window -v      # 使用-横屏,方便分屏

set -g mouse on
set -g history-limit 10000

set -g base-index 1 # 设置窗口的起始下标为1
setw -g pane-base-index 1 # 设置面板的起始下标为1

.bashrc

1
2
3
4
5
6
7
8
9
PROXY_IP=127.0.0.1:7890
PROXY_PROTO=http
#PROXY_PROTO=socks5
alias proxy='\
  export http_proxy=${PROXY_PROTO}://${PROXY_IP}; \
  export https_proxy=${PROXY_PROTO}://${PROXY_IP}; \
  export all_proxy=${PROXY_PROTO}://${PROXY_IP}; \
  export ftp_proxy=${PROXY_PROTO}://${PROXY_IP}'
alias unproxy='unset http_proxy https_proxy all_proxy ftp_proxy'

.gitconfig

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
[user]
    email = [email protected]
    name = Jerry
[rerere]
    enabled = false
[core]
    editor = vim
[color]
    ui = auto
[credential]
    helper = store
[alias]
    c = commit
    ca = commit --amend
    can = commit --amend --no-edit
    cabt = cherry-pick --abort
    cc = cherry-pick --continue
    d = diff
    dc = diff --cached
    l = log --oneline --decorate --graph --exclude=refs/stash
    lg = log --decorate=full
    rh = reset --hard
    rhh = reset --hard HEAD^
    s = status
;	s = status -s
    unproxy = config --global --remove-section https
    proxy = config --global https.proxy socks5://127.0.0.1:7890

pip.conf

1
mkdir -p .pip
1
2
3
[global]
  timeout=60
  index-url = https://mirrors.aliyun.com/pypi/simple/

.vimrc

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
let g:mapleader = ","

syntax enable
filetype indent on
set encoding=utf-8
set ts=4
set sw=4
" set et
set nu
set ai
" set relativenumber
set mouse=a
set fdm=marker
set nowrap

if has("autocmd")
  au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
endif

" vim-plug{{{
" Specify a directory for plugins
" - For Neovim: ~/.local/share/nvim/plugged
" - Avoid using standard Vim directory names like 'plugin'
call plug#begin('~/.vim/plugged')
Plug 'bling/vim-airline'
Plug 'vim-airline/vim-airline-themes'
" Plug 'tomasr/molokai'
Plug 'NLKNguyen/papercolor-theme'
Plug 'easymotion/vim-easymotion'
Plug 'luochen1990/rainbow'
Plug 'preservim/nerdcommenter'
Plug 'preservim/nerdtree', { 'on': 'NERDTreeToggle' }
Plug 'junegunn/vim-easy-align'
Plug 'Yggdroot/LeaderF', { 'do': ':LeaderfInstallCExtension' }
" Plug 'haya14busa/incsearch.vim'
" Plug 'tpope/vim-sleuth'
" Plug 'junegunn/fzf'
call plug#end()"}}}

" Common Keymap {{{
imap <leader>; <esc>$a;
nmap <leader>; $a;<esc>;

" map /  <Plug>(incsearch-forward)
" map ?  <Plug>(incsearch-backward)
" map g/ <Plug>(incsearch-stay)

" }}}

" EasyAlign {{{
vmap <Leader>a <Plug>(EasyAlign)
nmap <Leader>a <Plug>(EasyAlign)

if !exists('g:easy_align_delimiters')
  let g:easy_align_delimiters = {}
endif
let g:easy_align_delimiters['#'] = { 'pattern': '#', 'ignore_groups': ['String'] }
" }}}

" Nerdcommenter {{{
" 注释时自动加空格
let g:NERDSpaceDelims=1
" }}}

" Nerdtree {{{
nnoremap <F12> :NERDTreeToggle<CR>
" Start NERDTree. If a file is specified, move the cursor to its window.
" autocmd StdinReadPre * let s:std_in=1
" autocmd VimEnter * NERDTree | if argc() > 0 || exists("s:std_in") | wincmd p | endif
" Exit Vim if NERDTree is the only window remaining in the only tab.
autocmd BufEnter * if tabpagenr('$') == 1 && winnr('$') == 1 && exists('b:NERDTree') && b:NERDTree.isTabTree() | quit | endif
" }}}

" LeaderF {{{
if has('nvim')
  let g:Lf_WindowPosition = 'popup'
endif

let g:Lf_DefaultExternalTool='rg'
let g:Lf_HideHelp = 1

let g:Lf_ShortcutF = '<c-p>'
let g:Lf_ShortcutB = '<c-l>'

noremap <leader>f :LeaderfSelf<cr>
noremap <leader>fm :LeaderfMru<cr>
noremap <leader>ff :LeaderfFunction<cr>
" noremap <leader>fb :LeaderfBufTagAll<cr>
noremap <leader>ft :LeaderfBufTag<cr>
noremap <leader>fl :LeaderfLine<cr>
noremap <leader>fw :LeaderfWindow<cr>
" }}}

" 彩虹括号 {{{
let g:rainbow_active = 1
" }}}

" vim-airline {{{
let g:airline_theme="papercolor"
" 关闭状态显示空白符号计数
let g:airline#extensions#whitespace#enabled = 0
" }}}

" colorscheme{{{
set background=dark
colorscheme PaperColor

" Enable true color 启用终端24位色
if exists('+termguicolors')
  let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
  let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum"
  set termguicolors
endif

"支持透明背景
" hi Normal ctermbg = none

"修改匹配括号的颜色
hi MatchParen cterm=bold ctermbg=none ctermfg=magenta
"}}}