そこで、StackOverflow でこのソリューションを見つけました: Vim 80 列レイアウトの問題
ファイルに長い行を入力する場合、80 文字の制限を超える文字を強調表示したいと思います。多くの人はこの解決策がうまくいくと考えているようですが、私は vimrc ファイルにそれを入れており、何も変わっていないかのように動作します。長い行が強調表示されません。
highlight OverLength ctermbg=red ctermfg=white guibg=#592929
match OverLength /\%81v.\+/
参考までに、ここに私の全体.vimrc
を示しますが、それほど長くはありません。
" You'll need to add the following to your ~/.vimrc so that pathogen will be loaded
" properly. Filetype detection must be off when you run the commands so its best to
" You'll need to add the following to your ~/.vimrc so that pathogen will be loaded
" execute them first:
"filetype off
call pathogen#runtime_append_all_bundles()
call pathogen#helptags()
"filetype on
syntax on
let mapleader = ","
let g:CommandTMaxHeight=25
imap ii <Esc>
map <S-Enter> O<Esc>
map <CR> o<Esc>
set guioptions-=T
set guioptions-=r
set hlsearch
highlight OverLength ctermbg=red ctermfg=white guibg=#592929
match OverLength /\%79v.\+/
set nocompatible
set ruler
set number
set shellcmdflag=-ic
set list
set expandtab
set tabstop=4
set softtabstop=4
nmap <C-k> ddkP
nmap <C-j> ddp
vmap <C-k> xkP`[V`]
vmap <C-j> xp`[V`]
au! BufWritePost vimrc source %
colorscheme vividchalk