" Let backspace work normally, i.e. allow deleting everything set backspace=indent,eol,start " Indentation: automatic and smart, for C-like languages anyway set autoindent set smartindent " Auto save before certain dangerous commands, otherwise confirm set autowrite set confirm " Incrementally search through the file as you type, highlighting as you go " Searches are also case insensitive if entered in lower-case " Searches wrap at EOF set incsearch set hlsearch set ignorecase set smartcase set wrapscan " Tabs are no good, use spaces instead set expandtab set tabstop=2 set shiftwidth=2 set softtabstop=2 " Let us know that we are in command/insert mode, and show commands as we type set showmode set showcmd " Show line numbers and cursor position (rows and cols) set number set ruler " Error bells are the worst set noerrorbells " When the cursor is on a bracket/paren/brace, highlight the other one briefly set showmatch set matchtime=3 " Spell checking is nice, and so is being able to add words to the dictionary set spellfile=~/.vim/spellfile.en.add setlocal spell spelllang=en_gb " A nice, dark colour scheme, so make things visible and highlight syntax set t_Co=256 set background=dark syntax on colorscheme zenburn " Remove the GUI toolbar, make options text instead of popups, enable the " mouse, and use a good font set guioptions-=T set guioptions+=c set mouse=a set guifont=Inconsolata\ 10 " Windows should always have a status line set laststatus=2 " Autowrap text, autowrap comments (and add comment delimiter), recognise " white space, and automatically format paragraphs as they are edited, based " on the second line of the paragraph rather than the first " Also set the maximum line length to 78, and wrap longer lines set formatoptions+=tcwa2 set wrap set textwidth=78 " I really don't want anything to get folded set nofoldenable " When splitting a window, put the new window below the original one set splitbelow " Detect different filetypes, and load appropriate plugins and indent files filetype plugin indent on " Remap the default motion keys so long, wrapped, but unsplit lines can be " navigated as independent lines noremap j gj noremap k gk " Complete my parens etc for me inoremap ( ()i inoremap [ []i inoremap { {}i " Make the NERDTree plugin easier to use map f :NERDTree " Make the TagList plugin easier to use map t :TlistToggle " Make tabs easier to use map :tabnew map :tabclose map :tabnext map :tabprevious imap :tabnew imap :tabclose imap :tabnext imap :tabprevious " Make the scratch buffer plugin more useful map s :Scratch " Filetype-specific abbreviations and shortcuts.... au FileType c ab #i #include au FileType c ab #d #define au FileType html inoremap

hhhi au FileType html inoremap
hhhhhi " For makefiles, let's just use tabs autocmd FileType make set noexpandtab