Skip to content

Instantly share code, notes, and snippets.

@diezguerra
Created October 11, 2012 19:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save diezguerra/3874927 to your computer and use it in GitHub Desktop.
Save diezguerra/3874927 to your computer and use it in GitHub Desktop.
set nocompatible
filetype off
set rtp+=~/.vim/bundle/vundle
call vundle#rc()
Bundle 'gmarik/vundle'
Bundle 'tpope/vim-fugitive'
Bundle 'kevinw/pyflakes'
Bundle 'kevinw/pyflakes-vim'
Bundle 'nvie/vim-flake8'
Bundle 'kien/ctrlp.vim'
filetype on
filetype plugin indent on
"let g:solarized_termcolors=256
let mapleader=","
colorscheme solarized
colorscheme tomorrownight
set background=dark
set backspace=indent,eol,start
set expandtab
set smarttab
set softtabstop=4
set tabstop=4
set shiftwidth=4
set autoindent
set smartindent
set copyindent
set relativenumber
set nowrap
set colorcolumn=79
set fileencodings=utf-8,ucs-bom,default,latin1
set guifont=Monaco:h18
set guitablabel=%M%t
set termencoding=utf-8
set ruler
set number "line numbers on the side
set cursorline
set scrolloff=5 "provide some context when scrolling
set showcmd
set tildeop
set hidden
set list
set listchars=trail:.,extends:>,precedes:<,tab:▸\ ,eol:¬
set hlsearch
set incsearch
set ignorecase
set smartcase
set laststatus=2
set history=1000
set undolevels=1000
set wildignore=*.swp,*.bak,*.pyc,*.class
set title
set visualbell
set noerrorbells
set nobackup
set noswapfile
syntax on
set statusline=%f[%{strlen(&fenc)?&fenc:'none'},%{&ff}]%h%m%r%y%=%c,%l/%L\ %P
hi StatusLine guifg=#839496 guibg=#073642
set guioptions-=r "no right scrollbar
set guioptions-=L "no left scrollbar
set guioptions-=T "no toolbar
nmap <silent> <leader>cf <ESC>/\v^[<=>]{7}( .*\|$)<CR>
nmap <silent> <C-N> :silent noh<CR>
map <Left> :echo "no!"<cr>
map <Right> :echo "no!"<cr>
map <Up> :echo "no!"<cr>
map <Down> :echo "no!"<cr>
" nnoremap <silent> <Leader>t :CommandT<CR>
" nnoremap <silent> <Leader>b :CommandTBuffer<CR>
" nnoremap <silent> <Leader>r :CommandTFlush<CR>
nnoremap <silent> <Leader>t :CtrlP<CR>
nnoremap <silent> <Leader>b :CtrlPBuffer<CR>
let g:ctrlp_working_path_mode=2
if has('mouse')
set mouse=a
set mousehide
endif
if has("gui_running")
highlight SpellBad term=underline gui=undercurl guisp=Orange
endif
function! Preserve(command)
" Preparation: save last search, and cursor position.
let _s=@/
let l = line(".")
let c = col(".")
" Do the business:
execute a:command
" Clean up: restore previous search history, and cursor position
let @/=_s
call cursor(l, c)
endfunction
nnoremap c "_c
vnoremap c "_c
nnoremap C "_C
vnoremap C "_C
ino jj <esc>
cno jj <c-c>
vno v <esc>
set noesckeys
set timeout timeoutlen=1000 ttimeoutlen=100
cno W w
nnoremap <tab> %
vnoremap <tab> %
nnoremap ; :
set nocompatible
au FocusLost * :wa " Save on losing focus
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment