vim
Categories:

To find the next line in a file that does not contain a string:

/^\%(\%(STRING\)\@!.\)*$

Join every other line in a file:

:%normal Jj

Delete every line in a file that contains a string:

:g/string/d

Delete lines in a file that contain this or that string:

:g/this\|that/d

Delete lines in a file that do not contain a string:

:g!/string/d
Categories:

This is mainly for gvim on Windows.


" Brian's vimrc file

set nocompatible
behave xterm
set selectmode=mouse
set co=90
set lines=40
syntax enable

set guifont=dejavu_sans_mono:h8
" set guifont=lucida_console:h9
" set guifont=courier_new:h10

set guioptions=agimr

" cursor options, namely, turn off blinking
set guicursor=n-v-c:block-Cursor/lCursor,ve:ver35-Cursor,o:hor50-Cursor,i-ci:ver25-Cursor/lCursor,r-cr:hor20-Cursor/lCursor,sm:block-Cursor,a:blinkon0

" print options
set printoptions=header:0,paper:letter

set ru

set autoindent
""set smartindent
""Don't outdent # comments when smartindent is enabled
""inoremap # X#
filetype indent plugin on

set ffs=dos,unix
set dir=c:\\windows\\temp\\\\
set mousehide
set slm=cmd

" Searching options