diff --git a/MakeFile.sh b/MakeFile.sh index 440c475..f2dd7de 100644 --- a/MakeFile.sh +++ b/MakeFile.sh @@ -18,7 +18,19 @@ ln -sf $ALIASES_DIR/dir_colors ~/.dir_colors #vim config ln -sf $CF_DIR/vim ~/.vim +if [ -L $CF_DIR/vim/vim ] +then + rm $CF_DIR/vim/vim +fi ln -sf $CF_DIR/vim/vimrc ~/.vimrc #svn ln -sf $ALIASES_DIR/bash_svn_completion ~/.bash_svn_completion + +#bin +ln -sf $CF_DIR/bin ~/bin + +if [ ! -d ~/tmp ] +then + mkdir ~/tmp +fi diff --git a/README.md b/README.md index e359fdf..e3d65f2 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,8 @@ linux_config ============ -My linux config file. .bash_profile .alias bin .vimrc etc. \ No newline at end of file +My linux config file. .bash_profile .alias bin .vimrc etc. + + +VIM: +color theme:tomasr-molokai diff --git a/bin/bin b/bin/bin new file mode 120000 index 0000000..c11222d --- /dev/null +++ b/bin/bin @@ -0,0 +1 @@ +/home/ken/Dropbox/github/linux_config/bin \ No newline at end of file diff --git a/sync_config.sh b/sync_config.sh index 75e94d8..f735489 100644 --- a/sync_config.sh +++ b/sync_config.sh @@ -3,37 +3,8 @@ function batch_sync_profile() # tar the private setting. tar czvf profile.tar.gz .bash_profile .bash_svn_completion .vimrc .ssh .dir_colors .xtail >/dev/null - #cmatch devel and testing. - #group_sync_profile cmdev 1 3 .corp.cnb - #group_sync_profile cmtest 2 3 .corp.cnb + sync_profile $1 - # imatch test. - #group_sync_profile imtest 1 3 .corp.cnb - - # bsdb and p4pqa. - #sync_profile $p4pqa - #sync_profile $bsdb - #sync_profile $wangcs - #sync_profile $settle - sync_profile test8.corp.alimama.com - - # alimama testing. - #group_sync_profile test 1 6 .corp.alimama.com - #group_sync_profile test 8 9 .corp.alimama.com - #group_sync_profile dev 1 5 .corp.alimama.com - #group_sync_profile db 1 2 .corp.alimama.com - - #sync_profile $mm3vm1 - #sync_profile $mm3vm2 - #sync_profile $mm3vm3 - #sync_profile $mm3vm4 - #sync_profile $mm8vm1 - #sync_profile $mm8vm2 - #sync_profile $mm8vm3 - #sync_profile $mm8vm4 - - # imatch test. - #group_sync_profile imtest 1 3 .corp.cnb rm profile.tar.gz } diff --git a/vim/colors/molokai.vim b/vim/colors/molokai.vim new file mode 100644 index 0000000..d4d779c --- /dev/null +++ b/vim/colors/molokai.vim @@ -0,0 +1,220 @@ +" Vim color file +" +" Author: Tomas Restrepo +" +" Note: Based on the monokai theme for textmate +" by Wimer Hazenberg and its darker variant +" by Hamish Stuart Macpherson +" + +hi clear + +set background=dark +if version > 580 + " no guarantees for version 5.8 and below, but this makes it stop + " complaining + hi clear + if exists("syntax_on") + syntax reset + endif +endif +let g:colors_name="molokai" + +if exists("g:molokai_original") + let s:molokai_original = g:molokai_original +else + let s:molokai_original = 0 +endif + + +hi Boolean guifg=#AE81FF +hi Character guifg=#E6DB74 +hi Number guifg=#AE81FF +hi String guifg=#E6DB74 +hi Conditional guifg=#F92672 gui=bold +hi Constant guifg=#AE81FF gui=bold +hi Cursor guifg=#000000 guibg=#F8F8F0 +hi Debug guifg=#BCA3A3 gui=bold +hi Define guifg=#66D9EF +hi Delimiter guifg=#8F8F8F +hi DiffAdd guibg=#13354A +hi DiffChange guifg=#89807D guibg=#4C4745 +hi DiffDelete guifg=#960050 guibg=#1E0010 +hi DiffText guibg=#4C4745 gui=italic,bold + +hi Directory guifg=#A6E22E gui=bold +hi Error guifg=#960050 guibg=#1E0010 +hi ErrorMsg guifg=#F92672 guibg=#232526 gui=bold +hi Exception guifg=#A6E22E gui=bold +hi Float guifg=#AE81FF +hi FoldColumn guifg=#465457 guibg=#000000 +hi Folded guifg=#465457 guibg=#000000 +hi Function guifg=#A6E22E +hi Identifier guifg=#FD971F +hi Ignore guifg=#808080 guibg=bg +hi IncSearch guifg=#C4BE89 guibg=#000000 + +hi Keyword guifg=#F92672 gui=bold +hi Label guifg=#E6DB74 gui=none +hi Macro guifg=#C4BE89 gui=italic +hi SpecialKey guifg=#66D9EF gui=italic + +hi MatchParen guifg=#000000 guibg=#FD971F gui=bold +hi ModeMsg guifg=#E6DB74 +hi MoreMsg guifg=#E6DB74 +hi Operator guifg=#F92672 + +" complete menu +hi Pmenu guifg=#66D9EF guibg=#000000 +hi PmenuSel guibg=#808080 +hi PmenuSbar guibg=#080808 +hi PmenuThumb guifg=#66D9EF + +hi PreCondit guifg=#A6E22E gui=bold +hi PreProc guifg=#A6E22E +hi Question guifg=#66D9EF +hi Repeat guifg=#F92672 gui=bold +hi Search guifg=#FFFFFF guibg=#455354 +" marks column +hi SignColumn guifg=#A6E22E guibg=#232526 +hi SpecialChar guifg=#F92672 gui=bold +hi SpecialComment guifg=#465457 gui=bold +hi Special guifg=#66D9EF guibg=bg gui=italic +if has("spell") + hi SpellBad guisp=#FF0000 gui=undercurl + hi SpellCap guisp=#7070F0 gui=undercurl + hi SpellLocal guisp=#70F0F0 gui=undercurl + hi SpellRare guisp=#FFFFFF gui=undercurl +endif +hi Statement guifg=#F92672 gui=bold +hi StatusLine guifg=#455354 guibg=fg +hi StatusLineNC guifg=#808080 guibg=#080808 +hi StorageClass guifg=#FD971F gui=italic +hi Structure guifg=#66D9EF +hi Tag guifg=#F92672 gui=italic +hi Title guifg=#ef5939 +hi Todo guifg=#FFFFFF guibg=bg gui=bold + +hi Typedef guifg=#66D9EF +hi Type guifg=#66D9EF gui=none +hi Underlined guifg=#808080 gui=underline + +hi VertSplit guifg=#808080 guibg=#080808 gui=bold +hi VisualNOS guibg=#403D3D +hi Visual guibg=#403D3D +hi WarningMsg guifg=#FFFFFF guibg=#333333 gui=bold +hi WildMenu guifg=#66D9EF guibg=#000000 + +if s:molokai_original == 1 + hi Normal guifg=#F8F8F2 guibg=#272822 + hi Comment guifg=#75715E + hi CursorLine guibg=#3E3D32 + hi CursorColumn guibg=#3E3D32 + hi ColorColumn guibg=#3B3A32 + hi LineNr guifg=#BCBCBC guibg=#3B3A32 + hi NonText guifg=#75715E + hi SpecialKey guifg=#75715E +else + hi Normal guifg=#F8F8F2 guibg=#1B1D1E + hi Comment guifg=#465457 + hi CursorLine guibg=#293739 + hi CursorColumn guibg=#293739 + hi ColorColumn guibg=#232526 + hi LineNr guifg=#465457 guibg=#232526 + hi NonText guifg=#465457 + hi SpecialKey guifg=#465457 +end + +" +" Support for 256-color terminal +" +if &t_Co > 255 + if s:molokai_original == 1 + hi Normal ctermbg=234 + hi CursorLine ctermbg=235 cterm=none + else + hi Normal ctermfg=252 ctermbg=233 + hi CursorLine ctermbg=234 cterm=none + endif + hi Boolean ctermfg=135 + hi Character ctermfg=144 + hi Number ctermfg=135 + hi String ctermfg=144 + hi Conditional ctermfg=161 cterm=bold + hi Constant ctermfg=135 cterm=bold + hi Cursor ctermfg=16 ctermbg=253 + hi Debug ctermfg=225 cterm=bold + hi Define ctermfg=81 + hi Delimiter ctermfg=241 + + hi DiffAdd ctermbg=24 + hi DiffChange ctermfg=181 ctermbg=239 + hi DiffDelete ctermfg=162 ctermbg=53 + hi DiffText ctermbg=102 cterm=bold + + hi Directory ctermfg=118 cterm=bold + hi Error ctermfg=219 ctermbg=89 + hi ErrorMsg ctermfg=199 ctermbg=16 cterm=bold + hi Exception ctermfg=118 cterm=bold + hi Float ctermfg=135 + hi FoldColumn ctermfg=67 ctermbg=16 + hi Folded ctermfg=67 ctermbg=16 + hi Function ctermfg=118 + hi Identifier ctermfg=208 cterm=none + hi Ignore ctermfg=244 ctermbg=232 + hi IncSearch ctermfg=193 ctermbg=16 + + hi Keyword ctermfg=161 cterm=bold + hi Label ctermfg=229 cterm=none + hi Macro ctermfg=193 + hi SpecialKey ctermfg=81 + + hi MatchParen ctermfg=16 ctermbg=208 cterm=bold + hi ModeMsg ctermfg=229 + hi MoreMsg ctermfg=229 + hi Operator ctermfg=161 + + " complete menu + hi Pmenu ctermfg=81 ctermbg=16 + hi PmenuSel ctermbg=244 + hi PmenuSbar ctermbg=232 + hi PmenuThumb ctermfg=81 + + hi PreCondit ctermfg=118 cterm=bold + hi PreProc ctermfg=118 + hi Question ctermfg=81 + hi Repeat ctermfg=161 cterm=bold + hi Search ctermfg=253 ctermbg=66 + + " marks column + hi SignColumn ctermfg=118 ctermbg=235 + hi SpecialChar ctermfg=161 cterm=bold + hi SpecialComment ctermfg=245 cterm=bold + hi Special ctermfg=81 ctermbg=232 + + hi Statement ctermfg=161 cterm=bold + hi StatusLine ctermfg=238 ctermbg=253 + hi StatusLineNC ctermfg=244 ctermbg=232 + hi StorageClass ctermfg=208 + hi Structure ctermfg=81 + hi Tag ctermfg=161 + hi Title ctermfg=166 + hi Todo ctermfg=231 ctermbg=232 cterm=bold + + hi Typedef ctermfg=81 + hi Type ctermfg=81 cterm=none + hi Underlined ctermfg=244 cterm=underline + + hi VertSplit ctermfg=244 ctermbg=232 cterm=bold + hi VisualNOS ctermbg=238 + hi Visual ctermbg=235 + hi WarningMsg ctermfg=231 ctermbg=238 cterm=bold + hi WildMenu ctermfg=81 ctermbg=16 + + hi Comment ctermfg=59 + hi CursorColumn ctermbg=234 + hi ColorColumn ctermbg=234 + hi LineNr ctermfg=250 ctermbg=234 + hi NonText ctermfg=59 + hi SpecialKey ctermfg=59 +end diff --git a/vim/plug_tar/pydiction-1.2.zip b/vim/plug_tar/pydiction-1.2.zip deleted file mode 100644 index 3ca29bf..0000000 Binary files a/vim/plug_tar/pydiction-1.2.zip and /dev/null differ diff --git a/vim/vimrc b/vim/vimrc index 31a638e..fe439c6 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -1,7 +1,9 @@ "config begin "impressive : http://amix.dk/vim/vimrc.html +"========================================== "General +"========================================== " history存储长度。 set history=1000 @@ -26,6 +28,13 @@ set nobackup set nowb set noswapfile +"粘贴时保持格式 +set paste +"- 则点击光标不会换,用于复制 +set mouse-=a " 在所有的模式下面打开鼠标。 +set selection=exclusive +set selectmode=mouse,key + " No annoying sound on errors " 去掉输入错误的提示声音 set noerrorbells @@ -34,14 +43,44 @@ set t_vb= set tm=500 +"========================================== " show and format +"========================================== "显示行号: set number set nowrap " 取消换行。 - ""为方便复制,用开启/关闭行号显示: nnoremap :set nonumber!:set foldcolumn=0 + +"括号配对情况 +set showmatch +" How many tenths of a second to blink when matching brackets +set mat=2 + +"设置文内智能搜索提示 +" 高亮search命中的文本。 +set hlsearch +" 搜索时忽略大小写 +set ignorecase +" 随着键入即时搜索 +set incsearch +" 有一个或以上大写字母时仍大小写敏感 +set smartcase + +" 代码折叠 +set foldenable +" 折叠方法 +" manual 手工折叠 +" indent 使用缩进表示折叠 +" expr 使用表达式定义折叠 +" syntax 使用语法定义折叠 +" diff 对没有更改的文本进行折叠 +" marker 使用标记进行折叠, 默认标记是 {{{ 和 }}} +set foldmethod=syntax +" 在左侧显示折叠的层次 +"set foldcolumn=4 + set tabstop=4 " 设置Tab键的宽度 [等同的空格个数] set shiftwidth=4 set expandtab " 将Tab自动转化成空格 [需要输入真正的Tab键时,使用 Ctrl+V + Tab] @@ -51,7 +90,9 @@ set softtabstop=4 set ai "Auto indent set si "Smart indent +"========================================== " status +"========================================== "显示当前的行号列号: set ruler ""在状态栏显示正在输入的命令 @@ -60,17 +101,33 @@ set showcmd " Set 7 lines to the cursor - when moving vertically using j/k 上下滚动,始终在中间 set so=7 +"set cursorline " 突出显示当前行 +" 命令行(在状态行下)的高度,默认为1,这里是2 +"set cmdheight=2 +"set rulerformat=%20(%2*%<%f%=\ %m%r\ %3l\ %c\ %p%%%) +"set statusline=%F%m%r%h%w\[POS=%l,%v][%p%%]\%{strftime(\"%d/%m/%y\ -\ %H:%M\")} +set statusline=%<%f\ %h%m%r%=%k[%{(&fenc==\"\")?&enc:&fenc}%{(&bomb?\",BOM\":\"\")}]\ %-14.(%l,%c%V%)\ %P +" Always show the status line +"set laststatus=2 + +"========================================== "colors and fonts +"========================================== "开启语法高亮 syntax enable syntax on -"配色方案 +"配色方案 三种,选一个 "colorscheme darkblue " 深蓝色配色方案。 -colorscheme desert " 深蓝色配色方案。 -set background=dark + +"colorscheme desert " 经典配色方案。 +"set background=dark + +"同sublime text2 +colorscheme molokai +set t_Co=256 " Set extra options when running in GUI mode if has("gui_running") @@ -81,7 +138,9 @@ if has("gui_running") endif "set guifont=Monaco:h20 " 字体 && 字号 -" 3 file encode +"========================================== +" file encode +"========================================== " 设置新文件的编码为 UTF-8 set fileencoding=utf8 " 自动判断编码时,依次尝试以下编码: @@ -97,51 +156,13 @@ set formatoptions+=m set formatoptions+=B - -"粘贴时保持格式 -set paste - -"- 则点击光标不会换,用于复制 -set mouse-=a " 在所有的模式下面打开鼠标。 -set selection=exclusive -set selectmode=mouse,key +"========================================== +"others +"========================================== autocmd! bufwritepost _vimrc source % " vimrc文件修改之后自动加载。 windows。 autocmd! bufwritepost .vimrc source % " vimrc文件修改之后自动加载。 linux。 -"set cursorline " 突出显示当前行 - -"括号配对情况 -set showmatch -" How many tenths of a second to blink when matching brackets -set mat=2 - -"set laststatus=2 " 开启状态栏信息 -"设置文内智能搜索提示 - -set hlsearch " 高亮search命中的文本。 -" 搜索时忽略大小写 -set ignorecase -" 随着键入即时搜索 -set incsearch -" 有一个或以上大写字母时仍大小写敏感 -set smartcase - - -" 代码折叠 -set foldenable - -" 折叠方法 -" manual 手工折叠 -" indent 使用缩进表示折叠 -" expr 使用表达式定义折叠 -" syntax 使用语法定义折叠 -" diff 对没有更改的文本进行折叠 -" marker 使用标记进行折叠, 默认标记是 {{{ 和 }}} -set foldmethod=syntax - -" 在左侧显示折叠的层次 -"set foldcolumn=4 " 自动完成 set completeopt=longest,menu @@ -156,33 +177,24 @@ autocmd FileType python set tabstop=4 shiftwidth=4 expandtab autocmd FileType python set omnifunc=pythoncomplete#Complete -" 命令行(在状态行下)的高度,默认为1,这里是2 -"set cmdheight=2 -"set rulerformat=%20(%2*%<%f%=\ %m%r\ %3l\ %c\ %p%%%) -"set statusline=%F%m%r%h%w\[POS=%l,%v][%p%%]\%{strftime(\"%d/%m/%y\ -\ %H:%M\")} -" Always show the status line -"set laststatus=2 - -" Format the status line -"set statusline=\ %{HasPaste()}%F%m%r%h\ %w\ \ CWD:\ %r%{getcwd()}%h\ \ \ Line:\ %l - " Return to last edit position when opening files (You want this!) autocmd BufReadPost * \ if line("'\"") > 0 && line("'\"") <= line("$") | \ exe "normal! g`\"" | \ endif -" Height of the command bar -"set cmdheight=2 - " A buffer becomes hidden when it is abandoned -set hid +"set hid " For regular expressions turn magic on set magic - " Configure backspace so it acts as it should act set backspace=eol,start,indent set whichwrap+=<,>,h,l +"pydiction 1.2 python auto complete +let g:pydiction_location = '~/.vim/tools/pydiction/complete-dict' +"defalut g:pydiction_menu_height == 15 +let g:pydiction_menu_height = 20 +