"----------------- Configuration file for vim----------------------- set modelines=0 " CVE-2007-2438
" Normally we use vim-extensions. If you want true vi-compatibility " remove change the following statements set nocompatible " Use Vim defaults instead of 100% vi compatibility set backspace=2 " more powerful backspacing
" Don't write backup file if vim is being called by "crontab -e" au BufWrite /private/tmp/crontab.* set nowritebackup nobackup " Don't write backup file if vim is being called by "chpass" au BufWrite /private/etc/pw.* set nowritebackup nobackup let skip_defaults_vim=1 " 设置外观 ------------------------------------- colorscheme molokai " 设定配色方案 set number "显示行号 set showtabline=0 "隐藏顶部标签栏" set guioptions-=r "隐藏右侧滚动条" set guioptions-=L "隐藏左侧滚动条" set guioptions-=b "隐藏底部滚动条" "set cursorline "突出显示当前行" "set cursorcolumn "突出显示当前列" set langmenu=zh_CN.UTF-8 "显示中文菜单 " 变成辅助 ------------------------------------- syntax on "开启语法高亮 "set nowrap 设置代码不折行" set fileformat=unix "设置以unix的格式保存文件" " set cindent "设置C样式的缩进格式" set tabstop=4 "一个 tab 显示出来是多少个空格,默认 8 set shiftwidth=4 "每一级缩进是多少个空格 set backspace+=indent,eol,start "set backspace&可以对其重置 set showmatch "显示匹配的括号" set scrolloff=5 "距离顶部和底部5行" set laststatus=2 "命令行为两行" " 其他杂项 ------------------------------------- set mouse=a "启用鼠标" set selection=exclusive set selectmode=mouse,key set matchtime=5 set ignorecase "忽略大小写" set incsearch set hlsearch "高亮搜索项" set noexpandtab "不允许扩展table" set whichwrap=b,s,h,l,[,],<,> set autoread set nocompatible " be iMproved, required filetype off " required "启用vundle来管理vim插件 set rtp+=~/.vim/bundle/Vundle.vim call vundle#begin() " 安装插件写在这之后 "Plugin 'Valloric/YouCompleteMe' Plugin 'jiangmiao/auto-pairs' Plugin 'frazrepo/vim-rainbow' Plugin 'itchyny/lightline.vim' Plugin 'VundleVim/Vundle.vim' "安装插件写在这之前 call vundle#end() " required "filetype plugin on " required " 常用命令 " :PluginList - 查看已经安装的插件 " :PluginInstall - 安装插件 " :PluginUpdate - 更新插件 " :PluginSearch - 搜索插件 " :PluginClean - 删除插件,把安装插件对应行删除,然后执行这个命令即可 " h: vundle - 获取帮助 let g:rainbow_active = 1 " YouCompleteMe set runtimepath+=~/.vim/bundle/YouCompleteMe 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:ycm_seed_identifiers_with_syntax = 1 " 语法关键字补全 let g:ycm_complete_in_comments = 1 let g:ycm_confirm_extra_conf = 0 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_complete_in_comments = 1 " 在注释输入中也能补全 let g:ycm_complete_in_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/cpp/ycm/.ycm_extra_conf.py' let g:ycm_show_diagnostics_ui = 0 " 禁用语法检查 inoremap <expr> <CR> pumvisible() ? "\<C-y>" : "\<CR>" | " 回车即选中当前项 nnoremap <c-j> :YcmCompleter GoToDefinitionElseDeclaration<CR>| " 跳转到定义处 let g:ycm_min_num_of_chars_for_completion=2 " 从第2个键入字符就开始罗列匹配项 noremap <c-z> <NOP> " 换行的时候可以自动跳到下一行 imap {<CR> {<CR>}<ESC>O let g:ycm_semantic_triggers = { \ 'c,cpp,python,java,go,erlang,perl': ['re!\w{2}'], \ 'cs,lua,javascript': ['re!\w{2}'], \ } let g:ycm_filetype_whitelist = { \ "c":1, \ "cpp":1, \ "objc":1, \ "sh":1, \ "zsh":1, \ "zimbu":1, \ } "对话框的颜色修改为灰色 highlight PMenu ctermfg=0 ctermbg=242 guifg=black guibg=darkgrey highlight PMenuSel ctermfg=242 ctermbg=8 guifg=darkgrey guibg=black "关闭YCM 自动弹出函数原型预览窗口 set completeopt=menu,menuone let g:ycm_add_preview_to_completeopt = 0 set t_Co=256 "set clipboard^=unnamed,unnamedplus set termencoding=utf-8 set encoding=utf8 "set fileencodings=utf8,ucs-bom,gbk,cp936,gb2312,gb1803
然后输入:wq保存退出.
1 2 3 4
vim ~/.vimrc :PluginInstall 等待安装Done完成 然后:q然后:q就整完了.
整个好用的SHELL
安装 zsh
如果想快速搞(不想配置)的话,直接用Fish
一条命令即可: apt install fish && chsh -s /usr/bin/fish # fish设置为默认shell,
git clone --depth=1 --recurse-submodules -j8 https://github.com/google/ngx_brotli cd ngx_brotli/deps/brotli mkdir out && cd out cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DCMAKE_C_FLAGS="-Ofast -march=native -mtune=native -flto -funroll-loops -ffunction-sections -fdata-sections -Wl,--gc-sections" -DCMAKE_CXX_FLAGS="-Ofast -march=native -mtune=native -flto -funroll-loops -ffunction-sections -fdata-sections -Wl,--gc-sections" -DCMAKE_INSTALL_PREFIX=./installed .. cmake --build . --config Release --target brotlienc cd ../../../..
git clone -b master --depth=1 https://github.com/openssl/openssl.git cd openssl ./Configure --prefix=/usr/src/openssl --openssldir=/usr/src/openssl make install cd ..