安装部署
MacOS安装RabbitMQ
API网关部署
Centos安装Chrome浏览器
gitlab
gitlab-cicd
gitlab-runner安装配置
Gitlab-CICD实践篇
gitlab维护
gitlab备份-异地恢复-升级
gitlab从13.10.2升级至14.4.1出现的问题
Let's Encrypt
Let's Encrypt 申请证书
certbot发起web认证请求流程
安装CMDBUILD
vim配置
keepalived
配置样例
wine tips
supervisord
kafka
zookeeper
minio
django
jupyter
supervisor管理的kafka zookeeper集群部署
dnsmasq
apisix
APISIX结合skywalking对各个服务的访问情况进行监控
APISIX通过consul动态发现服务
Grafana Labs
Loki(stack)
etcd
redis
mongodb
mongodb添加仲裁节点
consul
sqlite更新升級
openssl安裝升級
emby
inotify-tools
caddy
caddy规则
ohmyzsh tips
debian-nvidia-container-runtime
openwrt+802.1x+freeradius+casdoor
本文档使用 MrDoc 发布
-
+
首页
vim配置
# vim配置 - 全局: /etc/vimrc - 个人:~/.vimrc ## 配置 vimrc使用双引号`"`开头为注释 使用前需要安装vim-plug ``` curl -fLo ~/.vim/autoload/plug.vim --create-dirs \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim ``` ``` " 修改颜色,深蓝色太难看清 hi CursorLine cterm=none ctermbg=234 ctermfg=green guibg=black hi CursorColumn cterm=none ctermbg=234 ctermfg=none guibg=black hi commit cterm=none ctermbg=black ctermfg=63 " 修改tab输入,将缩进符号更换为4个空格 set ts=4 set expandtab set autoindent " 增加十字定位 cuc:列,cul:行 " set cuc cul " 编辑yaml文件时tab输入两个空格 autocmd FileType yaml setlocal sw=2 ts=2 et ai " 禁用自动注释 set paste " 设置查询高亮 set hlsearch " 设置忽略大小写查询 " set ic set ruler " An example for a vimrc file. " " Maintainer: Bram Moolenaar <Bram@vim.org> " Last change: 2014 Nov 05 " " To use it, copy it to " for Unix and OS/2: ~/.vimrc " for Amiga: s:.vimrc " for MS-DOS and Win32: $VIM\_vimrc " for OpenVMS: sys$login:.vimrc " When started as "evim", evim.vim will already have done these settings. if v:progname =~? "evim" finish endif " Use Vim settings, rather than Vi settings (much better!). " This must be first, because it changes other options as a side effect. set nocompatible " allow backspacing over everything in insert mode set backspace=indent,eol,start if has("vms") set nobackup " do not keep a backup file, use versions instead else set backup " keep a backup file (restore to previous version) set undofile " keep an undo file (undo changes after closing) endif set history=50 " keep 50 lines of command line history set ruler " show the cursor position all the time set showcmd " display incomplete commands set incsearch " do incremental searching " For Win32 GUI: remove 't' flag from 'guioptions': no tearoff menu entries " let &guioptions = substitute(&guioptions, "t", "", "g") " Don't use Ex mode, use Q for formatting map Q gq " CTRL-U in insert mode deletes a lot. Use CTRL-G u to first break undo, " so that you can undo CTRL-U after inserting a line break. inoremap <C-U> <C-G>u<C-U> " In many terminal emulators the mouse works just fine, thus enable it. if has('mouse') set mouse= endif " Switch syntax highlighting on, when the terminal has colors " Also switch on highlighting the last used search pattern. if &t_Co > 2 || has("gui_running") syntax on set hlsearch endif " Only do this part when compiled with support for autocommands. if has("autocmd") " Enable file type detection. " Use the default filetype settings, so that mail gets 'tw' set to 72, " 'cindent' is on in C files, etc. " Also load indent files, to automatically do language-dependent indenting. filetype plugin indent on " Put these in an autocmd group, so that we can delete them easily. augroup vimrcEx au! " For all text files set 'textwidth' to 78 characters. autocmd FileType text setlocal textwidth=78 " When editing a file, always jump to the last known cursor position. " Don't do it when the position is invalid or when inside an event handler " (happens when dropping a file on gvim). " Also don't do it when the mark is in the first line, that is the default " position when opening a file. autocmd BufReadPost * \ if line("'\"") > 1 && line("'\"") <= line("$") | \ exe "normal! g`\"" | \ endif augroup END else set autoindent " always set autoindenting on endif " has("autocmd") " Convenient command to see the difference between the current buffer and the " file it was loaded from, thus the changes you made. " Only define it when not defined already. if !exists(":DiffOrig") command DiffOrig vert new | set bt=nofile | r ++edit # | 0d_ | diffthis \ | wincmd p | diffthis endif if has('langmap') && exists('+langnoremap') " Prevent that the langmap option applies to characters that result from a " mapping. If unset (default), this may break plugins (but it's backward " compatible). set langnoremap endif call plug#begin() Plug 'junegunn/vim-easy-align' Plug 'preservim/nerdtree' Plug 'Yggdroot/LeaderF', { 'do': './install.sh' } Plug 'vim-airline/vim-airline' Plug 'vim-airline/vim-airline-themes' Plug 'luochen1990/rainbow' Plug 'iamcco/mathjax-support-for-mkdp' Plug 'iamcco/markdown-preview.vim' "********************************前端插件:react,html等*******************************" Plug 'pangloss/vim-javascript' Plug 'leafgarland/typescript-vim' Plug 'peitalin/vim-jsx-typescript' Plug 'styled-components/vim-styled-components', { 'branch': 'main' } Plug 'jparise/vim-graphql' call plug#end() " start markdown nmap <silent> <F8> <Plug>MarkdownPreview " for normal mode imap <silent> <F8> <Plug>MarkdownPreview " for insert mode nmap <silent> <F9> <Plug>StopMarkdownPreview " for normal mode imap <silent> <F9> <Plug>StopMarkdownPreview " for insert mode " end makrdown let g:rainbow_active = 1 " vim-airline set laststatus=2 "永远显示状态栏 let g:airline_powerline_fonts = 1 " 支持 powerline 字体 let g:airline#extensions#tabline#enabled = 1 " 显示窗口tab和buffer " let g:airline_theme='molokai' " murmur配色不错 if !exists('g:airline_symbols') let g:airline_symbols = {} endif let g:airline_left_sep = '▶' let g:airline_left_alt_sep = '❯' let g:airline_right_sep = '◀' let g:airline_right_alt_sep = '❮' let g:airline_symbols.linenr = '¶' let g:airline_symbols.branch = '⎇' " end vim-airline ```
zhangky
2023年2月25日 10:20
分享文档
收藏文档
上一篇
下一篇
微信扫一扫
复制链接
手机扫一扫进行分享
复制链接
关于 MrDoc
觅思文档MrDoc
是
州的先生
开发并开源的在线文档系统,其适合作为个人和小型团队的云笔记、文档和知识库管理工具。
如果觅思文档给你或你的团队带来了帮助,欢迎对作者进行一些打赏捐助,这将有力支持作者持续投入精力更新和维护觅思文档,感谢你的捐助!
>>>捐助鸣谢列表
微信
支付宝
QQ
PayPal
Markdown文件
分享
链接
类型
密码
更新密码