LoginSignup
5
6

More than 5 years have passed since last update.

vim の80文字問題 on tmux

Posted at

1行でやるなら

.vimrc
set colorcolumn=80

80文字の箇所に赤いラインが表示されます。
ちょっとダサい。

もっとかっこよくやるなら

.vimrc
 let &colorcolumn=join(range(81,999),",")                                                                                                                                                                                         
 hi ColorColumn ctermbg=235 guibg=#2c2d27 

tmux 上で

colorcolumn の設定はそのままでは tmux 上で vim を起動した場合にうまく動きません。

.tmux.conf
set -g default-terminal "screen-256color" 
.vimrc
set term=screen-256color 
5
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
6