Permalink
Browse files

Merge branch 'master' of github.com:hanzhixing/.vim

Conflicts:
	vimrc.without_plugins
  • Loading branch information...
2 parents 361fdf9 + eaf175b commit 55ca0f72b77c71903473e7982dc0fd53d281f8ee @hanzhixing committed Jan 3, 2013
View
@@ -0,0 +1,2 @@
+bundle
+.netrwhist
View
@@ -3,7 +3,11 @@ STEPS FOR THE FIRST TIME:
cd ~
rm -rf ~/.vim/
git clone git@github.com:hanzhixing/.vim.git
-ln -sf ~/.vim/vimrc ~/.vimrc
+
+ln -sf ~/.vim/vimrc.with_plugins ~/.vimrc
+OR
+ln -sf ~/.vim/vimrc.without_plugins ~/.vimrc
+
cd .vim
mkdir bundle
cd bundle
View
@@ -0,0 +1,7 @@
+if exists("loaded_matchit")
+ let b:match_ignorecase = 1
+ let b:match_words = '<:>,' .
+ \ '<\@<=[ou]l\>[^>]*\%(>\|$\):<\@<=li\>:<\@<=/[ou]l>,' .
+ \ '<\@<=dl\>[^>]*\%(>\|$\):<\@<=d[td]\>:<\@<=/dl>,' .
+ \ '<\@<=\([^/][^ \t>]*\)[^>]*\%(>\|$\):<\@<=/\1>'
+endif
No changes.
No changes.
View
@@ -0,0 +1,321 @@
+""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+" General
+""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+" Load pathogen plugin anyway. important!
+runtime bundle/vim-pathogen/autoload/pathogen.vim
+call pathogen#infect()
+"source ~/.vim/bundle/vim-pathogen/autoload/pathogen.vim
+" use ':Helptags' to create help tags file
+
+" Use Vim settings, rather than Vi settings (much better!).
+" This must be first, because it changes other options as a side effect.
+set nocompatible
+
+" Show (partial) command in the last line of the screen.
+set showcmd
+
+" Set to auto read when a file is changed from the outside.
+set autoread
+
+" Set to auto change directory.
+"set autochdir
+
+" Detect filetype.
+filetype plugin indent on
+
+" Sets how many lines of history VIM has to remember.
+set history=700
+
+" Set backspace config.
+set backspace=eol,start,indent
+
+" Reload .vimrc when it's edited.
+autocmd! BufWritePost .vimrc source ~/.vimrc
+
+
+
+
+
+""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+" Displays
+""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+
+" Command-line auto-completion. Use <Tab> key when insert commands.
+set wildmenu
+
+" Always show current postion.
+set ruler
+
+" Always show line numbers.
+set number
+
+" The command line height. Default value is actually 1.
+set cmdheight=1
+
+" Set status line which shows you the most useful infomations.
+set laststatus=2
+
+" '\' is 'line-continuation' charactor here. See 'help line-continuation'.
+set statusline=%F%m%r%h%w%y
+ \%=
+ \%{\"[\".(&fenc==\"\"?&enc:&fenc).(
+ \(exists(\"+bomb\")\ &&\ &bomb)?\",BOM\":\"\").\"]\"}
+ \\ [%{&ff}]\ [%l,%v(%p%%)]\ [LEN=%L]\ [\\%03.3b,\0x%04.4B]
+
+" Enable syntax highlight.
+syntax on
+
+" Set font according to system.
+if has("win32")
+ set guifont=Bitstream\ Vera\ Sans\ Mono:h10
+elseif has("mac")
+ set guifont=Menlo:h14
+else
+ set guifont=Monospace\ 10
+endif
+
+" Set highlighting theme.
+if has("gui_running")
+ colorscheme desert
+else
+ colorscheme default
+endif
+
+" Highlight where it is over 79 columns
+" This 2 lines must be loaded after 'syntax on', 'guifont', 'colorschem',
+" or these settings will overwrite the setting you want.
+highlight OverLength ctermbg=darkred ctermfg=white guibg=#666666
+match OverLength /\%79v.*/
+
+" Set the default size of the window
+" if has("win32")
+" au GUIEnter * simalt ~x
+" else
+" set lines=24
+" set columns=83
+" endif
+
+" When a bracket is inserted, shows the matching one briefly.
+set showmatch
+
+
+
+
+
+""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+" Encoding and Languages
+""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+
+" Always use utf-8. Defualt is latin1 or value from system $LANG
+let &termencoding=&encoding
+set encoding=utf-8
+
+" Always save files in utf-8.
+set fileencoding=utf-8
+
+" Encoding detection order. The 'ucs-bom' is special value.
+set fileencodings=ucs-bom,utf-8,cp936,latin1
+
+" Always use \n as end-of-line for new files.
+set fileformat=unix
+
+" File format detection order.
+set fileformats=mac,unix,dos
+
+" Vim messages always in English.
+language messages en_US.utf-8
+
+
+
+
+
+""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+" Searching
+""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+
+" Highlight search things.
+set hlsearch
+
+" Make search act like search in address line of modern browsers.
+" Display the matche while typing.
+set incsearch
+
+" Stops the searching at the end of the file.
+set nowrapscan
+
+" Ignore case when searching.
+set ignorecase
+set smartcase
+
+" Pattern magic action.
+set magic
+
+
+
+
+
+""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+" GUI setting
+""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+
+if has('gui_running')
+ " Never want a menubar and toolbar
+ set guioptions-=m
+ set guioptions-=T
+
+ " Never want a scrollbar
+ set guioptions-=l
+ set guioptions-=L
+ set guioptions-=r
+ set guioptions-=R
+
+ " Disable mouse
+ "set mouse-=a
+endif
+
+
+
+
+
+""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+" Tab, Indent and Linefeed
+""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+
+" use spaces instead of <tab> character.
+set expandtab
+
+" the width of '>' operator indenting.
+set shiftwidth=4
+
+set tabstop=4
+
+" 4 spaces for one pressing, '<tab>' character for twice pressing.
+set softtabstop=4
+
+set smarttab
+
+set linebreak
+set tw=500
+
+set autoindent
+set smartindent
+set wrap
+
+
+autocmd FileType html,phtml setlocal shiftwidth=2 tabstop=2
+
+
+
+
+""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+" Files, backups and undo
+""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+
+" No swap file.
+set noswapfile
+
+" Turn backup off, since most stuff is in SVN, git anyway...
+"set nobackup
+" set nowritebackup
+
+" Persistent backup
+try
+ if has("win32")
+ set backupdir=C:\Windows\Temp
+ else
+ set backupdir=~/.vim/temp/backupdir
+ endif
+catch
+endtry
+
+" Persistent undo
+try
+ if has("win32")
+ set undodir=C:\Windows\Temp
+ else
+ set undodir=~/.vim/temp/undodir
+ endif
+ set undofile
+catch
+endtry
+
+
+
+
+
+""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+" Plugins
+""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+
+" Taglist
+if has("mac") || has("gui_macvim")
+ let Tlist_Ctags_Cmd='/usr/local/Cellar/ctags/5.8/bin/ctags'
+elseif has("win32")
+ let Tlist_Ctags_Cmd='D:\programs\ctags58\ctags.exe'
+else
+ let Tlist_Ctags_Cmd='/usr/bin/ctags'
+endif
+
+let Tlist_Show_One_File = 1
+let Tlist_Exit_OnlyWindow = 1
+let Tlist_Enable_Fold_Column = 0
+let Tlist_Compact_Format = 1
+let Tlist_File_Fold_Auto_Close = 0
+let Tlist_GainFocus_On_ToggleOpen = 1
+let tlist_php_settings='php;f:function'
+
+
+" Nerdtree
+let Tlist_Use_Right_Window = 1
+
+
+
+
+
+""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+" Key Mapping
+""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+
+" In order to use these Command key mapping, need to source this file manually
+" D is for Command key
+if has("mac")
+ " Control + W (Switching from one window to another)
+ map <D-w>h :wincmd h<cr>
+ map <D-w>j :wincmd j<cr>
+ map <D-w>k :wincmd k<cr>
+ map <D-w>l :wincmd l<cr>
+ vmap <D-w>h <esc>:wincmd h<cr>
+ vmap <D-w>j <esc>:wincmd j<cr>
+ vmap <D-w>k <esc>:wincmd k<cr>
+ vmap <D-w>l <esc>:wincmd l<cr>
+ imap <D-w>h <esc>:wincmd h<cr>
+ imap <D-w>j <esc>:wincmd j<cr>
+ imap <D-w>k <esc>:wincmd k<cr>
+ imap <D-w>l <esc>:wincmd l<cr>
+
+ " TList - taglist
+ map <D-t> :TlistToggle<cr>
+ vmap <D-t> <esc>:TlistToggle<cr>
+ imap <D-t> <esc>:TlistToggle<cr>
+
+ " NERDTree
+ map <D-n> :NERDTreeToggle<cr>
+ vmap <D-n> <esc>:NERDTreeToggle<cr>
+ imap <D-n> <esc>:NERDTreeToggle<cr>
+elseif has("win32")
+ " TList - taglist
+ map <F11> :TlistToggle<cr>
+ vmap <F11> <esc>:TlistToggle<cr>
+ imap <F11> <esc>:TlistToggle<cr>
+
+ " NERDTree
+ map <F10> :NERDTreeToggle<cr>
+ vmap <F10> <esc>:NERDTreeToggle<cr>
+ imap <F10> <esc>:NERDTreeToggle<cr>
+endif
+
+
+
+
+
+" End Of File. Sun Dec 30 03:08:16 UTC 2012
Oops, something went wrong. Retry.

0 comments on commit 55ca0f7

Please sign in to comment.