" " General Setup " " $Id$ set nocompatible " Use Vim defaults (much better!) set backspace=indent,eol,start " allow backspacing over everything set textwidth=0 set backup set viminfo='20,\"50,f10 set history=50 set nohlsearch set nostartofline " set paste " set autochdir set ruler set cmdheight=1 set laststatus=2 " PYTHON GOODIES set tabstop=4 set shiftwidth=4 set smarttab set expandtab set softtabstop=4 " set autoindent " set smartindent " Highlightinh in python: let python_highlight_numbers = 1 let python_highlight_builtins = 1 let python_highlight_exceptions = 1 let python_highlight_space_errors = 1 " END PYTHON GOODIES set nofoldenable set background=dark set title set browsedir=buffer " set autochdir set cpoptions=aAcF$ set modeline set modelines=1 set encoding=utf-8 set listchars=tab:->,trail:.,eol:$ set smartcase set errorbells " set visualbell set showcmd " Show (partial) command in status line. set showmatch " Show matching brackets. set ignorecase " Do case insensitive matching set incsearch " Incremental search set autowrite " Automatically save before commands like :next and :make " set statusline=%<%f\ %H%m%r%=%-14.(%l,%c%)\ %P\ Buf.%n set showtabline=0 set backupcopy=yes set fileformats=unix,mac,dos set fileformat=unix set mouse=a set printfont=Monaco:h14 colorscheme wombat256 " """"""""" " User Info " """"""""" " PLEASE DEFINE THESE IN vimrc.local " let g:shortname = 'login' " let g:fullname = 'Full Name' " let g:email = 'email address' " """"""""""""""""""""""""" " COMPLETION & INDENTATION " """"""""""""""""""""""""" " Function that returns tab if called on an "empty" line " C-N elsewhere function! CleverTab() if strpart( getline('.'), 0, col('.')-1 ) =~ '^\s*$' return "\" else return "\" endfunction " map the function to Tab " inoremap =CleverTab() inoremap =CleverTab() set completeopt=longest " Emacs like indenting. Pressing Tab indents line " Not in python, there it is managed by GetPythonIndent set indentkeys=0{,0},0),:,0#,!^F,o,O,e,!,!^F set cinkeys=0{,0},0),:,0#,!^F,o,O,e,!,!^F " Suffixes that get lower priority when doing tab completion for filenames. " These are files we are not likely to want to edit or read. set suffixes=.bak,~,.swp,.o,.info,.aux,.log,.dvi,.bbl,.blg,.brf,.cb,.ind,.idx,.ilg,.inx,.out,.toc " """"""""""""""" " TagLIST support " """"""""""""""" let Tlist_Ctags_Cmd="/opt/local/bin/ctags" let Tlist_Exit_OnlyWindow = 1 let Tlist_File_Fold_Auto_Close = 1 "let Tlist_Use_SingleClick = 0 "Do not use yet let Tlist_Use_Right_Window = 1 let Tlist_Display_Prototype = 0 let Tlist_Compact_Format = 1 let Tlist_Show_Menu = 1 " """""""" " NERDTree " """""""" let NERDTreeIgnore = ['\.vim$', '\~$', '\.pyc'] let NERDTreeShowBookmarks = 1 let NERDChristmasTree = 1 " """"""""""" " BufExplorer " """"""""""" let g:bufExplorerSplitBelow=1 let g:bufExplorerResize=1 " """""""""""""" " NERD Commenter " """""""""""""" let NERDSpaceDelims=1 let NERDCreateDefaultMappings=1 " """""""""""""""" " Trac Server List " """""""""""""""" let g:tracServerList = {} " """"""""""" " Keymappings " """"""""""" let g:mapleader = "," nnoremap l :set list! nnoremap f :set fullscreen! nnoremap x :set paste! nnoremap n :NERDTreeToggle nnoremap T :Tlist nnoremap N :set number! nnoremap b :HSBufExplorer nnoremap da "_dd nnoremap ts :ConqueTermSplit zsh nnoremap tt :ConqueTermTab zsh map c NERDCommenterToggle " nnoremap Y y$ inoremap inoremap " Visual mode selection nnoremap V nnoremap V vnoremap j vnoremap k " Terminal/Filemanager integration " nnoremap :OpenTerminal nnoremap :OpenFilemanager " Conque setup let g:ConqueTerm_InsertOnEnter = 1 let g:ConqueTerm_TERM = 'xterm-256color' let g:ConqueTerm_CloseOnEnd = 1 let g:ConqueTerm_SendVisKey = ',tp' " Tab selection by number nnoremap 1gt nnoremap 2gt nnoremap 3gt nnoremap 4gt nnoremap 5gt nnoremap 6gt nnoremap 7gt nnoremap 8gt nnoremap 9gt nnoremap 10gt " Vim5 comes with syntaxhighlighting. If you want to enable syntaxhightlighting " by default uncomment the next three lines. if has("syntax") syntax on " Default to no syntax highlightningendif " has("syntax") endif if has("autocmd") filetype indent on filetype plugin on " When editing a file, always jump to the last cursor position autocmd BufReadPost * \ if line("'\"") > 0 && line ("'\"") <= line("$") | \ exe "normal g'\"" | \ endif " Mako autocmd BufNewFile,BufRead *.mako setf mako " Plist autocmd BufReadPre,FileReadPre *.plist set binary ft=plist syntax=xml autocmd BufReadPost *.plist call MyBinaryPlistReadPost() autocmd FileReadPost *.plist call MyBinaryPlistReadPost() | let b:saveAsBinaryPlist = 0 autocmd BufWritePre,FileWritePre *.plist call MyBinaryPlistWritePre() autocmd BufWritePost,FileWritePost *.plist call MyBinaryPlistWritePost() endif " User customizations are held in file ~/.vim/vimrc.local if filereadable($HOME."/.vim/vimrc.local") source $HOME/.vim/vimrc.local endif " vim: set ts=4 sw=4 tw=78 ft=vim :