0

我是 linux 新手,尤其是 vim。我正在尝试设置我的第一个 .vimrc 文件进行编程。我很难与航空公司设置适当的状态线。我输入的值不会改变行,我不知道问题所在。我搜索并评论了一些代码以找到我的错误但没有成功。有人有想法吗?

这是我的 .vimrc 文件:

syntax on

call plug#begin('~/.vim/plugged')

Plug 'morhetz/gruvbox'
Plug 'preservim/nerdtree'
Plug 'vim-syntastic/syntastic'
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'preservim/nerdcommenter'
Plug 'ycm-core/YouCompleteMe'
Plug 'tpope/vim-commentary'
Plug 'frazrepo/vim-rainbow'
Plug 'jiangmiao/auto-pairs'

call plug#end()

"Tabulation
set tabstop=4 
set softtabstop=4
set shiftwidth=4 
set expandtab
set smartindent
set wrap

"Recherche
set ignorecase
set smartcase
set incsearch
set hlsearch

"Sauvegarde
set noswapfile
set nobackup
set undodir=~/.vim/undodir
set undofile

"Interface
set number
set cursorline
set cursorcolumn
set title
set showmode
set showcmd
set showmatch
set signcolumn=yes
set colorcolumn=80
set relativenumber

"Système
set mouse=a
set confirm
set scrolloff=15
set nocompatible
set encoding=utf-8
set nospell 
set spelllang=fr

"Airline
set laststatus=2
set statusline=
set statusline+=%f
set statusline+=%=
set statusline+=%l
set statusline+=/ 
set statusline+=%L  
set statusline+=%n
let g:airline#extensions#tabline#enabled = 1

"Couleurs de vim.
set background=dark
set t_Co=256
colorscheme gruvbox
highlight Normal guibg=NONE ctermbg=NONE
let g:airline_theme='dark'
let g:airline_powerline_fonts = 1

"NERDTree

"Cache le menu d'aide.
let NERDTreeMinimalUI=1

"Ouverture automatique.
autocmd VimEnter * NERDTree

"Actualise lors d'un changement dans la structure de fichiers.
autocmd BufEnter NERD_tree* | execute 'normal R'
au CursorHold * if exists("t:NerdTreeBufName") | call <SNR>15_refreshRoot() | endif

"Actualise lors d'un changement dans le répertoire.
augroup DIRCHANGE
    au!
    autocmd DirChanged global :NERDTreeCWD
augroup END

"Fermeture automatique.
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif 

"Couleurs et surlignement pour les erreurs d'orthographe.
hi SpellBad cterm=underline ctermfg=203 guifg=#ff5f5f
hi SpellLocal cterm=underline ctermfg=203 guifg=#ff5f5f
hi SpellRare cterm=underline ctermfg=203 guifg=#ff5f5f
hi SpellCap cterm=underline ctermfg=203 guifg=#ff5f5f
4

0 回答 0