私はvimrcをどうやって壊したのか分かりませんが、私は持っています。私はソラリゼーションをインストールしましたが、シンタックスハイライトは自動的には機能しなくなりました。エディタを開くたびに「シンタックスイネーブル」を再入力する必要があります。"syntax enable"は、vimrcではなく、通常のモードでのみ動作します。
私のvimrcは以下の通りです。
" ----- BASICS -----
set nocompatible "compatible with vi
if !exists("g:syntax_on")
syntax enable
endif
filetype on "QS not sure about this one !
set number "add line numbers
set showcmd "show command in bottom bar
set cursorline "highlight cursor line
set wildmenu "commandline tab completion
set mouse=a "make vim useable with mouse
set backspace=indent,eol,start " make backspace work like in most editors.
set showmatch " highlight matching [{()}]
" ----- COLORSCHEME -----
let g:solarized_termcolors = 256
set background=light
colorscheme solarized
" ------ NAVIGATION -----
" long line navigation in normal mode
nnoremap j gj
nnoremap k gk
" ------ TABS & SPACES -----
set tabstop=4 "number of visual spaces per TAB
set shiftwidth=4 "size of indent with tab
set softtabstop=0
set noexpandtab "if you are using tab character inside your source
"code - these are defensive settings to avoid conversion
" ---------Searching ----------
set incsearch " search as characters are entered
set hlsearch " highlight matches
" ----------Folding -----------
set foldenable " enable folding
set foldlevelstart=10 " open most folds by default
set foldnestmax=10 " 10 nested fold max
nnoremap <space> za
"space open/closes folds
set foldmethod=indent " fold based on indent level
set smartindent " indents your code automatically
filetype off " required
256色をサポートするターミナルエミュレータを使用していますが、カスタムソラリゼーションターミナルカラーを使用したくないですか? –
':verbose set syntax'とは何ですか? –