I've this in my vimrc
let g:currentmode={
\ 'n' : 'NORMAL ',
\ 'v' : 'VISUAL ',
\ 'V' : 'V·Line ',
\ '^V' : 'V·Block ',
\ 'i' : 'INSERT ',
\ 'R' : 'REPLACE ',
\ 'c' : 'COMMAND ',
\ 't' : 'TERM '
\}
set statusline=
\%{toupper(g:currentmode[mode()])}
\\ %{&filetype!=#''?&filetype:'none'}
\\ \ %{&fileformat==#'unix'?'U':&fileformat==#'dos'?'D':'N'}
\:%{&readonly\|\|!&modifiable?&modified?'%*':'%%':&modified?'**':'--'}
\\ \ %{expand('%:~:.')!=#''?expand('%:~:.'):'[No\ Name]'}
\%=\ %3p%%\ \ %l:\ %3c
The character that you see as the key in the currentmode dictionary for the value V.Block
is something I inserted by pressing <C-v><C-v
, but here it shows up as a box, so I changed it into ^V
for the sake of visibility here in the forum. I don't want a keyword like that in my vimrc, is there any way I can change it into something like <C-v>
? I've tried \<C-v>
, and <C-v>
, doesn't work either of these.