" split screens map s_ " split window into Two windows map j_ " Jump to next window map k_ " go to Previous window map j_ " Jump to and max size next window map k_ " go to and max size previous window set splitbelow " open new split windows below the current one " general editing set showmode " show when in insert mode set showmatch " matching parenthesis pairs set noerrorbells " bells are annoying set ignorecase " for seaching set incsearch " display matches as search text entered set ruler " display line and column number set backspace=indent,eol,start " can backup past (maily go back a line) "make a mapping for "Q" which will reformat the current paragraph, comment, "or code block according to the formatoptions setting: map Q gqap " Tab stuff set shiftwidth=4 set tabstop=4 set smarttab "redunant with tabstop and shiftwidth the same set expandtab set softtabstop=4 "DEL and Backspace delete to a tabstop " Line Formating stuff set textwidth=79 " Maximum line length set wrap " wrap long lines - display only set wm=4 " insert new lines on wrap "set wmh=0 " Appearance stuff colorscheme desert " morning not bad either " set guifont=Lucida_Console:h13 " set gvim font on Windows set guifont=Monospace\ 13 " set gvim font on Linux " syntax and highlighting - file type specific syntax on :filetype plugin indent on set autoindent " easy indentation in visual mode " This keeps the visual selection active after indenting. " Usually the visual selection is lost after you indent it. vmap > >gv vmap < 79v/ :match rMargin /.\%>79v.\+/ :au WinEnter,BufNewFile * match rMargin /\%>79v.\+/ "additions with Python in mind... set shiftround " align to standard indent when shifting with < and > set formatoptions+=r " auto-format comments while typing set commentstring=\ #\ %s let python_highlight_all = 1 "set foldmethod=manual " use code block selection, zf to fold, zo to unfold " set encoding=utf-8 " Not certain about this yet -- test it. " Based on VIM tip 102: automatic tab completion of keywords function InsertTabWrapper(dir) let col = col('.') - 1 if !col || getline('.')[col - 1] !~ '\k' return "\" elseif "back" == a:dir return "\" else return "\" endif endfunction inoremap =InsertTabWrapper("fwd") inoremap =InsertTabWrapper("back")