mirror of
https://shylinux.com/x/ContextOS
synced 2025-04-25 16:58:06 +08:00
tce add .vimrc
This commit is contained in:
parent
e547d15513
commit
36b58f1139
103
etc/dotsfile/.vimrc
Normal file
103
etc/dotsfile/.vimrc
Normal file
@ -0,0 +1,103 @@
|
||||
"加载插件"{{{
|
||||
call plug#begin()
|
||||
Plug 'vim-scripts/tComment'
|
||||
Plug 'airblade/vim-gitgutter'
|
||||
Plug 'vim-airline/vim-airline'
|
||||
Plug 'vim-airline/vim-airline-themes'
|
||||
Plug 'ntpeters/vim-better-whitespace'
|
||||
|
||||
Plug 'vim-scripts/taglist.vim'
|
||||
let g:Tlist_Enable_Fold_Column=0
|
||||
nnoremap <F2> :TlistToggle<CR>
|
||||
|
||||
Plug 'scrooloose/nerdtree'
|
||||
let g:NERDTreeWinPos="right"
|
||||
nnoremap <F4> :NERDTreeToggle<CR>
|
||||
|
||||
Plug 'kien/ctrlp.vim'
|
||||
let g:ctrlp_cmd='CtrlPBuffer'
|
||||
|
||||
Plug 'rking/ag.vim'
|
||||
nnoremap <C-G> :Ag <C-R>=expand("<cword>")<CR><CR>
|
||||
|
||||
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
|
||||
nnoremap <C-N> :FZF -q <C-R>=expand("<cword>")<CR><CR>
|
||||
|
||||
Plug 'fatih/vim-go'
|
||||
Plug 'chr4/nginx.vim'
|
||||
Plug 'othree/html5.vim'
|
||||
Plug 'godlygeek/tabular'
|
||||
Plug 'plasticboy/vim-markdown'
|
||||
Plug 'vim-scripts/python.vim'
|
||||
|
||||
Plug 'vim-syntastic/syntastic'
|
||||
Plug 'Valloric/YouCompleteMe'
|
||||
let g:ycm_confirm_extra_conf=0
|
||||
nnoremap gd :YcmCompleter GoToDeclaration<CR>
|
||||
|
||||
Plug 'benmills/vimux'
|
||||
let mapleader=";"
|
||||
nnoremap <Leader>vp :VimuxPromptCommand<CR>
|
||||
nnoremap <Leader>vl :VimuxRunLastCommand<CR>
|
||||
nnoremap <Leader>vx :VimuxInterruptRunner<CR>
|
||||
nnoremap <Leader>vz :VimuxZoomRunner<CR>
|
||||
|
||||
Plug 'vim-scripts/matrix.vim--Yang'
|
||||
call plug#end()
|
||||
"}}}
|
||||
" 基本配置"{{{
|
||||
set number
|
||||
set relativenumber
|
||||
set cursorline
|
||||
set cursorcolumn
|
||||
set ruler
|
||||
set showcmd
|
||||
set showmode
|
||||
set cc=80
|
||||
set nowrap
|
||||
set scrolloff=3
|
||||
|
||||
set tabstop=4
|
||||
set shiftwidth=4
|
||||
set cindent
|
||||
set expandtab
|
||||
|
||||
set showmatch
|
||||
set matchtime=2
|
||||
set foldenable
|
||||
set foldmethod=marker
|
||||
|
||||
set hlsearch
|
||||
set incsearch
|
||||
set nowrapscan
|
||||
set smartcase
|
||||
|
||||
set hidden
|
||||
set autowrite
|
||||
set encoding=utf-8
|
||||
set mouse=a
|
||||
|
||||
colorscheme elflord
|
||||
set t_Co=256
|
||||
"}}}
|
||||
"映射快捷键"{{{
|
||||
nnoremap <C-H> <C-W>h
|
||||
nnoremap <C-J> <C-W>j
|
||||
nnoremap <C-K> <C-W>k
|
||||
nnoremap <C-L> <C-W>l
|
||||
nnoremap <Space> :
|
||||
|
||||
nnoremap j gj
|
||||
nnoremap k gk
|
||||
|
||||
nnoremap df :FZF<CR>
|
||||
inoremap jk <Esc>
|
||||
cnoremap jk <CR>
|
||||
"}}}
|
||||
" 编程配置{{{
|
||||
set keywordprg=man\ -a
|
||||
|
||||
autocmd BufNewFile,BufReadPost *.shy set filetype=shy
|
||||
autocmd BufNewFile,BufReadPost *.shy set commentstring=#%s
|
||||
autocmd BufNewFile,BufReadPost *.conf set filetype=nginx
|
||||
"}}}
|
@ -457,6 +457,12 @@ var Index = &ctx.Context{Name: "web", Help: "应用中心",
|
||||
"template": "detail", "title": "json",
|
||||
"option": map[string]interface{}{"ninput": 1},
|
||||
},
|
||||
map[string]interface{}{
|
||||
"from": "root", "to": []interface{}{},
|
||||
"module": "cli", "detail": []interface{}{"system", "tmux", "show-buffer"},
|
||||
"template": "detail", "title": "buffer",
|
||||
"option": map[string]interface{}{"ninput": 1},
|
||||
},
|
||||
map[string]interface{}{
|
||||
"from": "root", "to": []interface{}{},
|
||||
"module": "cli", "command": "system",
|
||||
|
@ -26,22 +26,24 @@ function keyup(event) {
|
||||
}
|
||||
|
||||
document.onkeyup = keyup;
|
||||
function toggle() {
|
||||
window.list_hide = !window.list_hide;
|
||||
var list = document.getElementsByClassName("list")[0];
|
||||
var content = document.getElementsByClassName("content")[0];
|
||||
if (list_hide) {
|
||||
list.style.visibility = "hidden";
|
||||
list.style.width="0px";
|
||||
list.style.height="0px";
|
||||
list.style["min-width"]="0px";
|
||||
content.style.width="100%";
|
||||
} else {
|
||||
list.style.visibility = "visible";
|
||||
list.style.width="15%";
|
||||
list.style.height="100%";
|
||||
list.style["min-width"]="180px";
|
||||
content.style.width="85%";
|
||||
function toggle(side) {
|
||||
if (side == "left") {
|
||||
window.left_list_hide = !window.left_list_hide;
|
||||
var list = document.getElementsByClassName("list")[0];
|
||||
var content = document.getElementsByClassName("content")[0];
|
||||
if (left_list_hide) {
|
||||
list.style.visibility = "hidden";
|
||||
list.style.width="0px";
|
||||
list.style.height="0px";
|
||||
list.style["min-width"]="0px";
|
||||
content.style.width="100%";
|
||||
} else {
|
||||
list.style.visibility = "visible";
|
||||
list.style.width="15%";
|
||||
list.style.height="100%";
|
||||
list.style["min-width"]="180px";
|
||||
content.style.width="85%";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -107,9 +107,15 @@ p {
|
||||
height:100%;
|
||||
float:left;
|
||||
}
|
||||
.toggle1 {
|
||||
background-color:green;
|
||||
width:2%;
|
||||
height:100%;
|
||||
float:right;
|
||||
}
|
||||
.texts {
|
||||
width:96%;
|
||||
max-width:800px;
|
||||
max-width:800px;
|
||||
width:94%;
|
||||
float:left;
|
||||
margin-left:2%;
|
||||
}
|
||||
@ -167,7 +173,8 @@ p {
|
||||
}
|
||||
</style>
|
||||
<div class="content">
|
||||
<div class="toggle" title="点击,显示或隐藏目录" onclick="toggle()"></div>
|
||||
<div class="toggle" title="点击,显示或隐藏目录" onclick="toggle('left')"></div>
|
||||
<div class="toggle1" title="点击,显示或隐藏目录" onclick="toggle('right')"></div>
|
||||
{{if option . "modify_time"|meta}}
|
||||
<div class="record">上次修订时间: {{option . "modify_time"|meta}} 修订次数: {{option . "modify_count"|meta}}</div>
|
||||
{{end}}
|
||||
|
Loading…
x
Reference in New Issue
Block a user