Commits

Woojong Koh committed e739e61

Remove YankRing, and add Yankstack, NrrwRgn and Powerline

Comments (0)

Files changed (6)

 .vim/bundle/DirDiff.vim = [git]https://github.com/vim-scripts/DirDiff.vim.git
-.vim/bundle/YankRing.vim = [git]https://github.com/vim-scripts/YankRing.vim.git
+.vim/bundle/NrrwRgn = [git]https://github.com/chrisbra/NrrwRgn.git
 .vim/bundle/a.vim = [git]https://github.com/vim-scripts/a.vim.git
 .vim/bundle/ack.vim = [git]https://github.com/mileszs/ack.vim.git
 .vim/bundle/ctrlp.vim = [git]https://github.com/kien/ctrlp.vim.git
 .vim/bundle/vim-pathogen = [git]https://github.com/tpope/vim-pathogen.git
 .vim/bundle/vim-powerline = [git]https://github.com/Lokaltog/vim-powerline.git
 .vim/bundle/vim-smartinput = [git]https://github.com/kana/vim-smartinput.git
+.vim/bundle/vim-yankstack = [git]https://github.com/maxbrunsfeld/vim-yankstack.git
 .oh-my-zsh = [git]https://github.com/robbyrussell/oh-my-zsh.git
 
 .hgext/hgbb = https://bitbucket.org/birkenfeld/hgbb
 244a50c40d93873006c875c5d2ae64fcbc987216 .hgext/hgshelve
 eb6b95a96468d59aedec1927743cc1211b099a3c .hgext/mercurial_keyring
 30bdbd5f6173041fa3e8726195dc21f8fd6082ea .hgext/onsub
-921d2f49ef01acce973980c0aa9c6ffbbd2fbd0b .oh-my-zsh
+25a9cddc2191a1c6751d1e385389c0787a597a3e .oh-my-zsh
 ca0ce8fcc49a09eca7eb8ff8003554de2f250901 .vim/bundle/DirDiff.vim
-8ebc225b364887c0557ab47ab2ca752a70123bee .vim/bundle/YankRing.vim
+698e0c333c1edae8a1d83b04e5674efa7cac3137 .vim/bundle/NrrwRgn
 2cbe946206ec622d9d8cf2c99317f204c4d41885 .vim/bundle/a.vim
 9895285042a2fd5691b2f6582aa979e4d1bdffea .vim/bundle/ack.vim
 3c6182371db8e8ede3789d21b52386569eda2208 .vim/bundle/ctrlp.vim
 667a668e114e9ec0e5d4cbcb0962d835b23614c4 .vim/bundle/vim-easymotion
 3bb534a720fa762aa01d2df2d5d41bd3c4122169 .vim/bundle/vim-l9
 5e3fdd3a8a3b244e1fedd0f5597f4a9879e16c3b .vim/bundle/vim-pathogen
-114f8e5c204f1cac9b2443065910fa182de39fb8 .vim/bundle/vim-powerline
+20ab08c9a8fe6cdfb7c303aa3063f211d72f8b2f .vim/bundle/vim-powerline
 78ab4b3df24fa2753d3dfc1be75ed5a3df1565b8 .vim/bundle/vim-smartinput
+02ee85f9624c93a6accf571749dfd7d5e8e2cfab .vim/bundle/vim-yankstack
 "------------------------------------------------------------
 
 " Customization
+set nonumber
+set relativenumber
 set background=dark
 colorscheme solarized
 if has("gui_running")
 set scrolloff=2		" Keep some context
 set incsearch
 "set nowrapscan		" Do not wrap around
-"set history=1000
+set history=1000
 set viminfo+=%3		" Save and restore the buffer list
+set undofile
 set clipboard=unnamed
 if has('unnamedplus')
     set clipboard=unnamedplus
 endif
 set noimdisable		" http://tech.groups.yahoo.com/group/vim-mac/message/12312
-set path+=/usr/local/include,/opt/local/include,../lib,../include
+set macmeta
+set path+=/usr/local/include,/opt/local/include,./include;,./lib;
 set tags+=./tags;
 
 runtime macros/matchit.vim	" Enable matchit
 
 " Mapping
+nnoremap j gj
+nnoremap k gk
 map <tab> %
 nnoremap <silent> <Leader>. :e .<CR>
