1
0
mirror of https://shylinux.com/x/ContextOS synced 2025-04-25 16:58:06 +08:00
This commit is contained in:
shaoying 2020-09-14 21:46:33 +08:00
parent 1f0be49c34
commit de1baa64df
9 changed files with 15 additions and 2925 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,12 +0,0 @@
set -g mouse-select-window on
set -g mouse-select-pane on
set -g mouse-resize-pane on
set -g mouse-utf8 on
set -g mode-mouse on
set -gw window-status-last-bg "cyan"
bind C-m command-prompt -p "move to:" "swap-pane -s . -t %%"
bind C-u command-prompt -p "move to:" "move-pane -v -t %%"
bind C-v command-prompt -p "move to:" "move-pane -h -t %%"

View File

@ -1,16 +0,0 @@
set -g mouse on
set -gw window-status-last-style "bg=cyan"
bind C-m display-panes "swap-pane -t %%"
bind C-u display-panes "move-pane -v -t %%"
bind C-v display-panes "move-pane -h -t %%"
bind u split-window -c "#{pane_current_path}"
bind v split-window -h -c "#{pane_current_path}"
bind U split-window -f -c "#{pane_current_path}"
bind V split-window -f -h -c "#{pane_current_path}"
bind -t vi-copy MouseDragEnd1Pane copy-selection -x
bind -t vi-copy C-c copy-selection -x
bind C-s copy-mode -e

View File

@ -1,117 +0,0 @@
# 配置管理 {{{
set -g prefix C-s
set -g base-index 1
set -g pane-base-index 1
set -g renumber-windows on
set -g display-time 5000
set -g display-panes-time 5000
set -g history-limit 1000
set -g mode-keys vi
set -gw other-pane-width 60
set -gw other-pane-height 15
# 标题栏
set -g set-titles on
set -g set-titles-string "#h/#S:#W.#P"
set -g mode-fg white
set -g mode-bg red
set -g message-fg white
set -g message-bg black
set -g pane-active-border-fg cyan
set -g pane-active-border-bg blue
# 状态栏
set -g status-bg blue
set -g status-fg white
set -g allow-rename off
set -g status-interval 1
set -g status-left-length 60
set -g status-left "#[bg=red fg=white]\ [#h/#S]\ #[bg=yellow fg=black]\ [#{pane_height},#{pane_width}]\ #[bg=red]"
set -g status-right "#[bg=red]\ [#(date '+%Y-%m-%d %H:%M:%S')]\ "
set -g status-right-length 60
set -gw window-status-separator ""
set -gw window-status-format "#[bg=blue fg=white]\ [#I:#W.#{pane_index}#F]\ "
set -gw window-status-current-format "#[bg=red fg=white]\ [#I:#W.#{pane_index}#F#{?pane_in_mode,COPY,}]\ "
# }}}
# 会话管理{{{
bind s choose-tree -u
bind q confirm-before "detach-client"
# }}}
# 窗口管理{{{
bind b break-pane
bind c new-window
bind e command-prompt -p "window new name:" "rename-window '%%'"
bind B command-prompt -p "target window:" "join-pane -v -t %%"
bind m choose-tree -suw -c "swap-window -t %%"
bind p previous-window
bind n next-window
bind o last-window
# }}}
# 面板管理{{{
bind i display-panes
bind x confirm-before -p "kill-pane #P? (y/n)" kill-pane
bind z resize-pane -Z
bind v split-window -h
bind u split-window
bind h select-pane -L
bind l select-pane -R
bind j select-pane -D
bind k select-pane -U
bind C-g select-layou tiled
bind C-y select-layou main-vertical
bind C-t select-layou main-horizontal
bind C-h command-prompt -p "size:" "resize-pane -L %%"
bind C-l command-prompt -p "size:" "resize-pane -R %%"
bind C-j command-prompt -p "size:" "resize-pane -D %%"
bind C-k command-prompt -p "size:" "resize-pane -U %%"
bind C-o confirm-before -p "kill all other pane(y/n)?" "kill-pane -a"
# }}}
# 缓存管理{{{
bind C-s copy-mode
bind C-d clear-history
bind \; paste-buffer
bind r choose-buffer
bind a paste-buffer
bind -t vi-copy c copy-selection
bind -t vi-copy Space begin-selection
# }}}
# 命令管理{{{
bind Space command-prompt
bind -t vi-edit C-p history-up
bind -t vi-edit C-n history-down
bind -t vi-edit C-f cursor-right
bind -t vi-edit C-b cursor-left
bind -t vi-edit C-j enter
# }}}
if-shell "[ -e ~/.tmux_local ]" "source-file ~/.tmux_local"
# set -g status-fg white
# set -g status-bg black
# set -g status-left "#[bg=black fg=white]\ [#h/#S]\ #[bg=black fg=white]\ [#{pane_height},#{pane_width}]\ #[bg=black]"
# set -g status-right "#[bg=black fg=white]\ [#(date '+%Y-%m-%d %H:%M:%S')]\ "
# set -gw window-status-format "#[bg=black fg=white]\ [#I:#W.#{pane_index}#F]\ "
# set -gw window-status-current-format "#[bg=black fg=white]\ [#I:#W.#{pane_index}#F#{?pane_in_mode,COPY,}]\ "
# set -g mode-fg white
# set -g mode-bg white
# set -g message-fg white
# set -g message-bg black
# set -g pane-border-fg white
# set -g pane-border-bg black
# set -g pane-active-border-fg white
# set -g pane-active-border-bg black
# set -g display-panes-active-colour white
# set -g display-panes-colour white

