vim设置与使用
我的vim自定义配置
- ~/.vim/vimrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96" 自定义快捷键
let mapleader=","
nnoremap <leader>q :q<CR>
nnoremap <leader>wq :wq<CR>
nnoremap <leader>nq :q!<CR>
" 基于文件扩展名或内容的文件类型检测
filetype on
" 语法高亮
syntax enable
" 行号
set number
" 缩进
set autoindent
set cindent
set tabstop=4
set shiftwidth=4
set softtabstop=4
set smarttab
"tab键使用空格缩进
set expandtab
" 配色方案light或dark
set background=dark
let g:solarized_termcolors=256
"let g:molokai_original=1
"let g:rehash256=1
colorscheme solarized
" 禁止生成缓存文件
set noswapfile
set nobackup
set nowb
"禁止错误提示声
set noeb
" 查找
set hlsearch
set ignorecase
" 命令行行数
set cmdheight=1
" 状态栏
set laststatus=2
" 突出显示
set cursorline
set cursorcolumn
" 显示特殊字符
"set list
"制表符设置
"set lcs=tab:\:\
" 显示光标位置
set ruler
" 鼠标设置
set mouse=i
" 插件管理vim-plug
call plug#begin('~/.vim/plugged')
Plug 'Yggdroot/indentLine'
Plug 'preservim/nerdtree', { 'on': 'NERDTreeToggle' }
Plug 'preservim/tagbar'
" cc注释,ci反转,cA行尾注释,cu取消注释
Plug 'preservim/nerdcommenter'
Plug 'itchyny/lightline.vim'
Plug 'luochen1990/rainbow'
call plug#end()
"""" 插件-indentline
" indentline设置
" 显示隐藏颜色
"let g:indentLine_setColors = 0
" 缩进字符|¦┆┊
let g:indentLine_char = '¦'
" 启用原来的隐藏设置
"let g:indentLine_setConceal = 0
"消除对json和markdown影响
let g:vim_json_conceal=0
let g:markdown_syntax_conceal=0
"rainbow
let g:rainbow_active=0
""""
常用拾记
| 操作 | 注释 |
|---|---|
| 1 | 2 |
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 xyl的blog!
评论


