"==============================
"my vim configure
set history=50 " keep 50 lines of command line history
set ruler " show the cursor position all the time
set showcmd " display incomplete commands
set incsearch " do incremental searching
set tabstop=4 " tab spacing (settings below are just to unify it)
set softtabstop=8 " unify
set shiftwidth=4 " unify
set smarttab " use tabs at the start of a line, spaces elsewhere
set nowrap " do not wrap lines
"set nohlsearch " do not highlight searched for phrases
set smartindent
set cindent
set showmatch " show matching brackets
set showmode
set mouse=a " use mouse everywhere
set cino=:0g0t0(sus " format
set sm " range magic
set autowrite
set updatetime=100
set number " set the number of line
syntax on
colo desert " set the default color scheme, choose in ~/.vim/colors/
let mapleader = "," " use /:echo mapleader/ to check it
"==========================
"netrw setting
"==========================
let g:netrw_winsize = 30
nmap <silent> <leader>fe :Sexplore!<CR>
"==========================
" BufExplorer
"==========================
let g:bufExplorerDefaultHelp=0 " Do not show default help.
let g:bufExplorerDetailedHelp=0 " Do not show detailed help.
let g:bufExplorerShowRelativePath=0 " Show absolute paths.
let g:bufExplorerShowDirectories=1 " Show directories.
let g:bufExplorerSortBy='mru' " Sort by most recently used.
let g:bufExplorerSplitRight=0 " Split left.
let g:bufExplorerSplitVertical=1 " Split vertically.
let g:bufExplorerSplitVertSize = 30 " Split width
let g:bufExplorerUseCurrentWindow=1 " Open in new window.
"===========================
" winManager setting
"===========================
let g:winManagerWindowLayout = 'BufExplorer,FileExplorer|TagList'
"let g:winManagerWindowLayout = 'FileExplorer,TagsExplorer|BufExplorer' " What windows should it
let g:winManagerWidth = 30
let g:defaultExplorer = 0
nmap <C-W><C-F> :FirstExplorerWindow<CR>
nmap <C-W><C-B> :BottomExplorerWindow<CR>
"nmap <silent> <leader>wm :WMToggle<CR>
nnoremap <silent> <F8> :WMToggle<CR>
"==========================
"MiniBuf setting
"==========================
let g:miniBufExplTabWrap = 1 " make tabs show complete (no broken on two lines)
let g:miniBufExplModSelTarget = 1
"==========================
"ctags setting
"==========================
let Tlist_Sort_Type = "name" " order by
let Tlist_Use_Right_Window = 1 " split to the right side of the screen
let Tlist_Compart_Format = 1 " show small meny
let Tlist_Exist_OnlyWindow = 1 " if you are the last, kill yourself
let Tlist_File_Fold_Auto_Close = 1 " Do not close tags for other files
let Tlist_Enable_Fold_Column = 0 " Do not show folding tree
let Tlist_WinHeight = 40
"nnoremap <silent> <F8> :TlistToggle<CR>
"==========================
"append the author infomation and date
"==========================
map <F5> a Author: bhw <cr>EMail: bhwshx@163.com <cr>Date: <C-R>=strftime("%c") <CR>
"=========================
"list the files in the current directory
"=========================
"map <F3> :edit .<CR>
"==========================
"auto complete the words
"==========================
inoremap <F2> <C-x><C-o>
"==========================
"close the tab window
"==========================
map <F9> :close <CR>