View File

@ -1,133 +0,0 @@
" 软件安装 {{{
"$ curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
"
"1. 安装vim各种插件
":PlugInstall
"
"2. 安装go各种插件
":GoInstallBinaries
"}}}
" 插件列表"{{{
if filereadable(expand("~/.vim/autoload/plug.vim"))
call plug#begin()
Plug 'vim-scripts/matrix.vim--Yang'
Plug 'vim-airline/vim-airline'
Plug 'gcmt/taboo.vim'
set sessionoptions+=tabpages,globals
Plug 'scrooloose/nerdtree'
let g:NERDTreeWinPos="right"
Plug 'kien/ctrlp.vim'
let g:ctrlp_cmd='CtrlPBuffer'
Plug 'airblade/vim-gitgutter'
Plug 'tpope/vim-fugitive'
Plug 'fatih/vim-go'
let g:go_version_warning=0
let g:go_highlight_functions=1
Plug 'chr4/nginx.vim'
Plug 'othree/html5.vim'
Plug 'vim-scripts/python.vim'
Plug 'mbbill/echofunc'
Plug 'vim-scripts/tComment'
Plug 'vim-syntastic/syntastic'
Plug 'plasticboy/vim-markdown'
call plug#end()
endif
"}}}
" 基本配置"{{{
set cc=80
set nowrap
set number
set relativenumber
set cursorline
set cursorcolumn
set scrolloff=3
set mouse=a
" 缓存
set hidden
set autowrite
set encoding=utf-8
" 搜索
set hlsearch
set incsearch
set nowrapscan
set smartcase
set ignorecase
set showmatch
set matchtime=2
" 缩进
set cindent
set expandtab
set tabstop=4
set shiftwidth=4
set backspace=indent,eol,start
" 折叠
set foldenable
set foldmethod=marker
" 按键
nnoremap <Space> :
nnoremap <C-H> <C-W>h
nnoremap <C-J> <C-W>j
nnoremap <C-K> <C-W>k
nnoremap <C-L> <C-W>l
"}}}
" 编程配置{{{
set keywordprg=man\ -a
let javaScript_fold=1
function! Config(type)
if a:type == "go"
set foldmethod=syntax
set foldnestmax=3
elseif a:type == "shy"
set filetype=shy
set commentstring=#%s
elseif a:type == "json"
set foldmethod=syntax
elseif a:type == "conf"
set filetype=nginx
elseif a:type == "xml"
set filetype=xml
elseif a:type == "css"
set filetype=css
set foldmethod=marker
set foldmarker={,}
elseif a:type == "js"
set filetype=javascript
source ~/.vim/syntax/javascript.vim
set foldmethod=marker
set foldmarker={,}
endif
endfunction
autocmd BufNewFile,BufReadPost *.go call Config("go")
autocmd BufNewFile,BufReadPost *.shy call Config("shy")
autocmd BufNewFile,BufReadPost *.json call Config("json")
autocmd BufNewFile,BufReadPost *.conf call Config("conf")
autocmd BufNewFile,BufReadPost *.wxml call Config("xml")
autocmd BufNewFile,BufReadPost *.wxss call Config("css")
autocmd BufNewFile,BufReadPost *.js call Config("js")
"}}}
"本地配置"{{{
if filereadable(expand("~/.local.vim")) | source ~/.local.vim | endif
if filereadable(expand("~/.auto.vim")) | source ~/.auto.vim | endif
autocmd BufReadPost * normal `"
"}}}
"主题色系"{{{
syntax on
set t_Co=256
colorscheme torte
highlight Comment ctermfg=cyan ctermbg=darkblue
highlight PmenuSel ctermfg=darkblue ctermbg=cyan
highlight Pmenu ctermfg=cyan ctermbg=darkblue
"}}}

View File

@ -31,32 +31,11 @@
init
~web.code.input
# load
wubi import usr/wubi-dict/person
~web.wiki.alpha
# load
~ssh
listen create port 9030
source local.shy
target web.code.pprof
target web.chat.fyne.hi
target web.wiki.alpha.load
target web.code.input.push
target web.code.qrc.save
target web.chat.lark.app
target web.chat.qrcode.qrcode
target web.chat.location.location
target web.chat.paste.paste
target web.chat.wx.menu
target web.chat.meet.miss
target web.chat.lark.msg
target web.code.install
target web.code.chrome.spided
target web.code.mysql.client
target ssh.listen
target web.code.vim.favor

View File

@ -23,27 +23,6 @@ ish_miss_prepare golang-story
ish_miss_prepare redis-story
ish_miss_prepare mysql-story
ish_miss_prepare_vim() {
ish_miss_create_link ~/.vimrc $PWD/etc/conf/vimrc
ish_miss_create_link ~/.auto.vim $PWD/usr/publish/auto.vim
mkdir -p ~/.vim/autoload
ish_miss_create_link ~/.vim/autoload/plug.vim $PWD/etc/conf/plug.vim
mkdir -p ~/.vim/syntax
ish_miss_create_link ~/.vim/syntax/sh.vim $PWD/etc/conf/sh.vim
ish_miss_create_link ~/.vim/syntax/shy.vim $PWD/etc/conf/shy.vim
ish_miss_create_link ~/.vim/syntax/go.vim $PWD/etc/conf/go.vim
ish_miss_create_link ~/.vim/syntax/javascript.vim $PWD/etc/conf/javascript.vim
}
ish_miss_prepare_git() {
git config --global alias.s status
git config --global alias.b branch
git config --global credential.helper store
}
ish_miss_prepare_tmux() {
ish_miss_create_link ~/.tmux.conf $PWD/etc/conf/tmux.conf
}
ish_miss_prepare_bash() {
ish_miss_create_link ~/.bashrc $PWD/etc/conf/bashrc
ish_miss_create_link ~/.zshrc $PWD/etc/conf/zshrc
@ -60,13 +39,16 @@ ish_miss_prepare_bash() {
echo -e "\nsource $PWD/etc/conf/zshrc\n" >> ~/.zshrc
fi
fi
}
# ish_miss_prepare_bash
ish_miss_prepare_bash
ish_miss_prepare_tmux
ish_miss_prepare_git
ish_miss_prepare_vim
require misc/tmux/tmux.sh
require misc/git/git.sh
require misc/vim/vim.sh
ish_ctx_dev_tmux_prepare
ish_ctx_dev_git_prepare
ish_ctx_dev_vim_prepare
# ish_miss_prepare_develop

2
go.mod
View File

@ -16,7 +16,7 @@ require (
github.com/shylinux/mysql-story v0.0.0-00010101000000-000000000000
github.com/shylinux/nginx-story v0.0.0-00010101000000-000000000000
github.com/shylinux/redis-story v0.0.0-00010101000000-000000000000
github.com/shylinux/toolkits v0.1.7
github.com/shylinux/toolkits v0.1.8
github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e
gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df
)

View File

@ -20,12 +20,16 @@ volcanos icebergs intshell
learning toolkits contexts
` stroke red fill black
chapter "环境"
field "安装管理" web.code.install
field "发布管理" web.code.publish
field "服务管理" cli.daemon
chapter "流水"
field "编辑器" web.code.vim.sync
field "命令行" web.code.zsh.sync
field "浏览器" web.code.chrome.sync
chapter "组织"
chapter "品牌"
chapter "管理"