Skip to content

Instantly share code, notes, and snippets.

@mrorii
Created November 1, 2011 23:16
Show Gist options
  • Select an option

  • Save mrorii/1332247 to your computer and use it in GitHub Desktop.

Select an option

Save mrorii/1332247 to your computer and use it in GitHub Desktop.
set nocompatible " be iMproved
filetype off " required!
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
" let Vundle manage Vundle
" required!
Bundle 'gmarik/vundle'
" My Bundles here:
"
" original repos on github
Bundle 'tpope/vim-fugitive'
Bundle 'Lokaltog/vim-easymotion'
Bundle 'rstacruz/sparkup', {'rtp': 'vim/'}
" vim-scripts repos
Bundle 'L9'
Bundle 'FuzzyFinder'
Bundle 'neocomplcache'
Bundle 'rails.vim'
filetype plugin indent on " required!
" Enable syntax highligh
if &t_Co > 2 || has("gui_running")
syntax on
endif
nnoremap <Space>. :<C-u>edit $MYVIMRC<Enter>
nnoremap <Space>s. :<C-u>source $MYVIMRC<Enter>
" neocomplcache
let g:neocomplcache_enable_at_startup = 1 " enable on startup
"--------------------------------
" cho45 settings
" refer to https://github.com/cho45/dotfiles/blob/master/.vimrc
set listchars=tab:>.
set list
set backspace=eol,indent,start
" make your own goddamn backup files
set nobackup
" if someone edits my files, reopen it
set autoread
" display line number
set number
" default indent settings
set autoindent smartindent
" nice looking tabs
set smarttab
set softtabstop=4 tabstop=4 "shiftwidth=4
set ignorecase smartcase
" incremental
set incsearch
set wrapscan
" display matching parentheses
set showmatch
" show command being entered
set showcmd
set whichwrap=b,s,h,l,<,>,[,]
" display completions
set wildmenu
set splitbelow
nnoremap <C-h> :<C-u>help<space>
nnoremap <C-h><C-h> :<C-u>help<Space><C-r><C-w><Enter>
noremap ; :
noremap : ;
noremap j gj
noremap k gk
noremap gj j
noremap gk k
" FuzzyFinder
nnoremap <unique> <silent> <space>fb :FufBuffer!<CR>
nnoremap <unique> <silent> <space>ff :FufFile!<CR>
nnoremap <unique> <silent> <space>fm :FufMruFile!<CR>
nnoremap <unique> <silent> <Space>fc :FufRenewCache<CR>
autocmd FileType fuf nmap <C-c> <ESC>
let g:fuf_patternSeparator = ' '
let g:fuf_modesDisable = ['mrucmd']
let g:fuf_mrufile_exclude = '\v\.DS_Store|\.git|\.swp|\.svn'
let g:fuf_mrufile_maxItem = 100
let g:fuf_enumeratingLimit = 20
let g:fuf_file_exclude = '\v\.DS_Store|\.git|\.swp|\.svn'
" Tabs
nnoremap <Space>t t
nnoremap <Space>T T
nnoremap t <Nop>
nnoremap <silent> tc :<C-u>tabnew<CR>:tabmove<CR>
nnoremap <silent> tk :<C-u>tabclose<CR>
nnoremap <silent> tn :<C-u>tabnext<CR>
nnoremap <silent> tp :<C-u>tabprevious<CR>
" python
autocmd FileType python setl autoindent
autocmd FileType python setl smartindent cinwords=if,elif,else,for,while,try,except,finally,def,class
autocmd FileType python setl tabstop=2 expandtab shiftwidth=2 softtabstop=4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment