Skip to content

Commit 1a933b7

Browse files
author
tangjunxing
committed
Mod
1 parent e2fcf29 commit 1a933b7

File tree

6 files changed

+175
-12
lines changed

6 files changed

+175
-12
lines changed

.netrwhist

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
let g:netrw_dirhistmax =10
2+
let g:netrw_dirhist_cnt =1
3+
let g:netrw_dirhist_1='/home/tjx/html'

deploy.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
realpath=$(realpath $0)
77
cd $(dirname $(dirname $realpath))
88
tar czvf /tmp/vim-vide.tgz $(basename $(dirname $realpath))
9-
qshell rput -w bvcstatic vim-vide-20200513.tgz /tmp/vim-vide.tgz
9+
qshell rput -w static vim-vide-20200812.tgz /tmp/vim-vide.tgz
1010

1111
#
1212
# git-hooks

pack/github/start/copilot.vim

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Subproject commit 1a284014d2e0baf367706a94b2a9ee5fd56fd457

version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v78-20200513
1+
v79-20240410

vimrc

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ autocmd BufWinEnter *.sls set filetype=yaml
1616
autocmd GUIEnter * silent !wmctrl -r :ACTIVE: -b add,maximized_vert,maximized_horz
1717
autocmd FileType php setlocal commentstring=//\ %s
1818
call system('mkdir -p ~/.vimtmp/undodir ~/.vimtmp/backupdir ~/.vimtmp/directory')
19-
colorscheme torte
19+
" colorscheme torte
2020
filetype on
2121
filetype plugin indent on
2222
filetype plugin on
@@ -79,22 +79,35 @@ syntax on
7979
"
8080
"" statusline
8181
"
82-
function Version ()
83-
return system("grep -o '^v[0-9]*' ~/.vim/version|tr -d '\n'")
84-
endfunction
82+
" function Version ()
83+
" return system("grep -o '^v[0-9]*' ~/.vim/version|tr -d '\n'")
84+
" endfunction
85+
" set statusline=(Vide.%{Version()})\ \ %<%f
86+
" set statusline+=%w%h%m%r
87+
" set statusline+=\ %{getcwd()}
88+
" set statusline+=\ [%{&ff}:%{&fenc}:%Y]
89+
" set statusline+=%=%-14.(%l,%c%V%)\ %p%%
8590
set laststatus=2
86-
set statusline=(Vide.%{Version()})\ \ %<%f
87-
set statusline+=%w%h%m%r
88-
set statusline+=\ %{getcwd()}
89-
set statusline+=\ [%{&ff}:%{&fenc}:%Y]
90-
set statusline+=%=%-14.(%l,%c%V%)\ %p%%
91+
let g:lightline = {
92+
\ 'active': {
93+
\ 'left': [ [ 'mode', 'paste' ],
94+
\ [ 'readonly', 'filename', 'modified', 'method' ] ]
95+
\ },
96+
\ 'component': {
97+
\ 'lineinfo': "%{line('.') . '/' . line('$')}",
98+
\ }
99+
\ }
100+
91101

92102
"
93103
" vim-plug
94104
"
95105
call plug#begin('~/.vim/plug')
96106
" Plug 'vim-scripts/taglist.vim'
97107
" Plug 'fatih/vim-go', { 'do': ':GoUpdateBinaries' }
108+
Plug 'github/copilot'
109+
Plug 'itchyny/lightline.vim'
110+
Plug 'NLKNguyen/papercolor-theme'
98111
Plug 'wgwoods/vim-systemd-syntax'
99112
Plug 'leafgarland/typescript-vim'
100113
Plug 'xolox/vim-misc'
@@ -112,9 +125,12 @@ Plug 'roxma/vim-paste-easy'
112125
Plug 'scrooloose/nerdtree'
113126
Plug 'tmhedberg/matchit'
114127
Plug 'tpope/vim-commentary'
115-
Plug 'vim-syntastic/syntastic'
128+
" Plug 'vim-syntastic/syntastic'
116129
call plug#end()
117130

131+
set background=dark
132+
colorscheme PaperColor
133+
118134
let g:vim_markdown_folding_disabled = 1
119135
let g:gitgutter_max_signs=10000
120136

