Permalink
Browse files

Initial

  • Loading branch information...
1 parent 0eed2a9 commit 9db6d0eb68c72bc8b0ddbf80c104511315714920 @wangbus wangbus committed Mar 22, 2013
View
@@ -0,0 +1,3 @@
+let g:netrw_dirhistmax =10
+let g:netrw_dirhist_cnt =1
+let g:netrw_dirhist_1='/Users/jianshi/.dotfiles/zsh'
Submodule FuzzyFinder added at b9f165
Submodule L9 added at c822b0
Submodule ScrollColors added at 2ce50b
Submodule command-t added at d30099
Submodule powerline added at 2c25a7
Submodule sparkup added at 5041a1
Submodule vim-easymotion added at 667a66
Submodule vim-fugitive added at f6d93b
Submodule vim-rails added at ebcc11
Submodule vundle added at 5dd478
View
186 .vimrc
@@ -0,0 +1,186 @@
+set nocompatible " be iMproved
+set guifont=Droid\ Sans\ Mono\ for\ Powerline:h12
+if has("syntax")
+ syntax on
+endif
+set background=dark " sets the background color (I like it dark)
+colorscheme desert " colorscheme
+
+set cursorline " highlight current line
+
+set nowrap " nowrap
+set showcmd " show cmd
+set showmatch " show matching brackets
+set showbreak=... " show '...' if line is longer than screen
+set mat=5 " how many tenths of a second to blink matching brackets
+set incsearch " show search matches as you type
+set lines=50 " height
+set novisualbell " no error bells
+set noerrorbells " no error bells
+set title " sets the title
+set wildmenu " show autocomplete options
+set textwidth=79 " sets the text width
+set tabpagemax=10 " show 10 tabs
+
+" search
+set ignorecase " case insensitive search
+set smartcase
+set magic " enable advanced regular expressions
+set hlsearch " enables highlighting search
+
+" text
+set autoindent " use curr line's indent to set indent of new line
+set smartindent " vim guesses indent level
+set tabstop=2
+set softtabstop=2
+set shiftwidth=2
+set expandtab
+set gdefault " the /g flag on :s substitutions by default
+
+" cmd line
+" change working directory to that of file
+cmap <Leader>cd lcd %:p:h
+
+" bash like commands in command mode
+cnoremap <C-a> <Home>
+cnoremap <C-e> <End>
+cnoremap <C-k> <C-U>
+cnoremap <C-p> <Up>
+cnoremap <C-n> <Down>
+
+" keyboard mapping
+" remap 0 to first word (going to the first col is kinda useless)
+map 0 ^
+
+" fix teh broken
+nnoremap / /\v
+vnoremap / /\v
+
+" remap ESC in insert mode to jk - faster than jj?
+inoremap jk <ESC>
+inoremap kj <ESC>
+
+" simplify window navigation with ctrl
+map <C-j> <C-W>j
+map <C-k> <C-W>k
+map <C-l> <C-W>l
+map <C-h> <C-W>h
+
+" make Y act like C/D
+nmap Y y$
+
+" ; for : in normal/visual
+nnoremap ; :
+vnoremap ; :
+
+" clear search matching across all buffers
+noremap <Leader><space> :noh<CR>:call clearmatches()<CR>
+
+" match braces using a tab
+map <TAB> %
+
+" <Leader>cd switches to directory of open buffer
+map <Leader>cd :cd %:p:h<CR>
+
+" <Leader>D to make you smile
+map <Leader>d :Nyan<CR>
+
+" <Leader>dc to show diff of current buffer
+map <Leader>dc :DiffChangesDiffToggle<CR>
+
+" <Leader>dp to show patch of current buffer
+map <Leader>dp :DiffChangesPatchToggle<CR>
+
+" <Leader>f to start an Ack search
+map <Leader>f :Ack<space>
+
+" <Leader>h/l to go to previous/next in jumplist
+nnoremap <Leader>h <C-O>
+nnoremap <Leader>l <C-i>
+
+" <Leader>G to create private Gist of entire buffer
+map <Leader>G :Gist -p<CR>
+
+" <Leader>n to toggle NerdTreeTabs
+map <Leader>n <plug>NERDTreeTabsToggle<CR>
+
+" <Leader>num to toggle relative numbers
+map <Leader>num :NumbersToggle<CR>
+
+" <Leader>o to open bufExplorer
+let g:bufExplorerDefaultHelp=0
+let g:bufExplorerShowRelativePath=1
+map <Leader>o :BufExplorerVerticalSplit<CR>
+
+" ctrl-p shortcuts
+set wildignore+=*.o,*.obj,.git,.svn,.hg,*.pyc
+let g:ctrlp_map = '<Leader>p'
+let g:ctrlp_cmd = 'CtrlPMixed'
+
+" <Leader>pb to preview buffer with hammer.vim
+map <Leader>pb :Hammer<CR>
+
+" <Leader>s to open scratch in split window
+map <Leader>s :Sscratch<CR>
+
+" CTags
+map <Leader>tag :!ctags --extra=+f -R *<CR><CR>
+
+" <Leader>tl to open Taglist project
+map <Leader>tl :TlistToggle<CR>
+
+" <Leader>u to toggle Gundo
+nnoremap <Leader>u :GundoToggle<CR>
+
+" <Leader>ws to clean trailing white space
+map <Leader>ws :%s/\s\+$//e<CR>
+
+" <Leader>x to show TODO list
+map <Leader>x <Plug>TaskList
+
+" <Leader>Y to bring up YankRing
+map <Leader>Y :YRShow<CR>
+
+" <Leader><Leader> to ZoomWin
+map <Leader><Leader> :ZoomWin<CR>
+
+" <F2> to toggle invisible characters
+map <silent> <F2> :set invlist<CR>
+
+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/'}
+Bundle 'tpope/vim-rails.git'
+Bundle 'Lokaltog/powerline.git', {'rtp': 'powerline/powerline/bindings/vim/plugin/'}
+Bundle 'vim-scripts/ScrollColors'
+
+" vim-scripts repos
+Bundle 'L9'
+Bundle 'FuzzyFinder'
+" non github repos
+Bundle 'git://git.wincent.com/command-t.git'
+" ...
+
+filetype plugin indent on " required!
+"
+" Brief help
+" :BundleList - list configured bundles
+" :BundleInstall(!) - install(update) bundles
+" :BundleSearch(!) foo - search(or refresh cache first) for foo
+" :BundleClean(!) - confirm(or auto-approve) removal of unused bundles
+"
+" see :h vundle for more details or wiki for FAQ
+" NOTE: comments after Bundle command are not allowed..
+

0 comments on commit 9db6d0e

Please sign in to comment.