let g:mapleader=','
set nocompatible
set encoding=utf-8
set termencoding=utf-8
set fileencoding=utf-8
set fileencodings=ucs-bom,utf-8,cp936
set backspace=2
set number
set history=50
set ruler
set hlsearch
set incsearch
set mouse=icrv
set showcmd
set showmode
set backspace=indent,eol,start
"set ignorecase
set tabstop=4
set shiftwidth=4
set expandtab
set formatoptions=tcqmM
set textwidth=150
set foldlevel=100
set completeopt=longest,menu
"set t_Co=16
"colo wombat256
colo ir_black
" for ctags
nnoremap <F2> :tnext<cr>
nnoremap <F3> :tselect<cr>
nnoremap <Space> o<Esc>
nnoremap <Leader>qq :q!<cr>
nnoremap <Leader>qa :qa!<cr>
nnoremap <Leader>wq :wq<cr>
nnoremap <Leader>ww :w<cr>
nnoremap <C-k> mz:m-2<cr>`z==
nnoremap <C-j> mz:m+<cr>`z==
vnoremap <C-k> :m'<-2<cr>gv=gv
vnoremap <C-j> :m'>+<cr>gv=gv
nnoremap <Tab> V>
nnoremap <S-Tab> V<
vnoremap <Tab> >gv
vnoremap <S-Tab> <gv
inoremap <C-E> <End>
inoremap <C-A> <Home>
inoremap <C-P> <Up>
inoremap <C-N> <Down>
inoremap <C-B> <Left>
inoremap <C-F> <Right>
inoremap <C-J> <cr>
inoremap <C-D> <del>
inoremap <F9> <C-x><C-o>
inoremap <F10> <C-x><C-p>
nmap <C-a> ggVG
vmap <C-c> y:call system("pbcopy", getreg("/""))<CR>
nmap <C-p> :call setreg("/"",system("pbpaste"))<CR>p
syntax on
if has("autocmd")
filetype on
filetype indent on
filetype plugin on
au BufReadPost * if line("'/"") > 1 && line("'/"") <= line("$") | exe "normal! g`/"" | endif
au FileType python nnoremap <F4> :w<cr>:!python %<cr>
"ctags --list-kinds=python
"ctags -R --python-kinds=cfm --languages=python --extra=+q .
au FileType python setlocal tags=$DJANGO_TAGS;
"using pydiction
au FileType python setlocal dictionary=$PYTHON_DICTION complete+=k iskeyword+=.
endif
"for python syntax
let python_highlight_all = 1
"for xptemplate
let g:xptemplate_vars = "SPop=&SParg="
let g:xptemplate_brace_complete = ''
"for neocomplecache
let g:neocomplcache_enable_at_startup = 1
let g:neocomplcache_enable_auto_select = 1
inoremap <expr><Tab> pumvisible() ? "/<Down>" : "/<Tab>"
inoremap <expr><CR> pumvisible() ? "/<C-y>".neocomplcache#cancel_popup() : "<CR>"
"for winmanage and taglist
let Tlist_Show_File=1
let Tlist_Exit_OnlyWindow=1
let g:winManagerWindowLayout='FileExplorer|TagList'
nmap <Leader>wm :WMToggle<cr>