Skip to content

Instantly share code, notes, and snippets.

@5v3n
Created November 16, 2010 19:08
Show Gist options
  • Save 5v3n/702295 to your computer and use it in GitHub Desktop.
Save 5v3n/702295 to your computer and use it in GitHub Desktop.
basic .vimrc
if has("autocmd")
filetype plugin indent on
endif
set sw=2
set sts=2
set background=dark
set cindent
set smartindent
set autoindent
set expandtab
set number " show line numbers
set gfn=Bitsteam\ Vera\ Sans\ Mono\ Monaco\ 12 " Use the Bitstream font
if &t_Co >= 256 || has("gui_running")
colorscheme railscasts
endif
if &t_Co > 2 || has("gui_running")
" switch syntax highlighting on, when the terminal has colors
syntax on
endif
@moeffju
Copy link

moeffju commented Nov 16, 2010

syntax on
set background=dark
set cindent
set smartindent
set autoindent
set expandtab
set tabstop=2
set shiftwidth=2

@5v3n
Copy link
Author

5v3n commented Nov 17, 2010

thanks :-)! I'll definitely check out macvim, but right now I can't afford the time to get into the subject...

@moeffju
Copy link

moeffju commented Nov 22, 2010

set nocompatible

" Use pathogen to easily modify the runtime path to include all
" plugins under the ~/.vim/bundle directory
call pathogen#helptags()
call pathogen#runtime_append_all_bundles()

" change the mapleader from \ to ,
let mapleader=","

" Quickly edit/reload the vimrc file
nmap <silent> <leader>ev :e $MYVIMRC<CR>
nmap <silent> <leader>sv :so $MYVIMRC<CR>

set nowrap
set hidden
set backspace=indent,eol,start
set background=dark
set cindent
set smartindent
set autoindent
set copyindent
set number
set smarttab
set expandtab
set tabstop=2
set shiftwidth=2
set showmatch
set shiftround
set ignorecase
set smartcase
set hlsearch
set incsearch

set history=1000         " remember more commands and search history
set undolevels=1000      " use many muchos levels of undo
set wildignore=*.swp,*.bak,*.pyc,*.class
set title                " change the terminal's title
set visualbell           " don't beep
set noerrorbells         " don't beep

set nobackup
set noswapfile

set list
set listchars=tab:>.,trail:.,extends:#,nbsp:.

set pastetoggle=<F2>

" set mouse=a

nnoremap ; :

" Easy window navigation
map <C-h> <C-w>h
map <C-j> <C-w>j
map <C-k> <C-w>k
map <C-l> <C-w>l

nmap <silent> ,/ :nohlsearch<CR>

cmap w!! w !sudo tee % >/dev/null


if has("autocmd")
  filetype plugin indent on
endif

if &t_Co >= 256 || has("gui_running")
  colorscheme mustang
endif

if &t_Co > 2 || has("gui_running")
  " switch syntax highlighting on, when the terminal has colors
  syntax on
endif

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment