VIM setup

Tagged with vim

Language: Bash

Script I’ve been using to set up vim on my EEE and macbook. Still in progress, but it’s kinda neat.

View as text

mkdir -p .vim/autoload
mkdir -p .vim/backup
mkdir -p .vim/bundle

cd .vim/bundle
git clone git://
git clone git://
git clone git://
git clone git://
git clone git://
git clone git://
git clone git://

cd ../..

curl > .vim/autoload/pathogen.vim

echo "filetype off
call pathogen#runtime_append_all_bundles()

syntax on
set nocompatible              \"don't need to keep compatibility with Vi
set background=dark           \"make vim use colors that look good on a dark background
set showcmd                   \"show incomplete cmds down the bottom
set showmode                  \"show current mode down the bottom

set incsearch                 \"find the next match as we type the search
set hlsearch                  \"hilight searches by default
set autoindent

set shiftwidth=2              \"number of spaces to use in each autoindent step
set tabstop=2                 \"two tab spaces
set softtabstop=2             \"number of spaces to skip or insert when <BS>ing or <Tab>ing
set expandtab                 \"spaces instead of tabs for better cross-editor compatibility
set autoindent                \"keep the indent when creating a new line
set smarttab                  \"use shiftwidth and softtabstop to insert or delete (on <BS>) blanks
set cindent                   \"recommended seting for automatic C-style indentation
set autoindent                \"automatic indentation in non-C files

set cursorline
set cursorcolumn
set wildmenu                  \"make tab completion act more like bash
set wildmode=list:longest     \"tab complete to longest common string, like bash

set mouse-=a                  \"disable mouse automatically entering visual mode

set wrap!
set bs=2
set number
set hidden                    \"allow hiding buffers with unsaved changes
set cmdheight=2               \"make the command line a little taller to hide "press enter to viem more" text
set backupdir=$HOME/.vim/backup
set directory=$HOME/.vim/backup

let mapleader = ","           \"remap leader to ',' which is much easier than '\'
map <Leader>d :NERDTreeToggle<CR> :set number<CR>  \"make nerdtree open when you hit ,d
" >> .vimrc   
Original snippet written by Brian Hogan
Last updated at 18:21 PM on Aug 08, 2010 by Brian Hogan

SnippetStash costs money to host and develop. The service is free for everyone to use
but if you found it useful please consider making a small donation.