From 56886ec5c16fdfe6f04bc7b2d092f1ed54d30950 Mon Sep 17 00:00:00 2001 From: Tony Duckles Date: Sat, 5 Jan 2013 12:30:24 -0600 Subject: [PATCH] .vimrc: statusline tweaks --- .vimrc | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/.vimrc b/.vimrc index ebe4219..a607e8d 100644 --- a/.vimrc +++ b/.vimrc @@ -114,9 +114,17 @@ set laststatus=2 " always show the status line set ignorecase " ignore case when searching set smartcase " case-sensitive if search contains an uppercase character set visualbell " shut the heck up -set statusline=%n\ %<%f\ %h%m%r%y\ \ %{strlen(&fenc)?&fenc:&enc},%{&ff} -set statusline+=%= -set statusline+=\(%b\ 0x%B)\ \ \ %-16.(%c,%l/%L%)\ %P + +" ---------------------------------------------------------------------------- +" Status Line +" ---------------------------------------------------------------------------- + +set statusline=\ %n\ %<%f " buffer #, filename +set statusline+=\ %h%m%r " file-state flags +set statusline+=%= " left-right divider +set statusline+=[%{strlen(&fenc)?&fenc:&enc},%{&ff}]%y " file-encoding, format, type +set statusline+=\ %12.(\(%b\ 0x%B)%) " selected char ASCII dec+hex +set statusline+=\ \ %12.(%c,%l/%L%)\ \ %-4P " cursor position, viewport percentage " ---------------------------------------------------------------------------- " Text Formatting @@ -131,7 +139,7 @@ set tabstop=4 set expandtab " expand tabs to spaces set nosmarttab " screw tabs set formatoptions+=n " support for numbered/bullet lists -"set textwidth=110 " wrap at 110 chars by default +set textwidth=0 " no line-wrapping by default set virtualedit=block " allow virtual edit in visual block .. " ---------------------------------------------------------------------------- @@ -212,13 +220,6 @@ nmap L mQgewvu`Q " cd to the directory containing the file in the buffer nmap cd :lcd %:h -" edit file in same directoy as current file (http://vimcasts.org/e/14) -" 'ew' = edit file in same directory as current file; 'es'/'ev','et' = open in split/vert-split/tab -nmap ew :e =expand('%:h').'/' -nmap es :sp =expand('%:h').'/' -nmap ev :vsp =expand('%:h').'/' -nmap et :tabe =expand('%:h').'/' - " set text wrapping toggles nmap tw :set invwrap:set wrap? -- 2.47.1