--- /dev/null
+#!/bin/sh
+set -e
+PATH="/usr/local/bin:$PATH"
+dir="`git rev-parse --git-dir`"
+trap 'rm -f "$dir/$$.tags"' EXIT
+git ls-files | \
+ ctags --tag-relative -L - -f"$dir/$$.tags" --languages=-javascript,sql
+mv "$dir/$$.tags" "$dir/tags"
--- /dev/null
+#!/bin/sh
+.git/hooks/ctags >/dev/null 2>&1 &
--- /dev/null
+#!/bin/sh
+.git/hooks/ctags >/dev/null 2>&1 &
--- /dev/null
+#!/bin/sh
+.git/hooks/ctags >/dev/null 2>&1 &
--- /dev/null
+#!/bin/sh
+case "$1" in
+ rebase) exec .git/hooks/post-merge ;;
+esac
+[init]
+ templatedir = ~/.git_template
+[core]
+ # Use custom `.gitignore`
+ excludesfile = ~/.gitignore_global
+ # Treat spaces before tabs and all kinds of trailing whitespace as an error
+ # [default] trailing-space: looks for spaces at the end of a line
+ # [default] space-before-tab: looks for spaces before tabs at the beginning of a line
+ whitespace = space-before-tab,-indent-with-non-tab,trailing-space
+ # utocrlf = input
+ editor = git-editor.sh
+[color]
+ # Use colors in Git commands that are capable of colored output when
+ # outputting to the terminal. (This is the default setting in Git = 1.8.4.)
+ ui = auto
+[color "branch"]
+ current = yellow reverse
+ local = yellow
+ remote = green
+[color "diff"]
+ meta = yellow bold
+ frag = magenta bold # line info
+ old = red # deletions
+ new = green # additions
+[color "status"]
+ added = yellow
+ changed = green
+ untracked = cyan
+[help]
+ # Automatically correct and execute mistyped commands
+ autocorrect = 1
+[diff]
+ tool = git-difftool
+ # Detect copies as well as renames
+ renames = copies
+ prompt = false
+[difftool "git-difftool"]
+ cmd = git-difftool.sh $LOCAL $REMOTE
+[merge]
+ tool = git-mergetool
+ # Include summaries of merged commits in newly created merge commit messages
+ log = true
+ prompt = false
+[mergetool "git-mergetool"]
+ cmd = git-mergetool.sh $LOCAL $REMOTE $BASE $MERGED
+[push]
+ default = simple
+[apply]
+ # Detect whitespace errors when applying a patch
+ whitespace = fix
[alias]
# View abbreviated SHA, description, and history graphs
lg = !"git lg1"
co = checkout
cobr = checkout -b
root = rev-parse --show-toplevel
-[apply]
- # Detect whitespace errors when applying a patch
- whitespace = fix
-[core]
- # Use custom `.gitignore`
- excludesfile = ~/.gitignore_global
- # Treat spaces before tabs and all kinds of trailing whitespace as an error
- # [default] trailing-space: looks for spaces at the end of a line
- # [default] space-before-tab: looks for spaces before tabs at the beginning of a line
- whitespace = space-before-tab,-indent-with-non-tab,trailing-space
- # utocrlf = input
- editor = git-editor.sh
-[color]
- # Use colors in Git commands that are capable of colored output when
- # outputting to the terminal. (This is the default setting in Git = 1.8.4.)
- ui = auto
-[color "branch"]
- current = yellow reverse
- local = yellow
- remote = green
-[color "diff"]
- meta = yellow bold
- frag = magenta bold # line info
- old = red # deletions
- new = green # additions
-[color "status"]
- added = yellow
- changed = green
- untracked = cyan
-[help]
- # Automatically correct and execute mistyped commands
- autocorrect = 1
-[diff]
- tool = git-difftool
- # Detect copies as well as renames
- renames = copies
- prompt = false
-[difftool "git-difftool"]
- cmd = git-difftool.sh $LOCAL $REMOTE
-[merge]
- tool = git-mergetool
- # Include summaries of merged commits in newly created merge commit messages
- log = true
- prompt = false
-[mergetool "git-mergetool"]
- cmd = git-mergetool.sh $LOCAL $REMOTE $BASE $MERGED
-[push]
- default = simple
+ ctags = !.git/hooks/ctags
[include]
# Local/private config goes in the include
path = ~/.gitconfig_local
+
set nocompatible
-"------------------------------------------------------------------------------
-" For plug
-"------------------------------------------------------------------------------
-"
+"-----------plugin manager----------------
+
if empty(glob('$HOME/.vim/autoload/plug.vim'))
silent !curl -fLo $HOME/.vim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
call plug#begin('$HOME/.vim/plugged')
-Plug 'thanthese/Tortoise-Typing'
+Plug 'tpope/vim-sensible'
+Plug 'tpope/vim-ragtag'
+Plug 'tpope/vim-repeat'
+Plug 'tpope/vim-surround'
+Plug 'tpope/vim-fugitive'
Plug 'altercation/vim-colors-solarized'
-Plug 'plasticboy/vim-markdown'
-Plug 'vim-airline/vim-airline'
-Plug 'vim-airline/vim-airline-themes'
+"Plug 'vim-airline/vim-airline'
+"Plug 'vim-airline/vim-airline-themes'
Plug 'mileszs/ack.vim'
Plug 'brandonbloom/csearch.vim'
Plug 'chazy/cscope_maps'
-Plug 'vim-scripts/taglist.vim'
+"Plug 'vim-scripts/taglist.vim'
"Plug 'airblade/vim-gitgutter'
Plug 'junegunn/fzf.vim'
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
-Plug 'tpope/vim-surround'
-Plug 'tpope/vim-ragtag'
+Plug 'thanthese/Tortoise-Typing'
call plug#end()
-"------------------------------------------------------------------------------
-" Regular setting
-"------------------------------------------------------------------------------
-"
-set backspace=2
-set autoindent
-set nobackup
-set noswapfile
-set nowb
-set encoding=utf-8
-set expandtab
-set hidden
-set hlsearch
-set incsearch
-set ignorecase
-set smartcase
-set laststatus=2
-set number
-set ruler
-set mouse=a
-set shiftwidth=2
-set softtabstop=2
-set expandtab
-set showcmd
-set showmatch
-set visualbell t_vb=
-set modeline
-set modelines=1
-set so=7
-set wildmenu
-set nostartofline
-set confirm
-set cmdheight=2
-set notimeout
-set ttimeout
-set ttimeoutlen=4000
-set tags+=tags;
+"---------------------------------------------
" For color
-syntax enable
set background=dark
let g:solarized_menu=0
try
colorscheme default
endtry
+" For fonts
if has("gui_running")
if has("gui_gtk2")
set guifont=Inconsolata\ 12
endif
" For markdown
-let g:vim_markdown_folding_disabled = 1
+autocmd BufNewFile,BufReadPost *.md set filetype=markdown
+let g:markdown_fenced_languages = ['html', 'python', 'bash=sh']
+let g:markdown_syntax_conceal = 0
" For taglist
-let Tlist_Compact_Format = 1
-let Tlist_GainFocus_On_ToggleOpen = 1
-let Tlist_Close_On_Select = 1
-nnoremap <C-l> :TlistToggle<CR>
+"let Tlist_Compact_Format = 1
+"let Tlist_GainFocus_On_ToggleOpen = 1
+"let Tlist_Close_On_Select = 1
+"nnoremap <C-l> :TlistToggle<CR>
" %s is replaced with fzf command
"let g:fzf_launcher = 'xterm -e bash -ic %s'
let g:fzf_launcher = "In_a_new_term_function %s"
"For airline
-let g:airline#extensions#tabline#enabled = 1
+"let g:airline#extensions#tabline#enabled = 1
" Easy escape
inoremap jj <ESC>