• strict warning: Non-static method view::load() should not be called statically in /hermes/walnaweb12a/b57/moo.greydragoncom/nodsw/sites/all/modules/views/views.module on line 906.
  • strict warning: Declaration of views_handler_argument::init() should be compatible with views_handler::init(&$view, $options) in /hermes/walnaweb12a/b57/moo.greydragoncom/nodsw/sites/all/modules/views/handlers/views_handler_argument.inc on line 744.
  • strict warning: Declaration of views_handler_filter::options_validate() should be compatible with views_handler::options_validate($form, &$form_state) in /hermes/walnaweb12a/b57/moo.greydragoncom/nodsw/sites/all/modules/views/handlers/views_handler_filter.inc on line 607.
  • strict warning: Declaration of views_handler_filter::options_submit() should be compatible with views_handler::options_submit($form, &$form_state) in /hermes/walnaweb12a/b57/moo.greydragoncom/nodsw/sites/all/modules/views/handlers/views_handler_filter.inc on line 607.
  • strict warning: Declaration of views_handler_filter_boolean_operator::value_validate() should be compatible with views_handler_filter::value_validate($form, &$form_state) in /hermes/walnaweb12a/b57/moo.greydragoncom/nodsw/sites/all/modules/views/handlers/views_handler_filter_boolean_operator.inc on line 159.
Leeland's picture

I grew up using vi. Never got into emacs. Then along came vim. I ignored it of course. Then suddenly vi was gone and vim was quietly mapped to vi. Oh well, had to learn sometime.

== .vimrc ==
Almost all of my vim magic is embodied in my ~/.vimrc file.

au FileType * set tabstop=4|set shiftwidth=4|set noexpandtab
au FileType python set tabstop=4|set shiftwidth=4|set softtabstop=4|set expandtab
au FileType make setlocal noexpandtab|set softtabstop=4

" Make backspace a tad more friendly
set backspace=indent,eol,start

" "highlight" any tabs and all trailing spaces
map \l <Esc>:set list listchars=tab:»·,trail:·<CR>
map \L <Esc>:set nolist<CR>

" Programming "highlight" any tabs and all trailing spaces
map \p <Esc>:set number list listchars=tab:\\|_,trail:.<CR>
map \P <Esc>:set nonumber nolist<CR>

" That awful mixed mode with the half-tabs-are-spaces:
map \M <Esc>:set expandtab tabstop=8 softtabstop=4 shiftwidth=4<CR>

" Mini tabs, small "m":
map \m <Esc>:set noexpandtab tabstop=2 shiftwidth=2<CR>

" Think "little tabs" and "big tabs":
map \t <Esc>:set noexpandtab tabstop=4 shiftwidth=4<CR>
map \T <Esc>:set noexpandtab tabstop=8 shiftwidth=8<CR>

" Turn on and off line numbering
map \n <Esc>:set number<CR>
map \N <Esc>:set nonumber<CR>

" Working with split files ( :sp name-of-another-file-to-edit )
" move to the file in the split above my current window,
" I was typing Ctrl-W, Up (move up a window) Ctrl-W, _ (maximize the menu).
" That's four keystrokes (more if you count Ctrl and Shift), and they are
" all over the keyboard. To help avoid this problem, I created this mapping:
map <C-J> <C-W>j<C-W>_
map <C-K> <C-W>k<C-W>_

" By default, Vim displays the current line of each minimized file, which
" (to me) isn't much help and takes up too much screen real estate. So I use
" this line to change that to no lines:
set wmh=0

" One may also do the dual thing for vertical splits/window changes:
set wmw=0
nmap <c-h> <c-w>h<c-w><bar>
nmap <c-l> <c-w>l<c-w><bar>

" remap the color scheme by hitting f4 and wrapping
nnoremap <f4> :exec "colorscheme ".substitute(substitute(expand($VIMRUNTIME."/colors/*.vim"),'.*[/\\]'.colors_name.'\.vim\c[[:cntrl:]]*[^[:cntrl:]]*[/\\]\([^.]*\).*','\1', 'g'),'[^[:cntrl:]]*[/\\]\([^.]*\).vim\c.*','\1','')<CR><CR>
nnoremap <F5> :echo g:colors_name<CR>
colorscheme desert

Thread Slivers eBook at Amazon