-nnoremap <silent> <C-t> :FufCoverageFile<CR>
-nnoremap <silent> <F5> :GundoToggle<CR>
+nnoremap <Leader>a :Ack!<space>
+nnoremap <Leader>gu :GundoToggle<CR>
+nmap <ESC>p <Plug>yankstack_substitute_older_paste
+nmap <ESC>P <Plug>yankstack_substitute_older_paste
+nmap <ESC>n <Plug>yankstack_substitute_newer_paste
+nmap <ESC>N <Plug>yankstack_substitute_newer_paste
 
 if executable('ack')
 	nmap <silent> <Leader>* :execute expand('Ack --'.&filetype.' <cword> %')<CR>
 
 " Autocommand
 autocmd BufEnter * silent! lcd %:p:h
-autocmd BufEnter * if filereadable('SConstruct') | silent! setlocal makeprg=scons | endif
-autocmd BufEnter * if filereadable('SConscript') | silent! setlocal makeprg=scons\ -u | endif
+autocmd BufEnter *.tex silent! setlocal textwidth=75 spell spelllang=en_us
 autocmd BufReadPre,BufNewFile SConstruct,Sconscript set filetype=python
-autocmd BufEnter *.tex silent! setlocal textwidth=75 spell spelllang=en_us
+autocmd BufEnter * if filereadable('SConstruct') || filereadable('SConscript') | silent! setlocal makeprg=scons\ -u | else | silent! setlocal makeprg= | endif
+autocmd VimResized * :wincmd =  " Resize splits when the window is resized
 
 " http://vim.wikia.com/wiki/Automatically_open_the_quickfix_window_on_:make
 " Automatically open, but do not go to (if there are errors) the quickfix /
 # Back to My Mac (SSH)
 HOSTNAME=`hostname -s`
 HOSTNAME_CLEANED=${HOSTNAME//-/_}
-ICLOUD_DOMAIN=`echo show Setup:/Network/BackToMyMac | scutil | sed -n 's/.* : *\(.*\).$/\1/p'`
-EXPORT_STMT="export $HOSTNAME_CLEANED=$HOSTNAME.$ICLOUD_DOMAIN"
+EXPORT_STMT="export $HOSTNAME_CLEANED=$HOSTNAME.`echo show Setup:/Network/BackToMyMac | scutil | sed -n 's/.* : *\(.*\).$/\1/p'`"
 HOSTNAMES_FILE="$HOME/Dropbox/Mac Sync/.hostnames"
 
 if ! grep "$EXPORT_STMT" "$HOSTNAMES_FILE" > /dev/null; then
 DOTDIR="$( cd -P "$( dirname "$0" )" && pwd )"
 pushd "${DOTDIR}" &> /dev/null
 
-echo "Installing dotfiles..."
+echo "* Installing dotfiles..."
 
 shopt -s dotglob extglob
 for DOTFILE in !(.hg|.hgsub|.hgsubstate|install|install.bat|update_subrepos|bootstrap_mac.sh|install_distribute.py)
 popd &> /dev/null
 
 echo
-echo "Generating a dummy certificate..."
+echo "* Changing a login shell to ZSH..."
+chsh -s /bin/zsh
+
+echo
+echo "* Generating a dummy certificate..."
 
 # http://mercurial.selenic.com/wiki/CACertificates
 if [ ! -f /etc/hg-dummy-cert.pem ]; then
 fi
 
 echo
-echo "Installing distribute and pip..."
+echo "* Installing distribute and pip..."
 curl -O http://python-distribute.org/distribute_setup.py
 sudo python distribute_setup.py
 sudo easy_install --upgrade pip
 
 echo
-echo "Installing Mercurial..."
+echo "* Installing Mercurial..."
 sudo pip install --upgrade mercurial
 
 echo
-echo "Installing extensions..."
+echo "* Installing extensions..."
 sudo pip install --upgrade keyring
 sudo pip install --upgrade hg-git
 sudo pip install --upgrade gntp
 
 echo
-echo "Installing virtualenv..."
+echo "* Installing virtualenv..."
 sudo pip install --upgrade virtualenv
 sudo pip install --upgrade virtualenvwrapper
 
 echo
-echo "Installing SCons..."
+echo "* Installing SCons..."
 sudo pip install --upgrade scons
 
 echo
-echo "Installing Ack..."
+echo "* Installing Ack..."
 sudo cpan App::Ack
 # Git
 hg onsub --ignore-errors "git checkout master"
 hg onsub --ignore-errors "git pull"
+cd .vim/bundle/vim-powerline/; git checkout develop
 
 # Mercurial
 hg onsub --ignore-errors "hg pull --update"
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.