vimrc_agiclass

Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
"检查plug vim管理器是否存在
2+
if empty(glob('$HOME/.vim/autoload/plug.vim'))
3+
let command = 'curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
4+
echo 'plug vim not exitst'
5+
execute '!'.command
6+
endif
7+
"使用plug包管理器管理插件包
8+
call plug#begin('~/.vim/plugged')
9+
"开始的导航界面
10+
Plug 'mhinz/vim-startify'
11+
"轻量彩色工具栏
12+
Plug 'itchyny/lightline.vim'
13+
"添加文件icon支持
14+
Plug 'ryanoasis/vim-devicons'
15+
"树状的文件浏览窗口
16+
Plug 'preservim/nerdtree'
17+
Plug 'majutsushi/tagbar'
18+
"格式代码,对齐符号或空格
19+
Plug 'godlygeek/tabular'
20+
"编辑括号、引号和标签等包围结构
21+
Plug 'tpope/vim-surround'
22+
"整行或整段注释代码
23+
Plug 'tpope/vim-commentary'
24+
"增强.命令的重复
25+
Plug 'tpope/vim-repeat'
26+
"用括号做常用命名的mapping
27+
Plug 'tpope/vim-unimpaired'
28+
"基于搜字符来快速跳转
29+
Plug 'easymotion/vim-easymotion'
30+
"主题
31+
Plug 'arcticicestudio/nord-vim'
32+
Plug 'NLKNguyen/papercolor-theme'
33+
"高亮多个选中的关键字
34+
Plug 'lfv89/vim-interestingwords'
35+
"自动补全的括号
36+
Plug 'jiangmiao/auto-pairs'
37+
"常用的snippets
38+
Plug 'honza/vim-snippets'
39+
"C++的语法高亮
40+
Plug 'octol/vim-cpp-enhanced-highlight', {'for': 'cpp'}
41+
call plug#end()
42+
43+
"开启文件插件
44+
filetype plugin on
45+
"设置高亮主题和风格
46+
set background=dark
47+
set termguicolors
48+
" colorscheme nord
49+
colorscheme PaperColor
50+
hi Normal ctermbg=NONE guibg=NONE
51+
hi LineNr ctermbg=NONE guibg=NONE
52+
hi SignColumn ctermbg=NONE guibg=NONE
53+
"打开 matchit.vim, 增强%匹配跳转的功能
54+
runtime macros/matchit.vim
55+
set clipboard=unnamed
56+
"语法高亮
57+
syntax on
58+
set re=0
59+
"显示行号
60+
set number
61+
set relativenumber
62+
"显示光标所在位置的行号和列号
63+
set ruler
64+
"高亮光标所在行
65+
set cursorline
66+
"隐藏鼠标指针
67+
set mousehide
68+
"设置帮助语言为中文
69+
set helplang=ch
70+
"设置鼠标可用
71+
set mouse=a
72+
"设置显示正在输入的命令
73+
set showcmd
74+
"不使用缓存文件
75+
set nobackup
76+
set noswapfile
77+
"快速的响应时间
78+
set updatetime=300
79+
"打开命令菜单的补全
80+
set wildmenu
81+
set wildmode=longest:list,full
82+
"关闭高亮搜索
83+
set nohlsearch
84+
"设置 leader key
85+
let mapleader=";"
86+
"设置字符编码
87+
set encoding=utf-8
88+
"倒数第二行显示状态行
89+
set laststatus=2
90+
"设置tab为2个空格
91+
set tabstop=2
92+
set expandtab
93+
"设置缩进为2个空格
94+
set shiftwidth=2
95+
"强制写入文件
96+
cmap w!! w !sudo tee % > /dev/null
97+
"设置跳转窗口的快捷键
98+
nmap <C-J> <C-W>j
99+
nmap <C-K> <C-W>k
100+
nmap <C-L> <C-W>l
101+
nmap <C-H> <C-W>h
102+
"设置折叠代码的快捷键
103+
nnoremap <space> za
104+
"设置保存和退出的快捷键
105+
nnoremap <leader>q :q<CR>
106+
nnoremap <leader>w :w<CR>
107+
nnoremap <leader>x :x<CR>
108+
"设置关闭tab的快捷键
109+
nnoremap <C-T> :tabclose<CR>
110+
nnoremap <leader>t :TagbarToggle<CR>
111+
let g:tagbar_width=25
112+
"设置快捷键启动NERDTree
113+
nnoremap <leader>' :NERDTreeToggle<CR>
114+
let g:NERDTreeWinSize=25
115+
let g:NERDTreeDirArrowExpandable = ''
116+
let g:NERDTreeDirArrowCollapsible = ''
117+
let g:webdevicons_conceal_nerdtree_brackets = 1
118+
if exists('g:loaded_webdevicons')
119+
call webdevicons#refresh()
120+
endif
121+
122+
let g:lightline = {
123+
\ 'active': {
124+
\ 'left': [ [ 'mode', 'paste' ],
125+
\ [ 'readonly', 'filename', 'modified', 'method' ] ]
126+
\ },
127+
\ 'component': {
128+
\ 'lineinfo': "%{line('.') . '/' . line('$')}",
129+
\ }
130+
\ }
131+
let g:EasyMotion_leader_key = 'f'
132+
"设置Interesting Word快捷键
133+
nnoremap <silent> <leader>h :call InterestingWords('n')<CR>
134+
nnoremap <silent> <leader>c :call UncolorAllWords()<CR>
135+
nnoremap <silent> n :call WordNavigation('forward')<CR>
136+
nnoremap <silent> N :call WordNavigation('backward')<CR>
137+
let g:interestingWordsTermColors = ['154', '121', '211', '137', '214', '222']
138+
let g:interestingWordsGUIColors = ['#8CCBEA', '#A4E57E', '#FFDB72', '#FF7272', '#FFB3FF', '#9999FF']
139+
140+
autocmd Filetype python setlocal ts=4 sw=4 expandtab
141+
autocmd FileType python,shell set commentstring=#\ %s
142+
autocmd FileType c,cpp set commentstring=//\ %s
143+

0 commit comments

Comments
 (0)