update
0
.gitignore
vendored
Executable file → Normal file
0
csdn_markdown.md
Executable file → Normal file
0
esp/build_code_with_micropython.md
Executable file → Normal file
0
esp/emqtt.md
Executable file → Normal file
0
gfw/shadowsockes.md
Executable file → Normal file
0
git/change_repo.md
Executable file → Normal file
0
git/gitlab_nginx.md
Executable file → Normal file
0
git/install_git.md
Executable file → Normal file
0
git/install_gitlab.md
Executable file → Normal file
0
git/ssh_key.md
Executable file → Normal file
0
go/安装go1.4.md
Executable file → Normal file
0
markdown/add image.md
Executable file → Normal file
0
markdown/csdn_markdown.md
Executable file → Normal file
0
mongodb/auth.md
Executable file → Normal file
0
mongodb/use.md
Executable file → Normal file
0
ngrok/ngrok.md
Executable file → Normal file
0
nodejs/install.md
Executable file → Normal file
0
openstack/apt_download.sh
Executable file → Normal file
0
openstack/openstack_conf/compute/cinder/api-paste.ini
Executable file → Normal file
0
openstack/openstack_conf/compute/cinder/cinder.conf
Executable file → Normal file
0
openstack/openstack_conf/compute/cinder/logging.conf
Executable file → Normal file
0
openstack/openstack_conf/compute/cinder/rootwrap.conf
Executable file → Normal file
0
openstack/openstack_conf/compute/cinder/rootwrap.d/volume.filters
Executable file → Normal file
0
openstack/openstack_conf/compute/neutron/neutron.conf
Executable file → Normal file
0
openstack/openstack_conf/compute/nova/api-paste.ini
Executable file → Normal file
0
openstack/openstack_conf/compute/nova/logging.conf
Executable file → Normal file
0
openstack/openstack_conf/compute/nova/nova-compute.conf
Executable file → Normal file
0
openstack/openstack_conf/compute/nova/nova.conf
Executable file → Normal file
0
openstack/openstack_conf/compute/nova/rootwrap.conf
Executable file → Normal file
0
openstack/openstack_conf/compute/nova/rootwrap.d/compute.filters
Executable file → Normal file
0
openstack/openstack_conf/controller/keystone/credential-keys/0
Executable file → Normal file
0
openstack/openstack_conf/controller/keystone/credential-keys/1
Executable file → Normal file
0
openstack/openstack_conf/controller/keystone/fernet-keys/0
Executable file → Normal file
0
openstack/openstack_conf/controller/keystone/fernet-keys/1
Executable file → Normal file
0
openstack/openstack_conf/controller/neutron/neutron.conf
Executable file → Normal file
0
openstack/openstack_conf/controller/nova/api-paste.ini
Executable file → Normal file
0
openstack/openstack_conf/controller/nova/nova.conf
Executable file → Normal file
0
python/ReformFileName.py
Executable file → Normal file
0
python/command.md
Executable file → Normal file
0
python/pyqt.md
Executable file → Normal file
0
python/uncompyle2.md
Executable file → Normal file
0
python/virtualenv.md
Executable file → Normal file
0
rabbitmq/install.md
Executable file → Normal file
0
raspberry/main.md
Executable file → Normal file
0
raspberry/router.md
Executable file → Normal file
0
raspberry/sound.md
Executable file → Normal file
0
raspberry/wifi.md
Executable file → Normal file
0
redis/配置.md
Executable file → Normal file
0
static/img/iptables_examples_network_topology.png
Executable file → Normal file
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
0
static/img/iptables_frame.png
Executable file → Normal file
|
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 38 KiB |
0
static/img/ssh_key.png
Executable file → Normal file
|
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 50 KiB |
0
static/img/test.jpg
Executable file → Normal file
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
0
ubuntu/aria2.md
Executable file → Normal file
0
ubuntu/install_nginx.md
Executable file → Normal file
0
ubuntu/iptables.md
Executable file → Normal file
0
ubuntu/iptables设置端口转发.md
Executable file → Normal file
0
ubuntu/minicom.md
Executable file → Normal file
0
ubuntu/nmap.md
Executable file → Normal file
0
ubuntu/scp.md
Executable file → Normal file
0
ubuntu/screen.md
Executable file → Normal file
0
ubuntu/ubuntu_install_pyqt4.md
Executable file → Normal file
0
ubuntu/uget.md
Executable file → Normal file
0
ubuntu/update-alternatives.md
Executable file → Normal file
0
ubuntu/网络相关命令.md
Executable file → Normal file
66
vim/vimrc
@ -1,5 +1,7 @@
|
|||||||
" set the runtime path to include Vundle and initialize
|
" set the runtime path to include Vundle and initialize
|
||||||
set rtp+=~/.fzf/
|
set rtp+=~/.fzf/
|
||||||
|
set nocompatible
|
||||||
|
filetype off
|
||||||
set rtp+=~/.vim/bundle/Vundle.vim
|
set rtp+=~/.vim/bundle/Vundle.vim
|
||||||
call vundle#begin()
|
call vundle#begin()
|
||||||
|
|
||||||
@ -7,8 +9,8 @@ Plugin 'VundleVim/Vundle.vim'
|
|||||||
|
|
||||||
|
|
||||||
Plugin 'junegunn/fzf.vim'
|
Plugin 'junegunn/fzf.vim'
|
||||||
nmap <Leader>l :BLines
|
nmap <Leader>l :BLines
|
||||||
nmap <Leader>L :Lines
|
nmap <Leader>L :Lines
|
||||||
|
|
||||||
Plugin 'rking/ag.vim'
|
Plugin 'rking/ag.vim'
|
||||||
|
|
||||||
@ -66,34 +68,32 @@ Plugin 'https://github.com/tpope/vim-fugitive.git'
|
|||||||
Plugin 'airblade/vim-gitgutter'
|
Plugin 'airblade/vim-gitgutter'
|
||||||
set updatetime=100
|
set updatetime=100
|
||||||
|
|
||||||
Plugin 'https://github.com/plytophogy/vim-virtualenv.git'
|
"Plugin 'https://github.com/plytophogy/vim-virtualenv.git'
|
||||||
let g:virtualenv_directory = '~/.virtualenv'
|
"let g:virtualenv_directory = '~/.virtualenv'
|
||||||
|
|
||||||
Plugin 'godlygeek/tabular'
|
Plugin 'godlygeek/tabular'
|
||||||
Plugin 'plasticboy/vim-markdown'
|
Plugin 'plasticboy/vim-markdown'
|
||||||
Plugin 'suan/vim-instant-markdown'
|
"Plugin 'suan/vim-instant-markdown'
|
||||||
|
|
||||||
Plugin 'Valloric/YouCompleteMe'
|
Plugin 'Valloric/YouCompleteMe'
|
||||||
|
|
||||||
set runtimepath+=~/.vim/bundle/YouCompleteMe
|
set runtimepath+=~/.vim/bundle/YouCompleteMe
|
||||||
autocmd InsertLeave * if pumvisible() == 0|pclose|endif "离开插入模式后自动关闭预览窗口"
|
autocmd InsertLeave * if pumvisible() == 0|pclose|endif "离开插入模式后自动关闭预览窗口"
|
||||||
let g:ycm_collect_identifiers_from_tags_files = 1 " 开启 YCM基于标签引擎
|
let g:ycm_collect_identifiers_from_tags_files = 1 " 开启 YCM基于标签引擎
|
||||||
let g:ycm_collect_identifiers_from_comments_and_strings = 1 " 注释与字符串中的内容也用于补全
|
|
||||||
"let g:syntastic_ignore_files=[".*\.py$"]
|
"let g:syntastic_ignore_files=[".*\.py$"]
|
||||||
let g:ycm_seed_identifiers_with_syntax = 1 " 语法关键字补全
|
let g:ycm_seed_identifiers_with_syntax = 1 " 语法关键字补全
|
||||||
let g:ycm_complete_in_comments = 1
|
|
||||||
let g:ycm_confirm_extra_conf = 0 " 关闭加载.ycm_extra_conf.py提示
|
let g:ycm_confirm_extra_conf = 0 " 关闭加载.ycm_extra_conf.py提示
|
||||||
let g:ycm_key_list_select_completion = ['<c-n>', '<Down>'] " 映射按键,没有这个会拦截掉tab, 导致其他插件的tab不能用.
|
let g:ycm_key_list_select_completion = ['<c-n>', '<Down>'] " 映射按键,没有这个会拦截掉tab, 导致其他插件的tab不能用.
|
||||||
let g:ycm_key_list_previous_completion = ['<c-p>', '<Up>']
|
let g:ycm_key_list_previous_completion = ['<c-p>', '<Up>']
|
||||||
let g:ycm_complete_in_comments = 1 " 在注释输入中也能补全
|
let g:ycm_complete_in_comments = 1 " 在注释输入中也能补全
|
||||||
let g:ycm_complete_in_strings = 1 " 在字符串输入中也能补全
|
let g:ycm_complete_in_strings = 1 " 在字符串输入中也能补全
|
||||||
let g:ycm_collect_identifiers_from_comments_and_strings = 1 " 注释和字符串中的文字也会被收入补全
|
let g:ycm_collect_identifiers_from_comments_and_strings = 1 " 注释和字符串中的文字也会被收入补全
|
||||||
"let g:ycm_global_ycm_extra_conf='~/.vim/bundle/YouCompleteMe/third_party/ycmd/.ycm_extra_conf.py'
|
let g:ycm_global_ycm_extra_conf='~/.vim/bundle/YouCompleteMe/third_party/ycmd/.ycm_extra_conf.py'
|
||||||
let g:ycm_global_ycm_extra_conf='~/.vim/.ycm_extra_conf.py'
|
"let g:ycm_global_ycm_extra_conf='~/.vim/.ycm_extra_conf.py'
|
||||||
let g:ycm_show_diagnostics_ui = 0 " 禁用语法检查
|
let g:ycm_show_diagnostics_ui = 0 " 禁用语法检查
|
||||||
"inoremap <expr> <CR> pumvisible() ? "\<C-y>" : "\<CR>" " 回车即选中当前项
|
"inoremap <expr> <CR> pumvisible() ? "\<C-y>" : "\<CR>" " 回车即选中当前项
|
||||||
nnoremap <c-d> :YcmCompleter GoToDefinitionElseDeclaration<CR> " 跳转到定义处
|
nnoremap <c-d> :YcmCompleter GoToDefinitionElseDeclaration<CR> " 跳转到定义处
|
||||||
let g:ycm_min_num_of_chars_for_completion=2
|
let g:ycm_min_num_of_chars_for_completion=2
|
||||||
|
|
||||||
"python auto complete plugin
|
"python auto complete plugin
|
||||||
Bundle 'davidhalter/jedi-vim'
|
Bundle 'davidhalter/jedi-vim'
|
||||||
@ -109,6 +109,12 @@ let g:closetag_filenames = '*.html,*.xhtml,*.phtml,*.launch'
|
|||||||
Plugin 'jiangmiao/auto-pairs'
|
Plugin 'jiangmiao/auto-pairs'
|
||||||
|
|
||||||
|
|
||||||
|
Plugin 'Chiel92/vim-autoformat'
|
||||||
|
noremap <F6> :Autoformat<CR>:w<CR>
|
||||||
|
let g:autoformat_verbosemode=1
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Plugin 'vim-airline/vim-airline'
|
Plugin 'vim-airline/vim-airline'
|
||||||
Plugin 'vim-airline-themes'
|
Plugin 'vim-airline-themes'
|
||||||
let g:airline_theme='bubblegum'
|
let g:airline_theme='bubblegum'
|
||||||
@ -143,26 +149,26 @@ map <leader>8 :b 8<CR>
|
|||||||
map <leader>9 :b 9<CR>
|
map <leader>9 :b 9<CR>
|
||||||
map q :bwipeout<CR>
|
map q :bwipeout<CR>
|
||||||
|
|
||||||
nmap J 5j
|
nmap J 5j
|
||||||
nmap K 5k
|
nmap K 5k
|
||||||
nmap H 5h
|
nmap H 5h
|
||||||
nmap L 5l
|
nmap L 5l
|
||||||
|
|
||||||
nnoremap <c-h> <c-w>h
|
nnoremap <c-h> <c-w>h
|
||||||
nnoremap <c-l> <c-w>l
|
nnoremap <c-l> <c-w>l
|
||||||
nnoremap <c-j> <c-w>j
|
nnoremap <c-j> <c-w>j
|
||||||
nnoremap <c-k> <c-w>k
|
nnoremap <c-k> <c-w>k
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
" ctags 配置
|
" ctags 配置
|
||||||
map <F4> :!ctags -R --c++-kinds=+p --fields=+iaS --extra=+q --languages=Python,C++ -f .tags .<CR><CR>
|
map <F4> :!ctags -R --c++-kinds=+p --fields=+iaS --extra=+q --languages=Python,C++ -f .tags .<CR><CR>
|
||||||
imap <F4> <ESC>:!ctags -R --c++-kinds=+p --fields=+iaS --extra=+q --languages=Python,C++ -f .tags .<CR><CR>
|
imap <F4> <ESC>:!ctags -R --c++-kinds=+p --fields=+iaS --extra=+q --languages=Python,C++ -f .tags .<CR><CR>
|
||||||
set tags=tags
|
set tags=tags
|
||||||
set tags+=.tags
|
set tags+=.tags
|
||||||
set tags+=./.tags
|
set tags+=./.tags
|
||||||
"set tags+=~/.vim/systags
|
"set tags+=~/.vim/systags
|
||||||
"set tags =
|
"set tags =
|
||||||
|
|
||||||
Plugin 'https://github.com/majutsushi/tagbar.git'
|
Plugin 'https://github.com/majutsushi/tagbar.git'
|
||||||
"ctags 配置:F3快捷键显示程序中的各种tags,包括变量和函数等。
|
"ctags 配置:F3快捷键显示程序中的各种tags,包括变量和函数等。
|
||||||
@ -173,7 +179,7 @@ Plugin 'The-NERD-tree'
|
|||||||
let NERDTreeIgnore=['\.pyc','\~$','\.swp']
|
let NERDTreeIgnore=['\.pyc','\~$','\.swp']
|
||||||
"NERDTree 配置:F2快捷键显示当前目录树
|
"NERDTree 配置:F2快捷键显示当前目录树
|
||||||
map <F2> :NERDTreeToggle<CR>
|
map <F2> :NERDTreeToggle<CR>
|
||||||
let NERDTreeWinSize=25
|
let NERDTreeWinSize=25
|
||||||
Plugin 'tiagofumo/vim-nerdtree-syntax-highlight'
|
Plugin 'tiagofumo/vim-nerdtree-syntax-highlight'
|
||||||
Plugin 'Xuyuanp/nerdtree-git-plugin'
|
Plugin 'Xuyuanp/nerdtree-git-plugin'
|
||||||
"Plugin 'ryanoasis/vim-devicons'
|
"Plugin 'ryanoasis/vim-devicons'
|
||||||
@ -221,7 +227,7 @@ func! CompileRunGcc()
|
|||||||
exec '!g++ % -o %<'
|
exec '!g++ % -o %<'
|
||||||
exec '!time ./%<'
|
exec '!time ./%<'
|
||||||
elseif &filetype == 'cpp'
|
elseif &filetype == 'cpp'
|
||||||
exec '!g++ % -o %<'
|
exec '!g++ % -o %< -lboost_system'
|
||||||
exec '!time ./%<'
|
exec '!time ./%<'
|
||||||
elseif &filetype == 'python'
|
elseif &filetype == 'python'
|
||||||
exec '!time python %'
|
exec '!time python %'
|
||||||
@ -276,9 +282,9 @@ set nobackup
|
|||||||
set noswapfile
|
set noswapfile
|
||||||
"搜索忽略大小写
|
"搜索忽略大小写
|
||||||
set ignorecase
|
set ignorecase
|
||||||
" 搜索时忽略大小写,但在有一个或以上大写字母时仍大小写敏感
|
" 搜索时忽略大小写,但在有一个或以上大写字母时仍大小写敏感
|
||||||
set ignorecase
|
set ignorecase
|
||||||
set smartcase
|
set smartcase
|
||||||
|
|
||||||
|
|
||||||
"搜索逐字符高亮
|
"搜索逐字符高亮
|
||||||
@ -324,9 +330,9 @@ map <space>mc :set mouse=c<CR>:set nu!<CR>:set paste<CR>
|
|||||||
set mouse=a
|
set mouse=a
|
||||||
|
|
||||||
" 选中状态下 Ctrl+c 复制
|
" 选中状态下 Ctrl+c 复制
|
||||||
vnoremap <c-c> "+y
|
vnoremap <c-c> "+y
|
||||||
|
|
||||||
" Ctrl+v
|
" Ctrl+v
|
||||||
"nmap <silent> <C-v> "+p
|
"nmap <silent> <C-v> "+p
|
||||||
|
|
||||||
|
|
||||||
@ -345,7 +351,7 @@ set scrolloff=3
|
|||||||
" 为C程序提供自动缩进
|
" 为C程序提供自动缩进
|
||||||
set smartindent
|
set smartindent
|
||||||
" 高亮显示普通txt文件(需要txt.vim脚本)
|
" 高亮显示普通txt文件(需要txt.vim脚本)
|
||||||
au BufRead,BufNewFile * setfiletype txt
|
au BufRead,BufNewFile * setfiletype txt
|
||||||
filetype plugin indent on
|
filetype plugin indent on
|
||||||
"打开文件类型检测, 加了这句才可以用智能补全
|
"打开文件类型检测, 加了这句才可以用智能补全
|
||||||
set completeopt=longest,menu
|
set completeopt=longest,menu
|
||||||
@ -364,7 +370,7 @@ fun! CleanExtraSpaces()
|
|||||||
silent! %s/\s\+$//e
|
silent! %s/\s\+$//e
|
||||||
call setpos('.', save_cursor)
|
call setpos('.', save_cursor)
|
||||||
call setreg('/', old_query)
|
call setreg('/', old_query)
|
||||||
endfun
|
endfun
|
||||||
|
|
||||||
if has("autocmd")
|
if has("autocmd")
|
||||||
autocmd BufWritePre *.txt,*.js,*.py,*.wiki,*.sh,*.coffee,*.vue :call CleanExtraSpaces()
|
autocmd BufWritePre *.txt,*.js,*.py,*.wiki,*.sh,*.coffee,*.vue :call CleanExtraSpaces()
|
||||||
|
|||||||