vim编辑器的配置文件vimrc的参数优化
zhe这里主要参考了一篇大神的文章,但是在复制该文章中代码时发生了一些错误:
- 里面的引号不是注释的意思,vim识别不了报错
- 里面的中文vim识别不了报错。
原文链接:https://blog.csdn.net/xiezuoyong/article/details/78113355
这里就以上问题做了些修改,从而方便大家直接复制粘贴使用。
set nocompatible
set history=100
filetype on
filetype plugin on
filetype indent on
set autoread
set mouse=a
syntax enable
set guifont=dejaVu\ Sans\ MONO\ 10
colorscheme desert
set cursorline
hi cursorline guibg=#00ff00
hi CursoColumn guibg=#00ff00
set foldenable
set foldmethod=manual
set foldcolumn=0
setlocal foldlevel=3
set foldclose=all
nnoremap <space> @=((foldclosed(line('.')) < 0) ? 'zc' : 'zo')<CR>
set expandtab
set tabstop=4
set shiftwidth=4
set softtabstop=4
set smarttab
set ai
set si
set wrap
set sw=4
set wildmenu
set ruler
set cmdheight=1
set nu
set lz
set backspace=eol,start,indent
set whichwrap+=<,>,h,l
set magic
set noerrorbells
set novisualbell
set showmatch
set mat=2
set hlsearch
set ignorecase
set encoding=utf-8
set fileencodings=utf-8
set termencoding=utf-8
set smartindent
set cin
set showmatch
set guioptions-=T
set guioptions-=m
set vb t_vb=
set laststatus=2
set pastetoggle=<F9>
set background=dark
highlight Search ctermbg=black ctermfg=white guifg=white guibg=black