/home/wpollock1/public_html/restricted/ShellScripting/dot.vimrc.txt

" ~/.vimrc file of Wayne Pollock

set backspace=indent,eol,start   " allows backspacing over everything
set softtabstop=3     " sets soft tab stops every 3 columns
set expandtab         " convert all tabs to spaces
set shiftwidth=3      " hitting tab indents 3 columns
set autoindent        " indent new line to same as previous
if &term == "xterm"   " Default is to use light background, so with PuTTY
   set bg=dark        " use a color scheme appropriate for black background
endif                 " Note in vim71 this must go in the file:
                      "     ~/.vim/after/syntax/syntax.vim

if &term == "cygwin"  " Use dark background on Windows
   set bg=dark
endif

set laststatus=2      " always show status bar
set ruler             " show cursor position in status bar
set showcmd           " shows partial commands (e.g., "dd") in status bar
set ignorecase        " ignore case when searching
set nohlsearch        " don't highlight search matches
set incsearch         " use incremental searching
set syntax=enable     " use color syntax highlighting
set nrformats=        " treat numbers as decimal, even with leading zero
"set list listchars=trail:\xb7   " display trailing spaces on a line

" This is a commonly used action: to wrap WORD in <abbr>WORD</abbr> tags,
" as long as the cursor is placed anywhere within WORD:
map <F2> ciw<abbr><C-R>"</abbr><Esc>
" The same, but works in input mode:
imap <F2> <Esc>ciw<abbr><C-R>"</abbr>

" Search and replace word under cursor using F4
nnoremap <F4> :%s/<c-r><c-w>/<c-r><c-w>/gc<c-f>$F/i

if has("multi_byte")
  if &termencoding == ""
    let &termencoding = &encoding   " Set keyboard encoding to current locale
  endif
  set encoding=utf-8  nobomb        " Set encoding to UTF-8, no byte-order mark
  setglobal fileencoding=utf-8 nobomb
  set fileencodings=ucs-bom,utf-8,latin1
endif

" Removes trailing spaces when saving (writing) a file:
"autocmd BufWritePre * :%s/[    ]*$//e