Skip to content

Instantly share code, notes, and snippets.

@napcs
Created January 27, 2011 22:33
Show Gist options
  • Save napcs/799434 to your computer and use it in GitHub Desktop.
Save napcs/799434 to your computer and use it in GitHub Desktop.
set nocompatible "don't need to keep compatibility with Vi
filetype plugin indent on " enable detection, plugins and indenting in one step
syntax on "Turn on syntax highlighting
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 foldenable "enable folding
set showmatch "set show matching parenthesis
"set noexrc " don't use the local config
set virtualedit=all "allow the cursor to go in to "invalid" places
set incsearch "find the next match as we type the search
set hlsearch "hilight searches by default
set ignorecase "ignore case when searching
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 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 nowrap "no wrapping
set copyindent "copy the previous indentation on autoindenting
set backspace=indent,eol,start "allow backspacing over everything in insert mode
set noerrorbells "don't make noise
set shiftround "when at 3 spaces, and I hit > ... go to 4, not 5
set cursorline "underline the current line in the file
set cursorcolumn "highlight the current column. Visible in GUI mode only.
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! "Word wrap on
set bs=2
set number "Show line numbers
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 '\'
" Open NERDTree with [,d]
map <Leader>d :NERDTreeToggle<CR> :set number<CR>
map <F3> :tabp<CR>
map <F4> :tabn<CR>
colorscheme vividchalk
autocmd BufEnter *.pml set filetype=xml
set statusline=%F%m%r%h%w[%L][%{&ff}]%y[%p%%][%04l,%04v]
" | | | | | | | | | | |
" | | | | | | | | | | + current
" | | | | | | | | | | column
" | | | | | | | | | +-- current line
" | | | | | | | | +-- current % into file
" | | | | | | | +-- current syntax in
" | | | | | | | square brackets
" | | | | | | +-- current fileformat
" | | | | | +-- number of lines
" | | | | +-- preview flag in square brackets
" | | | +-- help flag in square brackets
" | | +-- readonly flag in square brackets
" | +-- rodified flag in square brackets
" +-- full path to file in the buffer
" }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment