Showing posts with label screenrc. Show all posts
Showing posts with label screenrc. Show all posts

Tuesday, April 22, 2008

Gene's .vimrc and .screenrc

"What're you using for .vimrc and .screenrc?"

Then email:

filetype indent on
filetype plugin on
colorscheme evening
"colorscheme default
source ~/.vim/WordLength.vim
syntax on
set mouse=a
set printoptions=paper:letter,duplex:off,collate:n,syntax:n
set tags=~/.tags
set tabstop=3
set shiftwidth=3
set textwidth=75
set autoindent
set noignorecase
set nobackup
set noexpandtab
set clipboard=unnamed
set grepprg=grep\ -nH\ $*
set foldmethod=indent

WordLength.vim is a script Gene put together when editing a ton of SQL with fieldnames absolutely limited to 18 characters.

function! WordLength()
let saveLine = line(".")
let savePos = col(".")
execute "normal b"
let startPos = col(".")
execute "normal e"
let endPos = col(".")

if (savePos < endPos) && (savePos > startPos)
let leftCount = endPos-savePos
execute "normal " . leftCount . "h"
elseif savePos == startPos
execute "normal b"
endif

return endPos-startPos+1
endfunction
command! Wl echo WordLength()
nmap ^C :Wl^M

And in python:

set expandtab
set wrap
set textwidth=80
set wrapmargin=1

And .screenrc:

hardstatus alwayslastline "[%n: %t]%? [%u]%? %h"
vbell on
multiuser on
acladd root