├── init.vim ├── .gitignore ├── gvimrc ├── install-vimrc.sh ├── install-win32.bat ├── colors ├── wombat.vim ├── vgod.vim ├── railscasts.vim ├── moria.vim ├── wombat256.vim ├── hybrid.vim └── peaksea.vim ├── view └── ~=+kkbox=+kktix_register_queue=+src=+github.com=+kkbox=+kktix_register_queue=+log.go= ├── README.md ├── .gitmodules ├── autoload └── pathogen.vim └── vimrc /init.vim: -------------------------------------------------------------------------------- 1 | vimrc -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.pyc 2 | .netrwhist 3 | -------------------------------------------------------------------------------- /gvimrc: -------------------------------------------------------------------------------- 1 | if has("win32") 2 | au GUIEnter * simalt ~x " 開啟最大化. 3 | endif 4 | 5 | -------------------------------------------------------------------------------- /install-vimrc.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | ln -s ~/.vim ~/.config/nvim 3 | #ln -s .vim/gvimrc .gvimrc 4 | -------------------------------------------------------------------------------- /install-win32.bat: -------------------------------------------------------------------------------- 1 | cd .. 2 | del _vimrc 3 | del _gvimrc 4 | mklink /H _vimrc vimfiles\vimrc 5 | mklink /H _gvimrc vimfiles\gvimrc 6 | -------------------------------------------------------------------------------- /colors/wombat.vim: -------------------------------------------------------------------------------- 1 | " Maintainer: Lars H. Nielsen (dengmao@gmail.com) 2 | " Last Change: January 22 2007 3 | 4 | set background=dark 5 | 6 | hi clear 7 | 8 | if exists("syntax_on") 9 | syntax reset 10 | endif 11 | 12 | let colors_name = "wombat" 13 | 14 | 15 | " Vim >= 7.0 specific colors 16 | if version >= 700 17 | hi CursorLine guibg=#2d2d2d 18 | hi CursorColumn guibg=#2d2d2d 19 | hi MatchParen guifg=#f6f3e8 guibg=#857b6f gui=bold 20 | hi Pmenu guifg=#f6f3e8 guibg=#444444 21 | hi PmenuSel guifg=#000000 guibg=#cae682 22 | endif 23 | 24 | " General colors 25 | hi Cursor guifg=NONE guibg=#656565 gui=none 26 | hi Normal guifg=#f6f3e8 guibg=#242424 gui=none 27 | hi NonText guifg=#808080 guibg=#303030 gui=none 28 | hi LineNr guifg=#857b6f guibg=#000000 gui=none 29 | hi StatusLine guifg=#f6f3e8 guibg=#444444 gui=italic 30 | hi StatusLineNC guifg=#857b6f guibg=#444444 gui=none 31 | hi VertSplit guifg=#444444 guibg=#444444 gui=none 32 | hi Folded guibg=#384048 guifg=#a0a8b0 gui=none 33 | hi Title guifg=#f6f3e8 guibg=NONE gui=bold 34 | hi Visual guifg=#f6f3e8 guibg=#444444 gui=none 35 | hi SpecialKey guifg=#808080 guibg=#343434 gui=none 36 | 37 | " Syntax highlighting 38 | hi Comment guifg=#99968b gui=italic 39 | hi Todo guifg=#8f8f8f gui=italic 40 | hi Constant guifg=#e5786d gui=none 41 | hi String guifg=#95e454 gui=italic 42 | hi Identifier guifg=#cae682 gui=none 43 | hi Function guifg=#cae682 gui=none 44 | hi Type guifg=#cae682 gui=none 45 | hi Statement guifg=#8ac6f2 gui=none 46 | hi Keyword guifg=#8ac6f2 gui=none 47 | hi PreProc guifg=#e5786d gui=none 48 | hi Number guifg=#e5786d gui=none 49 | hi Special guifg=#e7f6da gui=none 50 | 51 | 52 | -------------------------------------------------------------------------------- /colors/vgod.vim: -------------------------------------------------------------------------------- 1 | " Color setting { 2 | hi SignColumn ctermfg=White ctermbg=black 3 | hi FoldColumn ctermfg=cyan ctermbg=black 4 | hi Folded ctermfg=7 ctermbg=4 5 | hi SpecialKey term=bold cterm=bold ctermfg=4 6 | hi NonText term=bold cterm=bold ctermfg=4 7 | hi Directory term=bold cterm=bold ctermfg=6 8 | hi ErrorMsg term=standout cterm=bold ctermfg=7 ctermbg=1 9 | hi IncSearch term=reverse cterm=reverse 10 | hi Search term=reverse ctermfg=0 ctermbg=3 11 | hi MoreMsg term=bold cterm=bold ctermfg=2 12 | hi ModeMsg term=bold cterm=bold 13 | hi LineNr term=underline cterm=bold ctermfg=3 14 | hi Question term=standout cterm=bold ctermfg=2 15 | hi StatusLine term=bold,reverse cterm=bold,reverse 16 | hi StatusLineNC term=reverse cterm=reverse 17 | hi Title term=bold cterm=bold ctermfg=5 18 | hi Visual term=reverse cterm=reverse 19 | hi VisualNOS term=bold,underline cterm=bold,underline 20 | hi WarningMsg term=standout cterm=bold ctermfg=1 21 | hi WildMenu term=standout ctermfg=0 ctermbg=3 22 | hi Comment term=bold cterm=bold ctermfg=6 23 | hi Constant term=underline cterm=bold ctermfg=5 24 | hi Special term=bold cterm=bold ctermfg=1 25 | hi Identifier term=underline cterm=bold ctermfg=6 26 | hi Statement term=bold cterm=bold ctermfg=3 27 | hi PreProc term=underline cterm=bold ctermfg=4 28 | hi Type term=underline cterm=bold ctermfg=2 29 | hi Ignore ctermfg=0 30 | hi Error term=reverse cterm=bold ctermfg=7 ctermbg=1 31 | hi Todo term=standout ctermfg=0 ctermbg=3 32 | 33 | hi TabLine guibg=#566676 guifg=fg gui=underline ctermbg=7 34 | hi TabLineFill guibg=#c0d0e0 guifg=bg gui=none 35 | hi TabLineSel guibg=bg guifg=fg gui=bold ctermbg=1 36 | hi Cursor guibg=#cd4e00 guifg=bg gui=none ctermbg=3 37 | hi CursorColumn guibg=#dbdbdb gui=none ctermbg=yellow 38 | hi CursorLine guibg=#dbdbdb gui=none 39 | "highlight Pmenu ctermfg=1 ctermbg=4 guibg=grey30 40 | "hi PmenuSel ctermfg=1 ctermbg=7 guibg=grey30 41 | hi Pmenu ctermfg=251 ctermbg=241 42 | hi PmenuSel ctermfg=Black ctermbg=226 43 | hi PmenuSbar ctermbg=144 44 | hi PmenuThumb ctermfg=81 45 | "} 46 | 47 | -------------------------------------------------------------------------------- /view/~=+kkbox=+kktix_register_queue=+src=+github.com=+kkbox=+kktix_register_queue=+log.go=: -------------------------------------------------------------------------------- 1 | let s:so_save = &so | let s:siso_save = &siso | set so=0 siso=0 2 | argglobal 3 | nnoremap K :GoDoc 4 | xnoremap af :call go#textobj#Function('a') 5 | onoremap af :call go#textobj#Function('a') 6 | nnoremap gd :GoDef 7 | xnoremap if :call go#textobj#Function('i') 8 | onoremap if :call go#textobj#Function('i') 9 | setlocal autoindent 10 | setlocal nobinary 11 | setlocal bufhidden= 12 | setlocal buflisted 13 | setlocal buftype= 14 | setlocal nocindent 15 | setlocal cinkeys=0{,0},0),:,0#,!^F,o,O,e 16 | setlocal cinoptions= 17 | setlocal cinwords=if,else,while,do,for,switch 18 | setlocal colorcolumn= 19 | setlocal comments=s1:/*,mb:*,ex:*/,:// 20 | setlocal commentstring=//\ %s 21 | setlocal complete=.,w,b,u,t,i 22 | setlocal completefunc= 23 | setlocal copyindent 24 | setlocal cryptmethod= 25 | setlocal nocursorbind 26 | setlocal nocursorcolumn 27 | setlocal nocursorline 28 | setlocal define= 29 | setlocal dictionary= 30 | setlocal nodiff 31 | setlocal equalprg= 32 | setlocal errorformat=%-G#\ %.%#,%-G%.%#panic:\ %m,%Ecan't\ load\ package:\ %m,%A%f:%l:%c:\ %m,%A%f:%l:\ %m,%C%*\\s%m,%-G%.%# 33 | setlocal noexpandtab 34 | if &filetype != 'go' 35 | setlocal filetype=go 36 | endif 37 | setlocal foldcolumn=0 38 | setlocal foldenable 39 | setlocal foldexpr=0 40 | setlocal foldignore=# 41 | setlocal foldlevel=0 42 | setlocal foldmarker={{{,}}} 43 | setlocal foldmethod=manual 44 | setlocal foldminlines=1 45 | setlocal foldnestmax=20 46 | setlocal foldtext=foldtext() 47 | setlocal formatexpr= 48 | setlocal formatoptions=cq 49 | setlocal formatlistpat=^\\s*\\d\\+[\\]:.)}\\t\ ]\\s* 50 | setlocal grepprg= 51 | setlocal iminsert=0 52 | setlocal imsearch=0 53 | setlocal include= 54 | setlocal includeexpr= 55 | setlocal indentexpr=GoIndent(v:lnum) 56 | setlocal indentkeys=0{,0},:,0#,!^F,o,O,e,<:>,0=},0=) 57 | setlocal noinfercase 58 | setlocal iskeyword=@,48-57,_,192-255 59 | setlocal keywordprg= 60 | setlocal nolinebreak 61 | setlocal nolisp 62 | setlocal list 63 | setlocal makeprg=go\ build 64 | setlocal matchpairs=(:),{:},[:] 65 | setlocal modeline 66 | setlocal modifiable 67 | setlocal nrformats=octal,hex 68 | setlocal number 69 | setlocal numberwidth=4 70 | setlocal omnifunc=go#complete#Complete 71 | setlocal path= 72 | setlocal nopreserveindent 73 | setlocal nopreviewwindow 74 | setlocal quoteescape=\\ 75 | setlocal noreadonly 76 | setlocal norelativenumber 77 | setlocal noscrollbind 78 | setlocal shiftwidth=4 79 | setlocal noshortname 80 | setlocal nosmartindent 81 | setlocal softtabstop=4 82 | setlocal nospell 83 | setlocal spellcapcheck=[.?!]\\_[\\])'\"\ \ ]\\+ 84 | setlocal spellfile= 85 | setlocal spelllang=en 86 | setlocal statusline=%!airline#statusline(1) 87 | setlocal suffixesadd= 88 | setlocal noswapfile 89 | setlocal synmaxcol=3000 90 | if &syntax != 'go' 91 | setlocal syntax=go 92 | endif 93 | setlocal tabstop=4 94 | setlocal tags= 95 | setlocal textwidth=0 96 | setlocal thesaurus= 97 | setlocal noundofile 98 | setlocal nowinfixheight 99 | setlocal nowinfixwidth 100 | setlocal wrap 101 | setlocal wrapmargin=0 102 | silent! normal! zE 103 | let s:l = 14 - ((13 * winheight(0) + 28) / 56) 104 | if s:l < 1 | let s:l = 1 | endif 105 | exe s:l 106 | normal! zt 107 | 14 108 | normal! 01l 109 | let &so = s:so_save | let &siso = s:siso_save 110 | doautoall SessionLoadPost 111 | " vim: set ft=vim : 112 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | hSATAC's vimrc 2 | ============ 3 | Author: Ash Wu (aka. cAt) 4 | 5 | Forked from vgod's vimrc https://github.com/vgod/vimrc 6 | 7 | HOW TO INSTALL 8 | -------------- 9 | 10 | 1. Check out from github 11 | 12 | * Mac Os/Linux: 13 | 14 | $ git clone https://github.com/hSATAC/vimrc ~/.vim 15 | $ cd ~/.vim 16 | $ git submodule update --init 17 | 18 | * Windows: (or you could checkout into your $VIM if you want to build a portable gvim) 19 | 20 | $ git clone https://github.com/hSATAC/vimrc ~/vimfiles 21 | $ cd ~/vimfiles 22 | $ git submodule update --init 23 | 24 | 2. Install ~/.vimrc and ~/.gvimrc 25 | 26 | * Mac Os/Linux: 27 | 28 | $ ./install-vimrc.sh 29 | 30 | * Windows7: 31 | 32 | > install-win32.bat 33 | 34 | 3. (Optional, if you want taglist) Install the Exuberant Ctags (http://ctags.sourceforge.net/) 35 | 36 | * Mac Os: The built-in ctags is not compitable with taglist.vim 37 | 38 | $ brew install ctags 39 | 40 | * ArchLinux: 41 | sudo pacman -S ctags 42 | 43 | * Windows: 44 | 45 | Download win32 ctags from http://ctags.sourceforge.net/ 46 | put ctags.exe into your $VIM 47 | 48 | UPGRADE PLUGIN BUNDLES 49 | ---------------------- 50 | 51 | All plugins were checked out as git submodules, 52 | which can be upgraded with `git pull`. For example, to upgrade Command-T 53 | 54 | $ cd ~/.vim/bundle/command-t 55 | $ git pull 56 | 57 | // update all bundles 58 | $ git submodule foreach git pull origin master 59 | 60 | HOW TO USE 61 | ---------- 62 | 63 | see the "USEFUL SHORTCUTS" section in vimrc to learn my shortcuts. 64 | 65 | PLUGINS 66 | ------- 67 | 68 | * [Pathogen](http://www.vim.org/scripts/script.php?script_id=2332): Pathogen let us install a plugin as a bundle in ~/.vim/bundle seprately. 69 | 70 | * [matchit](http://www.vim.org/scripts/script.php?script_id=39): extended % matching for HTML, LaTeX, and many other languages. 71 | 72 | * [Nerd Tree](http://www.vim.org/scripts/script.php?script_id=1658): A tree explorer plugin for navigating the filesystem. `` to toggle 73 | 74 | Useful commands: 75 | * `:Bookmark [name]` - bookmark any directory as name 76 | * `:NERDTree [name]` - open the bookmark [name] in Nerd Tree 77 | 78 | * [vim-surround](https://github.com/tpope/vim-surround/blob/master/doc/surround.txt): deal with pairs of surroundings. 79 | 80 | * `ysiw` (you surround in word) 81 | * `cs` (change surround) 82 | * `ds` (delete surround) 83 | * `S` (surrond in visual mode) 84 | 85 | * [SuperTab](http://www.vim.org/scripts/script.php?script_id=1643): Do all your insert-mode completion with Tab. 86 | 87 | * [snipMate](http://www.vim.org/scripts/script.php?script_id=2540): TextMate-style snippets for Vim 88 | 89 | `:help snipMate` to see more info. 90 | 91 | * [VisIncr](http://www.vim.org/scripts/script.php?script_id=670): Produce increasing/decreasing columns of numbers, dates, or daynames. 92 | 93 | * [Zoom](https://github.com/vim-scripts/zoom.vim): Use `+`, `-`, `0` keys to zoom in/out like firefox or macvim. 94 | 95 | * [taglist](https://github.com/vim-scripts/taglist.vim): taglist, list functions, structures. `` to toggle. 96 | 97 | * [tagbar](http://majutsushi.github.com/tagbar/): tagbar, Vim plugin that displays tags in a window, ordered by class etc. `` toggle. 98 | 99 | * [multiple-cursors](https://github.com/terryma/vim-multiple-cursors): `Ctrl + n` to multiple select, `v` to enter visual mode, `i` to enter insert mode. 100 | 101 | * [fugitive](https://github.com/tpope/vim-fugitive): `:Gblame` to view git blame. 102 | 103 | * [startify](https://github.com/mhinz/vim-startify): Start page replacement, shows recent files. 104 | 105 | * [Turbux](https://github.com/jgdavey/vim-turbux): Run ruby tests in tmux window. `r` to run current line or last test, `t` to run whole test file. 106 | 107 | * [Ag](https://github.com/epmatsw/ag.vim), [Ack](https://github.com/mileszs/ack.vi): Better than grep. 108 | 109 | * [Align](https://github.com/vim-scripts/Align): Alignment tool. Add `:AlignHash` for Ruby Hashes. 110 | 111 | * [CtrlP](https://github.com/kien/ctrlp.vim): Fuzzy finder. `f` to search. `Ctrl + x` (sp), `Ctrl + v` (vsp), `Ctrl + t` (tab) 112 | 113 | * [vim-rails](https://github.com/tpope/vim-rails): `A` for alternate file, `R` for related file, `gf` fo partials, fixtures, etc. 114 | 115 | * [vim-gitgutter](https://github.com/airblade/vim-gitgutter): Show git diff in gutter. 116 | 117 | * [SingleCompile](https://github.com/xuhdev/SingleCompile): `` to compile current file. 118 | 119 | * [NerdCommenter](https://github.com/scrooloose/nerdcommenter): `cc` to comment, `cu` to uncomment. `c` to toggle. 120 | 121 | Other good references 122 | --------------------- 123 | 124 | * http://amix.dk/vim/vimrc.html 125 | * http://spf13.com/post/perfect-vimrc-vim-config-file 126 | -------------------------------------------------------------------------------- /colors/railscasts.vim: -------------------------------------------------------------------------------- 1 | " Vim color scheme 2 | " 3 | " Name: railscasts.vim 4 | " Maintainer: Nick Moffitt 5 | " Last Change: 01 Mar 2008 6 | " License: WTFPL 7 | " Version: 2.1 8 | " 9 | " This theme is based on Josh O'Rourke's Vim clone of the railscast 10 | " textmate theme. The key thing I have done here is supply 256-color 11 | " terminal equivalents for as many of the colors as possible, and fixed 12 | " up some of the funny behaviors for editing e-mails and such. 13 | " 14 | " To use for gvim: 15 | " 1: install this file as ~/.vim/colors/railscasts.vim 16 | " 2: put "colorscheme railscasts" in your .gvimrc 17 | " 18 | " If you are using Ubuntu, you can get the benefit of this in your 19 | " terminals using ordinary vim by taking the following steps: 20 | " 21 | " 1: sudo apt-get install ncurses-term 22 | " 2: put the following in your .vimrc 23 | " if $COLORTERM == 'gnome-terminal' 24 | " set term=gnome-256color 25 | " colorscheme railscasts 26 | " else 27 | " colorscheme default 28 | " endif 29 | " 3: if you wish to use this with screen, add the following to your .screenrc: 30 | " attrcolor b ".I" 31 | " termcapinfo xterm 'Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm' 32 | " defbce "on" 33 | " term screen-256color-bce 34 | 35 | set background=dark 36 | hi clear 37 | if exists("syntax_on") 38 | syntax reset 39 | endif 40 | 41 | let g:colors_name = "railscasts" 42 | 43 | hi link htmlTag xmlTag 44 | hi link htmlTagName xmlTagName 45 | hi link htmlEndTag xmlEndTag 46 | 47 | "highlight Normal guifg=#E6E1DC guibg=#111111 48 | highlight Normal guifg=#E6E1DC guibg=#222222 49 | highlight Cursor guifg=#191919 ctermfg=0 guibg=#FFFFFF ctermbg=15 50 | highlight CursorLine guibg=#191919 ctermbg=233 cterm=NONE 51 | 52 | highlight Comment guifg=#BC9458 ctermfg=180 gui=italic 53 | highlight Constant guifg=#6D9CBE ctermfg=73 54 | highlight Define guifg=#CC7833 ctermfg=173 55 | highlight Error guifg=#FFC66D ctermfg=221 guibg=#990000 ctermbg=88 56 | highlight Function guifg=#FFC66D ctermfg=221 gui=NONE cterm=NONE 57 | highlight Identifier guifg=#6D9CBE ctermfg=73 gui=NONE cterm=NONE 58 | highlight Include guifg=#CC7833 ctermfg=173 gui=NONE cterm=NONE 59 | highlight PreCondit guifg=#CC7833 ctermfg=173 gui=NONE cterm=NONE 60 | highlight Keyword guifg=#CC7833 ctermfg=173 cterm=NONE 61 | highlight LineNr guifg=#2B2B2B ctermfg=159 guibg=#C0C0FF 62 | highlight Number guifg=#A5C261 ctermfg=107 63 | highlight PreProc guifg=#E6E1DC ctermfg=103 64 | highlight Search guifg=NONE ctermfg=NONE guibg=#2b2b2b ctermbg=235 gui=italic cterm=underline 65 | highlight Statement guifg=#CC7833 ctermfg=173 gui=NONE cterm=NONE 66 | highlight String guifg=#A5C261 ctermfg=107 67 | highlight Title guifg=#FFFFFF ctermfg=15 68 | highlight Type guifg=#DA4939 ctermfg=167 gui=NONE cterm=NONE 69 | highlight Visual guibg=#5A647E ctermbg=60 70 | 71 | highlight DiffAdd guifg=#E6E1DC ctermfg=7 guibg=#519F50 ctermbg=71 72 | highlight DiffDelete guifg=#E6E1DC ctermfg=7 guibg=#660000 ctermbg=52 73 | highlight Special guifg=#DA4939 ctermfg=167 74 | 75 | highlight pythonBuiltin guifg=#6D9CBE ctermfg=73 gui=NONE cterm=NONE 76 | highlight rubyBlockParameter guifg=#FFFFFF ctermfg=15 77 | highlight rubyClass guifg=#FFFFFF ctermfg=15 78 | highlight rubyConstant guifg=#DA4939 ctermfg=167 79 | highlight rubyInstanceVariable guifg=#D0D0FF ctermfg=189 80 | highlight rubyInterpolation guifg=#519F50 ctermfg=107 81 | highlight rubyLocalVariableOrMethod guifg=#D0D0FF ctermfg=189 82 | highlight rubyPredefinedConstant guifg=#DA4939 ctermfg=167 83 | highlight rubyPseudoVariable guifg=#FFC66D ctermfg=221 84 | highlight rubyStringDelimiter guifg=#A5C261 ctermfg=143 85 | 86 | highlight xmlTag guifg=#E8BF6A ctermfg=179 87 | highlight xmlTagName guifg=#E8BF6A ctermfg=179 88 | highlight xmlEndTag guifg=#E8BF6A ctermfg=179 89 | 90 | highlight mailSubject guifg=#A5C261 ctermfg=107 91 | highlight mailHeaderKey guifg=#FFC66D ctermfg=221 92 | highlight mailEmail guifg=#A5C261 ctermfg=107 gui=italic cterm=underline 93 | 94 | highlight SpellBad guifg=#D70000 ctermfg=160 ctermbg=NONE cterm=underline 95 | highlight SpellRare guifg=#D75F87 ctermfg=168 guibg=NONE ctermbg=NONE gui=underline cterm=underline 96 | highlight SpellCap guifg=#D0D0FF ctermfg=189 guibg=NONE ctermbg=NONE gui=underline cterm=underline 97 | highlight MatchParen guifg=#FFFFFF ctermfg=15 guibg=#005f5f ctermbg=23 98 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "bundle/surround"] 2 | path = bundle/surround 3 | url = https://github.com/tpope/vim-surround.git 4 | ignore = untracked 5 | [submodule "bundle/VisIncr"] 6 | path = bundle/VisIncr 7 | url = https://github.com/vim-scripts/VisIncr.git 8 | ignore = untracked 9 | [submodule "bundle/matchit"] 10 | path = bundle/matchit 11 | url = https://github.com/vim-scripts/matchit.zip.git 12 | ignore = untracked 13 | [submodule "bundle/nerdtree"] 14 | path = bundle/nerdtree 15 | url = https://github.com/scrooloose/nerdtree.git 16 | ignore = untracked 17 | [submodule "bundle/nerdcommenter"] 18 | path = bundle/nerdcommenter 19 | url = https://github.com/scrooloose/nerdcommenter.git 20 | ignore = untracked 21 | [submodule "bundle/taglist"] 22 | path = bundle/taglist 23 | url = https://github.com/vim-scripts/taglist.vim.git 24 | ignore = untracked 25 | [submodule "bundle/tagbar"] 26 | path = bundle/tagbar 27 | url = git://github.com/majutsushi/tagbar 28 | ignore = untracked 29 | [submodule "bundle/gist-vim"] 30 | path = bundle/gist-vim 31 | url = https://github.com/mattn/gist-vim 32 | ignore = untracked 33 | [submodule "bundle/ack"] 34 | path = bundle/ack 35 | url = https://github.com/mileszs/ack.vim.git 36 | ignore = untracked 37 | [submodule "bundle/gocode"] 38 | path = bundle/gocode 39 | url = https://github.com/golangtw/gocode.vim.git 40 | ignore = untracked 41 | [submodule "bundle/go.vim"] 42 | path = bundle/go.vim 43 | url = https://github.com/golangtw/go.vim.git 44 | ignore = untracked 45 | [submodule "bundle/SingleCompile"] 46 | path = bundle/SingleCompile 47 | url = https://github.com/xuhdev/SingleCompile.git 48 | ignore = untracked 49 | [submodule "bundle/vim-gitgutter"] 50 | path = bundle/vim-gitgutter 51 | url = https://github.com/airblade/vim-gitgutter.git 52 | ignore = untracked 53 | [submodule "bundle/vim-rails"] 54 | path = bundle/vim-rails 55 | url = https://github.com/tpope/vim-rails.git 56 | ignore = untracked 57 | [submodule "bundle/ctrlp"] 58 | path = bundle/ctrlp 59 | url = https://github.com/kien/ctrlp.vim.git 60 | ignore = untracked 61 | [submodule "bundle/align"] 62 | path = bundle/align 63 | url = https://github.com/vim-scripts/Align.git 64 | ignore = untracked 65 | [submodule "bundle/ag"] 66 | path = bundle/ag 67 | url = https://github.com/epmatsw/ag.vim.git 68 | ignore = untracked 69 | [submodule "bundle/tslime"] 70 | path = bundle/tslime 71 | url = https://github.com/jgdavey/tslime.vim.git 72 | ignore = untracked 73 | [submodule "bundle/vim-turbux"] 74 | path = bundle/vim-turbux 75 | url = https://github.com/jgdavey/vim-turbux.git 76 | ignore = untracked 77 | [submodule "bundle/startify"] 78 | path = bundle/startify 79 | url = https://github.com/mhinz/vim-startify.git 80 | ignore = untracked 81 | [submodule "bundle/vim-fugitive"] 82 | path = bundle/vim-fugitive 83 | url = https://github.com/tpope/vim-fugitive.git 84 | ignore = untracked 85 | [submodule "bundle/vim-multiple-cursors"] 86 | path = bundle/vim-multiple-cursors 87 | url = https://github.com/terryma/vim-multiple-cursors.git 88 | ignore = untracked 89 | [submodule "bundle/vim-coffee"] 90 | path = bundle/vim-coffee 91 | url = https://github.com/kchmck/vim-coffee-script.git 92 | ignore = untracked 93 | [submodule "bundle/tlib_vim"] 94 | path = bundle/tlib_vim 95 | url = https://github.com/tomtom/tlib_vim.git 96 | ignore = untracked 97 | [submodule "bundle/vim-addon-mw-utils"] 98 | path = bundle/vim-addon-mw-utils 99 | url = https://github.com/MarcWeber/vim-addon-mw-utils.git 100 | ignore = untracked 101 | [submodule "bundle/vim-ruby-refactoring"] 102 | path = bundle/vim-ruby-refactoring 103 | url = https://github.com/ecomba/vim-ruby-refactoring.git 104 | ignore = untracked 105 | [submodule "bundle/switch.vim"] 106 | path = bundle/switch.vim 107 | url = https://github.com/AndrewRadev/switch.vim.git 108 | ignore = untracked 109 | [submodule "bundle/rspec-vim"] 110 | path = bundle/rspec-vim 111 | url = git@github.com:hSATAC/rspec.vim.git 112 | ignore = untracked 113 | [submodule "bundle/vim-indent-guides"] 114 | path = bundle/vim-indent-guides 115 | url = https://github.com/nathanaelkane/vim-indent-guides.git 116 | ignore = untracked 117 | [submodule "bundle/vim-airline"] 118 | path = bundle/vim-airline 119 | url = https://github.com/bling/vim-airline.git 120 | ignore = untracked 121 | [submodule "bundle/vim-easymotion"] 122 | path = bundle/vim-easymotion 123 | url = https://github.com/Lokaltog/vim-easymotion.git 124 | ignore = untracked 125 | [submodule "bundle/xterm-color-table"] 126 | path = bundle/xterm-color-table 127 | url = https://github.com/guns/xterm-color-table.vim.git 128 | ignore = untracked 129 | [submodule "bundle/vim-nerdtree-tabs"] 130 | path = bundle/vim-nerdtree-tabs 131 | url = https://github.com/jistr/vim-nerdtree-tabs.git 132 | ignore = untracked 133 | [submodule "bundle/undotree"] 134 | path = bundle/undotree 135 | url = https://github.com/mbbill/undotree.git 136 | ignore = untracked 137 | [submodule "bundle/vim-gocode-blackrush"] 138 | path = bundle/vim-gocode-blackrush 139 | url = git@github.com:Blackrush/vim-gocode.git 140 | [submodule "bundle/puppet"] 141 | path = bundle/puppet 142 | url = git://github.com/rodjek/vim-puppet.git 143 | [submodule "bundle/tabular"] 144 | path = bundle/tabular 145 | url = https://github.com/godlygeek/tabular.git 146 | [submodule "bundle/vim-buggergator"] 147 | path = bundle/vim-buffergator 148 | url = https://github.com/jeetsukumaran/vim-buffergator 149 | [submodule "bundle/syntastic"] 150 | path = bundle/syntastic 151 | url = https://github.com/scrooloose/syntastic.git 152 | [submodule "bundle/vim-diff-enhanced"] 153 | path = bundle/vim-diff-enhanced 154 | url = https://github.com/chrisbra/vim-diff-enhanced.git 155 | [submodule "bundle/vim-go"] 156 | path = bundle/vim-go 157 | url = https://github.com/fatih/vim-go.git 158 | [submodule "bundle/fish.vim"] 159 | path = bundle/fish.vim 160 | url = https://github.com/Soares/fish.vim.git 161 | [submodule "bundle/gruvbox"] 162 | path = bundle/gruvbox 163 | url = https://github.com/morhetz/gruvbox.git 164 | [submodule "bundle/YouCompleteMe"] 165 | path = bundle/YouCompleteMe 166 | url = https://github.com/Valloric/YouCompleteMe.git 167 | [submodule "bundle/neosnippet"] 168 | path = bundle/neosnippet 169 | url = https://github.com/Shougo/neosnippet.vim.git 170 | [submodule "bundle/neosnippet-snippets"] 171 | path = bundle/neosnippet-snippets 172 | url = https://github.com/Shougo/neosnippet-snippets.git 173 | [submodule "bundle/nginx-contrib-vim"] 174 | path = bundle/nginx-contrib-vim 175 | url = https://github.com/moskytw/nginx-contrib-vim 176 | [submodule "bundle/vim-coloresque"] 177 | path = bundle/vim-coloresque 178 | url = https://github.com/gorodinskiy/vim-coloresque 179 | [submodule "bundle/vim-terraform"] 180 | path = bundle/vim-terraform 181 | url = https://github.com/hashivim/vim-terraform.git 182 | [submodule "bundle/alchmist.vim"] 183 | path = bundle/alchmist.vim 184 | url = https://github.com/slashmili/alchemist.vim 185 | [submodule "bundle/vim-elixir"] 186 | path = bundle/vim-elixir 187 | url = https://github.com/elixir-lang/vim-elixir.git 188 | -------------------------------------------------------------------------------- /colors/moria.vim: -------------------------------------------------------------------------------- 1 | if exists("g:moria_style") 2 | let s:moria_style = g:moria_style 3 | else 4 | let s:moria_style = &background 5 | endif 6 | 7 | execute "command! -nargs=1 Colo let g:moria_style = \"\" | colo moria" 8 | 9 | if s:moria_style == 'dark' 10 | set background=dark 11 | elseif s:moria_style == 'light' 12 | set background=light 13 | else 14 | let s:moria_style = &background 15 | endif 16 | 17 | hi clear 18 | 19 | if exists("syntax_on") 20 | syntax reset 21 | endif 22 | 23 | let colors_name = "moria" 24 | 25 | if s:moria_style == "dark" 26 | hi Normal ctermbg=0 ctermfg=7 guibg=#202020 guifg=#d0d0d0 gui=none 27 | 28 | hi Cursor guibg=#ffa500 guifg=bg gui=none 29 | hi CursorColumn guibg=#444444 gui=none 30 | hi CursorLine guibg=#444444 gui=none 31 | hi DiffAdd guibg=#008b00 guifg=fg gui=none 32 | hi DiffChange guibg=#00008b guifg=fg gui=none 33 | hi DiffDelete guibg=#8b0000 guifg=fg gui=none 34 | hi DiffText guibg=#0000cd guifg=fg gui=bold 35 | hi Directory guibg=bg guifg=#1e90ff gui=none 36 | hi ErrorMsg guibg=#ee2c2c guifg=#ffffff gui=bold 37 | hi FoldColumn ctermbg=bg guibg=bg guifg=#a0b0c0 gui=none 38 | hi Folded guibg=#585858 guifg=#c0d0e0 gui=none 39 | hi IncSearch guibg=#e0cd78 guifg=#000000 gui=none 40 | hi LineNr guifg=#a0b0c0 gui=none 41 | hi ModeMsg guibg=bg guifg=fg gui=bold 42 | hi MoreMsg guibg=bg guifg=#d0d097 gui=bold 43 | hi NonText ctermfg=8 guibg=bg guifg=#a0b0c0 gui=bold 44 | hi Pmenu guibg=#8090a0 guifg=#000000 gui=none 45 | hi PmenuSbar guibg=#607080 guifg=fg gui=none 46 | hi PmenuSel guibg=#e0e000 guifg=#000000 gui=none 47 | hi PmenuThumb guibg=#c0d0e0 guifg=bg gui=none 48 | hi Question guibg=bg guifg=#e0c07e gui=bold 49 | hi Search guibg=#90e090 guifg=#000000 gui=none 50 | hi SignColumn ctermbg=bg guibg=bg guifg=#a0a0a0 gui=none 51 | hi SpecialKey guibg=bg guifg=#e0c07e gui=none 52 | if has("spell") 53 | hi SpellBad guisp=#ee2c2c gui=undercurl 54 | hi SpellCap guisp=#2c2cee gui=undercurl 55 | hi SpellLocal guisp=#2ceeee gui=undercurl 56 | hi SpellRare guisp=#ee2cee gui=undercurl 57 | endif 58 | hi StatusLine ctermbg=7 ctermfg=0 guibg=#485868 guifg=fg gui=bold 59 | hi StatusLineNC ctermbg=8 ctermfg=0 guibg=#304050 guifg=fg gui=none 60 | hi TabLine guibg=#566676 guifg=fg gui=underline 61 | hi TabLineFill guibg=#c0d0e0 guifg=bg gui=none 62 | hi TabLineSel guibg=bg guifg=fg gui=bold 63 | hi Title ctermbg=0 ctermfg=15 guifg=fg gui=bold 64 | hi VertSplit ctermbg=7 ctermfg=0 guibg=#304050 guifg=fg gui=none 65 | if version >= 700 66 | hi Visual ctermbg=7 ctermfg=0 guibg=#607080 gui=none 67 | else 68 | hi Visual ctermbg=7 ctermfg=0 guibg=#607080 guifg=fg gui=none 69 | endif 70 | hi VisualNOS guibg=bg guifg=#90a0b0 gui=bold,underline 71 | hi WarningMsg guibg=bg guifg=#ee2c2c gui=bold 72 | hi WildMenu guibg=#e0e000 guifg=#000000 gui=bold 73 | 74 | hi Comment guibg=bg guifg=#d0d0a0 gui=none 75 | hi Constant guibg=bg guifg=#87df71 gui=none 76 | hi Error guibg=bg guifg=#ee2c2c gui=none 77 | hi Identifier guibg=bg guifg=#7ee0ce gui=none 78 | hi Ignore guibg=bg guifg=bg gui=none 79 | hi lCursor guibg=#00e700 guifg=#000000 gui=none 80 | hi MatchParen guibg=#008b8b gui=none 81 | hi PreProc guibg=bg guifg=#d7a0d7 gui=none 82 | hi Special guibg=bg guifg=#e0c07e gui=none 83 | hi Statement guibg=bg guifg=#7ec0ee gui=none 84 | hi Todo guibg=#e0e000 guifg=#000000 gui=none 85 | hi Type guibg=bg guifg=#f09479 gui=none 86 | hi Underlined guibg=bg guifg=#00a0ff gui=underline 87 | 88 | hi htmlBold ctermbg=0 ctermfg=15 guibg=bg guifg=fg gui=bold 89 | hi htmlItalic ctermbg=0 ctermfg=15 guibg=bg guifg=fg gui=italic 90 | hi htmlUnderline ctermbg=0 ctermfg=15 guibg=bg guifg=fg gui=underline 91 | hi htmlBoldItalic ctermbg=0 ctermfg=15 guibg=bg guifg=fg gui=bold,italic 92 | hi htmlBoldUnderline ctermbg=0 ctermfg=15 guibg=bg guifg=fg gui=bold,underline 93 | hi htmlBoldUnderlineItalic ctermbg=0 ctermfg=15 guibg=bg guifg=fg gui=bold,underline,italic 94 | hi htmlUnderlineItalic ctermbg=0 ctermfg=15 guibg=bg guifg=fg gui=underline,italic 95 | elseif s:moria_style == "light" 96 | hi Normal ctermbg=15 ctermfg=0 guibg=#ffffff guifg=#000000 gui=none 97 | 98 | hi Cursor guibg=#cd4e00 guifg=bg gui=none 99 | hi CursorColumn guibg=#dbdbdb gui=none 100 | hi CursorLine guibg=#dbdbdb gui=none 101 | hi DiffAdd guibg=#008b00 guifg=#ffffff gui=none 102 | hi DiffChange guibg=#00008b guifg=#ffffff gui=none 103 | hi DiffDelete guibg=#8b0000 guifg=#ffffff gui=none 104 | hi DiffText guibg=#0000cd guifg=#ffffff gui=bold 105 | hi Directory guibg=bg guifg=#0000f0 gui=none 106 | hi ErrorMsg guibg=#ee2c2c guifg=#ffffff gui=bold 107 | hi FoldColumn ctermbg=bg guibg=bg guifg=#506070 gui=none 108 | hi Folded guibg=#c8c8c8 guifg=fg gui=none 109 | hi IncSearch guibg=#ffcd78 gui=none 110 | hi LineNr guifg=#506070 gui=none 111 | hi ModeMsg ctermbg=15 ctermfg=0 guibg=bg guifg=fg gui=bold 112 | hi MoreMsg guibg=bg guifg=#1f3f81 gui=bold 113 | hi NonText ctermfg=8 guibg=bg guifg=#506070 gui=bold 114 | hi Pmenu guibg=#8a9aaa guifg=#000000 gui=none 115 | hi PmenuSbar guibg=#708090 guifg=fg gui=none 116 | hi PmenuSel guibg=#ffff00 guifg=#000000 gui=none 117 | hi PmenuThumb guibg=#b0c0d0 guifg=fg gui=none 118 | hi Question guibg=bg guifg=#813f11 gui=bold 119 | hi Search guibg=#a0f0a0 gui=none 120 | hi SignColumn ctermbg=bg guibg=bg guifg=#707070 gui=none 121 | hi SpecialKey guibg=bg guifg=#912f11 gui=none 122 | if has("spell") 123 | hi SpellBad guisp=#ee2c2c gui=undercurl 124 | hi SpellCap guisp=#2c2cee gui=undercurl 125 | hi SpellLocal guisp=#008b8b gui=undercurl 126 | hi SpellRare guisp=#ee2cee gui=undercurl 127 | endif 128 | hi StatusLine ctermbg=0 ctermfg=15 guibg=#a8b8c8 guifg=fg gui=bold 129 | hi StatusLineNC ctermbg=7 ctermfg=0 guibg=#b8c8d8 guifg=fg gui=none 130 | hi TabLine guibg=#b4c4d4 guifg=fg gui=underline 131 | hi TabLineFill guibg=fg guifg=bg gui=none 132 | hi TabLineSel guibg=bg guifg=fg gui=bold 133 | hi Title guifg=fg gui=bold 134 | hi VertSplit ctermbg=7 ctermfg=0 guibg=#b8c8d8 guifg=fg gui=none 135 | if version >= 700 136 | hi Visual ctermbg=7 ctermfg=0 guibg=#c8d8e8 gui=none 137 | else 138 | hi Visual ctermbg=7 ctermfg=0 guibg=#c8d8e8 guifg=fg gui=none 139 | endif 140 | hi VisualNOS guibg=bg guifg=#90a0b0 gui=bold,underline 141 | hi WarningMsg guibg=bg guifg=#ee2c2c gui=bold 142 | hi WildMenu guibg=#ffff00 guifg=fg gui=bold 143 | 144 | hi Comment guibg=bg guifg=#786000 gui=none 145 | hi Constant guibg=bg guifg=#077807 gui=none 146 | hi Error guibg=bg guifg=#ee2c2c gui=none 147 | hi Identifier guibg=bg guifg=#007080 gui=none 148 | hi Ignore guibg=bg guifg=bg gui=none 149 | hi lCursor guibg=#008000 guifg=#ffffff gui=none 150 | hi MatchParen guibg=#00ffff gui=none 151 | hi PreProc guibg=bg guifg=#800090 gui=none 152 | hi Special guibg=bg guifg=#912f11 gui=none 153 | hi Statement guibg=bg guifg=#1f3f81 gui=bold 154 | hi Todo guibg=#ffff00 guifg=fg gui=none 155 | hi Type guibg=bg guifg=#912f11 gui=bold 156 | hi Underlined guibg=bg guifg=#0000cd gui=underline 157 | 158 | hi htmlBold guibg=bg guifg=fg gui=bold 159 | hi htmlItalic guibg=bg guifg=fg gui=italic 160 | hi htmlUnderline guibg=bg guifg=fg gui=underline 161 | hi htmlBoldItalic guibg=bg guifg=fg gui=bold,italic 162 | hi htmlBoldUnderline guibg=bg guifg=fg gui=bold,underline 163 | hi htmlBoldUnderlineItalic guibg=bg guifg=fg gui=bold,underline,italic 164 | hi htmlUnderlineItalic guibg=bg guifg=fg gui=underline,italic 165 | endif 166 | -------------------------------------------------------------------------------- /colors/wombat256.vim: -------------------------------------------------------------------------------- 1 | " Vim color file 2 | " Maintainer: David Liang (bmdavll at gmail dot com) 3 | " Last Change: November 28 2008 4 | " 5 | " wombat256.vim - a modified version of Wombat by Lars Nielsen that also 6 | " works on xterms with 88 or 256 colors. The algorithm for approximating the 7 | " GUI colors with the xterm palette is from desert256.vim by Henry So Jr. 8 | 9 | set background=dark 10 | 11 | if version > 580 12 | hi clear 13 | if exists("syntax_on") 14 | syntax reset 15 | endif 16 | endif 17 | 18 | let g:colors_name = "wombat256" 19 | 20 | if !has("gui_running") && &t_Co != 88 && &t_Co != 256 21 | finish 22 | endif 23 | 24 | " functions {{{ 25 | " returns an approximate grey index for the given grey level 26 | fun grey_number(x) 27 | if &t_Co == 88 28 | if a:x < 23 29 | return 0 30 | elseif a:x < 69 31 | return 1 32 | elseif a:x < 103 33 | return 2 34 | elseif a:x < 127 35 | return 3 36 | elseif a:x < 150 37 | return 4 38 | elseif a:x < 173 39 | return 5 40 | elseif a:x < 196 41 | return 6 42 | elseif a:x < 219 43 | return 7 44 | elseif a:x < 243 45 | return 8 46 | else 47 | return 9 48 | endif 49 | else 50 | if a:x < 14 51 | return 0 52 | else 53 | let l:n = (a:x - 8) / 10 54 | let l:m = (a:x - 8) % 10 55 | if l:m < 5 56 | return l:n 57 | else 58 | return l:n + 1 59 | endif 60 | endif 61 | endif 62 | endfun 63 | 64 | " returns the actual grey level represented by the grey index 65 | fun grey_level(n) 66 | if &t_Co == 88 67 | if a:n == 0 68 | return 0 69 | elseif a:n == 1 70 | return 46 71 | elseif a:n == 2 72 | return 92 73 | elseif a:n == 3 74 | return 115 75 | elseif a:n == 4 76 | return 139 77 | elseif a:n == 5 78 | return 162 79 | elseif a:n == 6 80 | return 185 81 | elseif a:n == 7 82 | return 208 83 | elseif a:n == 8 84 | return 231 85 | else 86 | return 255 87 | endif 88 | else 89 | if a:n == 0 90 | return 0 91 | else 92 | return 8 + (a:n * 10) 93 | endif 94 | endif 95 | endfun 96 | 97 | " returns the palette index for the given grey index 98 | fun grey_color(n) 99 | if &t_Co == 88 100 | if a:n == 0 101 | return 16 102 | elseif a:n == 9 103 | return 79 104 | else 105 | return 79 + a:n 106 | endif 107 | else 108 | if a:n == 0 109 | return 16 110 | elseif a:n == 25 111 | return 231 112 | else 113 | return 231 + a:n 114 | endif 115 | endif 116 | endfun 117 | 118 | " returns an approximate color index for the given color level 119 | fun rgb_number(x) 120 | if &t_Co == 88 121 | if a:x < 69 122 | return 0 123 | elseif a:x < 172 124 | return 1 125 | elseif a:x < 230 126 | return 2 127 | else 128 | return 3 129 | endif 130 | else 131 | if a:x < 75 132 | return 0 133 | else 134 | let l:n = (a:x - 55) / 40 135 | let l:m = (a:x - 55) % 40 136 | if l:m < 20 137 | return l:n 138 | else 139 | return l:n + 1 140 | endif 141 | endif 142 | endif 143 | endfun 144 | 145 | " returns the actual color level for the given color index 146 | fun rgb_level(n) 147 | if &t_Co == 88 148 | if a:n == 0 149 | return 0 150 | elseif a:n == 1 151 | return 139 152 | elseif a:n == 2 153 | return 205 154 | else 155 | return 255 156 | endif 157 | else 158 | if a:n == 0 159 | return 0 160 | else 161 | return 55 + (a:n * 40) 162 | endif 163 | endif 164 | endfun 165 | 166 | " returns the palette index for the given R/G/B color indices 167 | fun rgb_color(x, y, z) 168 | if &t_Co == 88 169 | return 16 + (a:x * 16) + (a:y * 4) + a:z 170 | else 171 | return 16 + (a:x * 36) + (a:y * 6) + a:z 172 | endif 173 | endfun 174 | 175 | " returns the palette index to approximate the given R/G/B color levels 176 | fun color(r, g, b) 177 | " get the closest grey 178 | let l:gx = grey_number(a:r) 179 | let l:gy = grey_number(a:g) 180 | let l:gz = grey_number(a:b) 181 | 182 | " get the closest color 183 | let l:x = rgb_number(a:r) 184 | let l:y = rgb_number(a:g) 185 | let l:z = rgb_number(a:b) 186 | 187 | if l:gx == l:gy && l:gy == l:gz 188 | " there are two possibilities 189 | let l:dgr = grey_level(l:gx) - a:r 190 | let l:dgg = grey_level(l:gy) - a:g 191 | let l:dgb = grey_level(l:gz) - a:b 192 | let l:dgrey = (l:dgr * l:dgr) + (l:dgg * l:dgg) + (l:dgb * l:dgb) 193 | let l:dr = rgb_level(l:gx) - a:r 194 | let l:dg = rgb_level(l:gy) - a:g 195 | let l:db = rgb_level(l:gz) - a:b 196 | let l:drgb = (l:dr * l:dr) + (l:dg * l:dg) + (l:db * l:db) 197 | if l:dgrey < l:drgb 198 | " use the grey 199 | return grey_color(l:gx) 200 | else 201 | " use the color 202 | return rgb_color(l:x, l:y, l:z) 203 | endif 204 | else 205 | " only one possibility 206 | return rgb_color(l:x, l:y, l:z) 207 | endif 208 | endfun 209 | 210 | " returns the palette index to approximate the 'rrggbb' hex string 211 | fun rgb(rgb) 212 | let l:r = ("0x" . strpart(a:rgb, 0, 2)) + 0 213 | let l:g = ("0x" . strpart(a:rgb, 2, 2)) + 0 214 | let l:b = ("0x" . strpart(a:rgb, 4, 2)) + 0 215 | return color(l:r, l:g, l:b) 216 | endfun 217 | 218 | " sets the highlighting for the given group 219 | fun X(group, fg, bg, attr) 220 | if a:fg != "" 221 | exec "hi ".a:group." guifg=#".a:fg." ctermfg=".rgb(a:fg) 222 | endif 223 | if a:bg != "" 224 | exec "hi ".a:group." guibg=#".a:bg." ctermbg=".rgb(a:bg) 225 | endif 226 | if a:attr != "" 227 | if a:attr == 'italic' 228 | exec "hi ".a:group." gui=".a:attr." cterm=none" 229 | else 230 | exec "hi ".a:group." gui=".a:attr." cterm=".a:attr 231 | endif 232 | endif 233 | endfun 234 | " }}} 235 | 236 | call X("Normal", "cccccc", "242424", "none") 237 | call X("Cursor", "222222", "ecee90", "none") 238 | call X("CursorLine", "", "32322e", "none") 239 | call X("CursorColumn", "", "2d2d2d", "") 240 | "CursorIM 241 | "Question 242 | "IncSearch 243 | call X("Search", "444444", "af87d7", "") 244 | call X("MatchParen", "ecee90", "857b6f", "bold") 245 | call X("SpecialKey", "6c6c6c", "2d2d2d", "none") 246 | call X("Visual", "ecee90", "597418", "none") 247 | call X("LineNr", "857b6f", "121212", "none") 248 | call X("Folded", "a0a8b0", "404048", "none") 249 | call X("Title", "f6f3e8", "", "bold") 250 | call X("VertSplit", "444444", "444444", "none") 251 | call X("StatusLine", "f6f3e8", "444444", "italic") 252 | call X("StatusLineNC", "857b6f", "444444", "none") 253 | "Scrollbar 254 | "Tooltip 255 | "Menu 256 | "WildMenu 257 | call X("Pmenu", "f6f3e8", "444444", "") 258 | call X("PmenuSel", "121212", "caeb82", "") 259 | call X("WarningMsg", "ff0000", "", "") 260 | "ErrorMsg 261 | "ModeMsg 262 | "MoreMsg 263 | "Directory 264 | "DiffAdd 265 | "DiffChange 266 | "DiffDelete 267 | "DiffText 268 | 269 | " syntax highlighting 270 | call X("Number", "e5786d", "", "none") 271 | call X("Constant", "e5786d", "", "none") 272 | call X("String", "95e454", "", "italic") 273 | call X("Comment", "c0bc6c", "", "italic") 274 | call X("Identifier", "caeb82", "", "none") 275 | call X("Keyword", "87afff", "", "none") 276 | call X("Statement", "87afff", "", "none") 277 | call X("Function", "caeb82", "", "none") 278 | call X("PreProc", "e5786d", "", "none") 279 | call X("Type", "caeb82", "", "none") 280 | call X("Special", "ffdead", "", "none") 281 | call X("Todo", "857b6f", "", "italic") 282 | "Underlined 283 | "Error 284 | "Ignore 285 | 286 | hi! link VisualNOS Visual 287 | hi! link NonText LineNr 288 | hi! link FoldColumn Folded 289 | 290 | " delete functions {{{ 291 | delf X 292 | delf rgb 293 | delf color 294 | delf rgb_color 295 | delf rgb_level 296 | delf rgb_number 297 | delf grey_color 298 | delf grey_level 299 | delf grey_number 300 | " }}} 301 | 302 | " vim:set ts=4 sw=4 noet fdm=marker: 303 | -------------------------------------------------------------------------------- /autoload/pathogen.vim: -------------------------------------------------------------------------------- 1 | " pathogen.vim - path option manipulation 2 | " Maintainer: Tim Pope 3 | " Version: 2.3 4 | 5 | " Install in ~/.vim/autoload (or ~\vimfiles\autoload). 6 | " 7 | " For management of individually installed plugins in ~/.vim/bundle (or 8 | " ~\vimfiles\bundle), adding `execute pathogen#infect()` to the top of your 9 | " .vimrc is the only other setup necessary. 10 | " 11 | " The API is documented inline below. 12 | 13 | if exists("g:loaded_pathogen") || &cp 14 | finish 15 | endif 16 | let g:loaded_pathogen = 1 17 | 18 | " Point of entry for basic default usage. Give a relative path to invoke 19 | " pathogen#interpose() (defaults to "bundle/{}"), or an absolute path to invoke 20 | " pathogen#surround(). Curly braces are expanded with pathogen#expand(): 21 | " "bundle/{}" finds all subdirectories inside "bundle" inside all directories 22 | " in the runtime path. 23 | function! pathogen#infect(...) abort 24 | for path in a:0 ? filter(reverse(copy(a:000)), 'type(v:val) == type("")') : ['bundle/{}'] 25 | if path =~# '^\%({\=[$~\\/]\|{\=\w:[\\/]\).*[{}*]' 26 | call pathogen#surround(path) 27 | elseif path =~# '^\%([$~\\/]\|\w:[\\/]\)' 28 | call s:warn('Change pathogen#infect('.string(path).') to pathogen#infect('.string(path.'/{}').')') 29 | call pathogen#surround(path . '/{}') 30 | elseif path =~# '[{}*]' 31 | call pathogen#interpose(path) 32 | else 33 | call s:warn('Change pathogen#infect('.string(path).') to pathogen#infect('.string(path.'/{}').')') 34 | call pathogen#interpose(path . '/{}') 35 | endif 36 | endfor 37 | call pathogen#cycle_filetype() 38 | if pathogen#is_disabled($MYVIMRC) 39 | return 'finish' 40 | endif 41 | return '' 42 | endfunction 43 | 44 | " Split a path into a list. 45 | function! pathogen#split(path) abort 46 | if type(a:path) == type([]) | return a:path | endif 47 | if empty(a:path) | return [] | endif 48 | let split = split(a:path,'\\\@]','\\&','') 238 | endif 239 | endfunction 240 | 241 | " Like findfile(), but hardcoded to use the runtimepath. 242 | function! pathogen#runtime_findfile(file,count) abort "{{{1 243 | let rtp = pathogen#join(1,pathogen#split(&rtp)) 244 | let file = findfile(a:file,rtp,a:count) 245 | if file ==# '' 246 | return '' 247 | else 248 | return fnamemodify(file,':p') 249 | endif 250 | endfunction 251 | 252 | " Section: Deprecated 253 | 254 | function! s:warn(msg) abort 255 | echohl WarningMsg 256 | echomsg a:msg 257 | echohl NONE 258 | endfunction 259 | 260 | " Prepend all subdirectories of path to the rtp, and append all 'after' 261 | " directories in those subdirectories. Deprecated. 262 | function! pathogen#runtime_prepend_subdirectories(path) abort 263 | call s:warn('Change pathogen#runtime_prepend_subdirectories('.string(a:path).') to pathogen#infect('.string(a:path.'/{}').')') 264 | return pathogen#surround(a:path . pathogen#slash() . '{}') 265 | endfunction 266 | 267 | function! pathogen#incubate(...) abort 268 | let name = a:0 ? a:1 : 'bundle/{}' 269 | call s:warn('Change pathogen#incubate('.(a:0 ? string(a:1) : '').') to pathogen#infect('.string(name).')') 270 | return pathogen#interpose(name) 271 | endfunction 272 | 273 | " Deprecated alias for pathogen#interpose(). 274 | function! pathogen#runtime_append_all_bundles(...) abort 275 | if a:0 276 | call s:warn('Change pathogen#runtime_append_all_bundles('.string(a:1).') to pathogen#infect('.string(a:1.'/{}').')') 277 | else 278 | call s:warn('Change pathogen#runtime_append_all_bundles() to pathogen#infect()') 279 | endif 280 | return pathogen#interpose(a:0 ? a:1 . '/{}' : 'bundle/{}') 281 | endfunction 282 | 283 | if exists(':Vedit') 284 | finish 285 | endif 286 | 287 | let s:vopen_warning = 0 288 | 289 | function! s:find(count,cmd,file,lcd) 290 | let rtp = pathogen#join(1,pathogen#split(&runtimepath)) 291 | let file = pathogen#runtime_findfile(a:file,a:count) 292 | if file ==# '' 293 | return "echoerr 'E345: Can''t find file \"".a:file."\" in runtimepath'" 294 | endif 295 | if !s:vopen_warning 296 | let s:vopen_warning = 1 297 | let warning = '|echohl WarningMsg|echo "Install scriptease.vim to continue using :V'.a:cmd.'"|echohl NONE' 298 | else 299 | let warning = '' 300 | endif 301 | if a:lcd 302 | let path = file[0:-strlen(a:file)-2] 303 | execute 'lcd `=path`' 304 | return a:cmd.' '.pathogen#fnameescape(a:file) . warning 305 | else 306 | return a:cmd.' '.pathogen#fnameescape(file) . warning 307 | endif 308 | endfunction 309 | 310 | function! s:Findcomplete(A,L,P) 311 | let sep = pathogen#slash() 312 | let cheats = { 313 | \'a': 'autoload', 314 | \'d': 'doc', 315 | \'f': 'ftplugin', 316 | \'i': 'indent', 317 | \'p': 'plugin', 318 | \'s': 'syntax'} 319 | if a:A =~# '^\w[\\/]' && has_key(cheats,a:A[0]) 320 | let request = cheats[a:A[0]].a:A[1:-1] 321 | else 322 | let request = a:A 323 | endif 324 | let pattern = substitute(request,'/\|\'.sep,'*'.sep,'g').'*' 325 | let found = {} 326 | for path in pathogen#split(&runtimepath) 327 | let path = expand(path, ':p') 328 | let matches = split(glob(path.sep.pattern),"\n") 329 | call map(matches,'isdirectory(v:val) ? v:val.sep : v:val') 330 | call map(matches,'expand(v:val, ":p")[strlen(path)+1:-1]') 331 | for match in matches 332 | let found[match] = 1 333 | endfor 334 | endfor 335 | return sort(keys(found)) 336 | endfunction 337 | 338 | command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Ve :execute s:find(,'edit',,0) 339 | command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vedit :execute s:find(,'edit',,0) 340 | command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vopen :execute s:find(,'edit',,1) 341 | command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vsplit :execute s:find(,'split',,1) 342 | command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vvsplit :execute s:find(,'vsplit',,1) 343 | command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vtabedit :execute s:find(,'tabedit',,1) 344 | command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vpedit :execute s:find(,'pedit',,1) 345 | command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vread :execute s:find(,'read',,1) 346 | 347 | " vim:set et sw=2 foldmethod=expr foldexpr=getline(v\:lnum)=~'^\"\ Section\:'?'>1'\:getline(v\:lnum)=~#'^fu'?'a1'\:getline(v\:lnum)=~#'^endf'?'s1'\:'=': 348 | -------------------------------------------------------------------------------- /colors/hybrid.vim: -------------------------------------------------------------------------------- 1 | " File: hybrid.vim 2 | " Maintainer: Andrew Wong (w0ng) 3 | " URL: https://github.com/w0ng/vim-hybrid 4 | " Modified: 27 Jan 2013 07:33 AM AEST 5 | " License: MIT 6 | 7 | " Description:"{{{ 8 | " ---------------------------------------------------------------------------- 9 | " The default RGB colour palette is taken from Tomorrow-Night.vim: 10 | " https://github.com/chriskempson/vim-tomorrow-theme 11 | " 12 | " The reduced RGB colour palette is taken from Codecademy's online editor: 13 | " https://www.codecademy.com/learn 14 | " 15 | " The syntax highlighting scheme is taken from jellybeans.vim: 16 | " https://github.com/nanotech/jellybeans.vim 17 | " 18 | " The is code taken from solarized.vim: 19 | " https://github.com/altercation/vim-colors-solarized 20 | 21 | "}}} 22 | " Requirements And Recommendations:"{{{ 23 | " ---------------------------------------------------------------------------- 24 | " Requirements 25 | " - gVim 7.3+ on Linux, Mac and Windows. 26 | " - Vim 7.3+ on Linux and Mac, using a terminal that supports 256 colours. 27 | " 28 | " Due to the limited 256 palette, colours in Vim and gVim will still be slightly 29 | " different. 30 | " 31 | " In order to have Vim use the same colours as gVim (the way this colour scheme 32 | " is intended), it is recommended that you define the basic 16 colours in your 33 | " terminal. 34 | " 35 | " For Linux users (rxvt-unicode, xterm): 36 | " 37 | " 1. Add the default palette to ~/.Xresources: 38 | " 39 | " https://gist.github.com/3278077 40 | " 41 | " or alternatively, add the reduced contrast palette to ~/.Xresources: 42 | " 43 | " https://gist.github.com/w0ng/16e33902508b4a0350ae 44 | " 45 | " 2. Add to ~/.vimrc: 46 | " 47 | " let g:hybrid_custom_term_colors = 1 48 | " let g:hybrid_reduced_contrast = 1 " Remove this line if using the default palette. 49 | " colorscheme hybrid 50 | " 51 | " For OSX users (iTerm): 52 | " 53 | " 1. Import the default colour preset into iTerm: 54 | " 55 | " https://raw.githubusercontent.com/w0ng/dotfiles/master/iterm2/hybrid.itermcolors 56 | " 57 | " or alternatively, import the reduced contrast color preset into iTerm: 58 | " 59 | " https://raw.githubusercontent.com/w0ng/dotfiles/master/iterm2/hybrid-reduced-contrast.itermcolors 60 | " 61 | " 2. Add to ~/.vimrc: 62 | " 63 | " let g:hybrid_custom_term_colors = 1 64 | " let g:hybrid_reduced_contrast = 1 " Remove this line if using the default palette. 65 | " colorscheme hybrid 66 | 67 | "}}} 68 | " Initialisation:"{{{ 69 | " ---------------------------------------------------------------------------- 70 | 71 | hi clear 72 | 73 | if exists("syntax_on") 74 | syntax reset 75 | endif 76 | 77 | let s:style = &background 78 | 79 | let g:colors_name = "hybrid" 80 | 81 | "}}} 82 | " GUI And Cterm Palettes:"{{{ 83 | " ---------------------------------------------------------------------------- 84 | 85 | let s:palette = {'gui' : {} , 'cterm' : {}} 86 | 87 | if exists("g:hybrid_reduced_contrast") && g:hybrid_reduced_contrast == 1 88 | let s:gui_background = "#232c31" 89 | let s:gui_selection = "#425059" 90 | let s:gui_line = "#2d3c46" 91 | let s:gui_comment = "#6c7a80" 92 | else 93 | let s:gui_background = "#1d1f21" 94 | let s:gui_selection = "#373b41" 95 | let s:gui_line = "#282a2e" 96 | let s:gui_comment = "#707880" 97 | endif 98 | 99 | let s:palette.gui.background = { 'dark' : s:gui_background , 'light' : "#e4e4e4" } 100 | let s:palette.gui.foreground = { 'dark' : "#c5c8c6" , 'light' : "#000000" } 101 | let s:palette.gui.selection = { 'dark' : s:gui_selection , 'light' : "#bcbcbc" } 102 | let s:palette.gui.line = { 'dark' : s:gui_line , 'light' : "#d0d0d0" } 103 | let s:palette.gui.comment = { 'dark' : s:gui_comment , 'light' : "#5f5f5f" } 104 | let s:palette.gui.red = { 'dark' : "#cc6666" , 'light' : "#5f0000" } 105 | let s:palette.gui.orange = { 'dark' : "#de935f" , 'light' : "#875f00" } 106 | let s:palette.gui.yellow = { 'dark' : "#f0c674" , 'light' : "#5f5f00" } 107 | let s:palette.gui.green = { 'dark' : "#b5bd68" , 'light' : "#005f00" } 108 | let s:palette.gui.aqua = { 'dark' : "#8abeb7" , 'light' : "#005f5f" } 109 | let s:palette.gui.blue = { 'dark' : "#81a2be" , 'light' : "#00005f" } 110 | let s:palette.gui.purple = { 'dark' : "#b294bb" , 'light' : "#5f005f" } 111 | let s:palette.gui.window = { 'dark' : "#303030" , 'light' : "#9e9e9e" } 112 | let s:palette.gui.darkcolumn = { 'dark' : "#1c1c1c" , 'light' : "#808080" } 113 | let s:palette.gui.addbg = { 'dark' : "#5F875F" , 'light' : "#d7ffd7" } 114 | let s:palette.gui.addfg = { 'dark' : "#d7ffaf" , 'light' : "#005f00" } 115 | let s:palette.gui.changebg = { 'dark' : "#5F5F87" , 'light' : "#d7d7ff" } 116 | let s:palette.gui.changefg = { 'dark' : "#d7d7ff" , 'light' : "#5f005f" } 117 | let s:palette.gui.delbg = { 'dark' : "#cc6666" , 'light' : "#ffd7d7" } 118 | let s:palette.gui.darkblue = { 'dark' : "#00005f" , 'light' : "#d7ffd7" } 119 | let s:palette.gui.darkcyan = { 'dark' : "#005f5f" , 'light' : "#005f00" } 120 | let s:palette.gui.darkred = { 'dark' : "#5f0000" , 'light' : "#d7d7ff" } 121 | let s:palette.gui.darkpurple = { 'dark' : "#5f005f" , 'light' : "#5f005f" } 122 | 123 | if exists("g:hybrid_custom_term_colors") && g:hybrid_custom_term_colors == 1 124 | let s:cterm_foreground = "15" " White 125 | let s:cterm_selection = "8" " DarkGrey 126 | let s:cterm_line = "0" " Black 127 | let s:cterm_comment = "7" " LightGrey 128 | let s:cterm_red = "9" " LightRed 129 | let s:cterm_orange = "3" " DarkYellow 130 | let s:cterm_yellow = "11" " LightYellow 131 | let s:cterm_green = "10" " LightGreen 132 | let s:cterm_aqua = "14" " LightCyan 133 | let s:cterm_blue = "12" " LightBlue 134 | let s:cterm_purple = "13" " LightMagenta 135 | let s:cterm_delbg = "9" " LightRed 136 | else 137 | let s:cterm_foreground = "250" 138 | let s:cterm_selection = "237" 139 | let s:cterm_line = "235" 140 | let s:cterm_comment = "243" 141 | let s:cterm_red = "167" 142 | let s:cterm_orange = "173" 143 | let s:cterm_yellow = "221" 144 | let s:cterm_green = "143" 145 | let s:cterm_aqua = "109" 146 | let s:cterm_blue = "110" 147 | let s:cterm_purple = "139" 148 | let s:cterm_delbg = "167" 149 | endif 150 | 151 | let s:palette.cterm.background = { 'dark' : "234" , 'light' : "254" } 152 | let s:palette.cterm.foreground = { 'dark' : s:cterm_foreground , 'light' : "16" } 153 | let s:palette.cterm.window = { 'dark' : "236" , 'light' : "247" } 154 | let s:palette.cterm.selection = { 'dark' : s:cterm_selection , 'light' : "250" } 155 | let s:palette.cterm.line = { 'dark' : s:cterm_line , 'light' : "252" } 156 | let s:palette.cterm.comment = { 'dark' : s:cterm_comment , 'light' : "59" } 157 | let s:palette.cterm.red = { 'dark' : s:cterm_red , 'light' : "52" } 158 | let s:palette.cterm.orange = { 'dark' : s:cterm_orange , 'light' : "94" } 159 | let s:palette.cterm.yellow = { 'dark' : s:cterm_yellow , 'light' : "58" } 160 | let s:palette.cterm.green = { 'dark' : s:cterm_green , 'light' : "22" } 161 | let s:palette.cterm.aqua = { 'dark' : s:cterm_aqua , 'light' : "23" } 162 | let s:palette.cterm.blue = { 'dark' : s:cterm_blue , 'light' : "17" } 163 | let s:palette.cterm.purple = { 'dark' : s:cterm_purple , 'light' : "53" } 164 | let s:palette.cterm.darkcolumn = { 'dark' : "234" , 'light' : "244" } 165 | let s:palette.cterm.addbg = { 'dark' : "65" , 'light' : "194" } 166 | let s:palette.cterm.addfg = { 'dark' : "193" , 'light' : "22" } 167 | let s:palette.cterm.changebg = { 'dark' : "60" , 'light' : "189" } 168 | let s:palette.cterm.changefg = { 'dark' : "189" , 'light' : "53" } 169 | let s:palette.cterm.delbg = { 'dark' : s:cterm_delbg , 'light' : "224" } 170 | let s:palette.cterm.darkblue = { 'dark' : "17" , 'light' : "194" } 171 | let s:palette.cterm.darkcyan = { 'dark' : "24" , 'light' : "22" } 172 | let s:palette.cterm.darkred = { 'dark' : "52" , 'light' : "189" } 173 | let s:palette.cterm.darkpurple = { 'dark' : "53" , 'light' : "53" } 174 | 175 | "}}} 176 | " Formatting Options:"{{{ 177 | " ---------------------------------------------------------------------------- 178 | let s:none = "NONE" 179 | let s:t_none = "NONE" 180 | let s:n = "NONE" 181 | let s:c = ",undercurl" 182 | let s:r = ",reverse" 183 | let s:s = ",standout" 184 | let s:b = ",bold" 185 | let s:u = ",underline" 186 | let s:i = ",italic" 187 | 188 | "}}} 189 | " Highlighting Primitives:"{{{ 190 | " ---------------------------------------------------------------------------- 191 | function! s:build_prim(hi_elem, field) 192 | " Given a:hi_elem = bg, a:field = comment 193 | let l:vname = "s:" . a:hi_elem . "_" . a:field " s:bg_comment 194 | let l:gui_assign = "gui".a:hi_elem."=".s:palette.gui[a:field][s:style] " guibg=... 195 | let l:cterm_assign = "cterm".a:hi_elem."=".s:palette.cterm[a:field][s:style] " ctermbg=... 196 | exe "let " . l:vname . " = ' " . l:gui_assign . " " . l:cterm_assign . "'" 197 | endfunction 198 | 199 | let s:bg_none = ' guibg=NONE ctermbg=NONE' 200 | call s:build_prim('bg', 'foreground') 201 | call s:build_prim('bg', 'background') 202 | call s:build_prim('bg', 'selection') 203 | call s:build_prim('bg', 'line') 204 | call s:build_prim('bg', 'comment') 205 | call s:build_prim('bg', 'red') 206 | call s:build_prim('bg', 'orange') 207 | call s:build_prim('bg', 'yellow') 208 | call s:build_prim('bg', 'green') 209 | call s:build_prim('bg', 'aqua') 210 | call s:build_prim('bg', 'blue') 211 | call s:build_prim('bg', 'purple') 212 | call s:build_prim('bg', 'window') 213 | call s:build_prim('bg', 'darkcolumn') 214 | call s:build_prim('bg', 'addbg') 215 | call s:build_prim('bg', 'addfg') 216 | call s:build_prim('bg', 'changebg') 217 | call s:build_prim('bg', 'changefg') 218 | call s:build_prim('bg', 'delbg') 219 | call s:build_prim('bg', 'darkblue') 220 | call s:build_prim('bg', 'darkcyan') 221 | call s:build_prim('bg', 'darkred') 222 | call s:build_prim('bg', 'darkpurple') 223 | 224 | let s:fg_none = ' guifg=NONE ctermfg=NONE' 225 | call s:build_prim('fg', 'foreground') 226 | call s:build_prim('fg', 'background') 227 | call s:build_prim('fg', 'selection') 228 | call s:build_prim('fg', 'line') 229 | call s:build_prim('fg', 'comment') 230 | call s:build_prim('fg', 'red') 231 | call s:build_prim('fg', 'orange') 232 | call s:build_prim('fg', 'yellow') 233 | call s:build_prim('fg', 'green') 234 | call s:build_prim('fg', 'aqua') 235 | call s:build_prim('fg', 'blue') 236 | call s:build_prim('fg', 'purple') 237 | call s:build_prim('fg', 'window') 238 | call s:build_prim('fg', 'darkcolumn') 239 | call s:build_prim('fg', 'addbg') 240 | call s:build_prim('fg', 'addfg') 241 | call s:build_prim('fg', 'changebg') 242 | call s:build_prim('fg', 'changefg') 243 | call s:build_prim('fg', 'darkblue') 244 | call s:build_prim('fg', 'darkcyan') 245 | call s:build_prim('fg', 'darkred') 246 | call s:build_prim('fg', 'darkpurple') 247 | 248 | exe "let s:fmt_none = ' gui=NONE". " cterm=NONE". " term=NONE" ."'" 249 | exe "let s:fmt_bold = ' gui=NONE".s:b. " cterm=NONE".s:b. " term=NONE".s:b ."'" 250 | exe "let s:fmt_bldi = ' gui=NONE".s:b. " cterm=NONE".s:b. " term=NONE".s:b ."'" 251 | exe "let s:fmt_undr = ' gui=NONE".s:u. " cterm=NONE".s:u. " term=NONE".s:u ."'" 252 | exe "let s:fmt_undb = ' gui=NONE".s:u.s:b. " cterm=NONE".s:u.s:b. " term=NONE".s:u.s:b."'" 253 | exe "let s:fmt_undi = ' gui=NONE".s:u. " cterm=NONE".s:u. " term=NONE".s:u ."'" 254 | exe "let s:fmt_curl = ' gui=NONE".s:c. " cterm=NONE".s:c. " term=NONE".s:c ."'" 255 | exe "let s:fmt_ital = ' gui=NONE".s:i. " cterm=NONE".s:i. " term=NONE".s:i ."'" 256 | exe "let s:fmt_stnd = ' gui=NONE".s:s. " cterm=NONE".s:s. " term=NONE".s:s ."'" 257 | exe "let s:fmt_revr = ' gui=NONE".s:r. " cterm=NONE".s:r. " term=NONE".s:r ."'" 258 | exe "let s:fmt_revb = ' gui=NONE".s:r.s:b. " cterm=NONE".s:r.s:b. " term=NONE".s:r.s:b."'" 259 | 260 | exe "let s:sp_none = ' guisp=". s:none ."'" 261 | exe "let s:sp_foreground = ' guisp=". s:palette.gui.foreground[s:style] ."'" 262 | exe "let s:sp_background = ' guisp=". s:palette.gui.background[s:style] ."'" 263 | exe "let s:sp_selection = ' guisp=". s:palette.gui.selection[s:style] ."'" 264 | exe "let s:sp_line = ' guisp=". s:palette.gui.line[s:style] ."'" 265 | exe "let s:sp_comment = ' guisp=". s:palette.gui.comment[s:style] ."'" 266 | exe "let s:sp_red = ' guisp=". s:palette.gui.red[s:style] ."'" 267 | exe "let s:sp_orange = ' guisp=". s:palette.gui.orange[s:style] ."'" 268 | exe "let s:sp_yellow = ' guisp=". s:palette.gui.yellow[s:style] ."'" 269 | exe "let s:sp_green = ' guisp=". s:palette.gui.green[s:style] ."'" 270 | exe "let s:sp_aqua = ' guisp=". s:palette.gui.aqua[s:style] ."'" 271 | exe "let s:sp_blue = ' guisp=". s:palette.gui.blue[s:style] ."'" 272 | exe "let s:sp_purple = ' guisp=". s:palette.gui.purple[s:style] ."'" 273 | exe "let s:sp_window = ' guisp=". s:palette.gui.window[s:style] ."'" 274 | exe "let s:sp_addbg = ' guisp=". s:palette.gui.addbg[s:style] ."'" 275 | exe "let s:sp_addfg = ' guisp=". s:palette.gui.addfg[s:style] ."'" 276 | exe "let s:sp_changebg = ' guisp=". s:palette.gui.changebg[s:style] ."'" 277 | exe "let s:sp_changefg = ' guisp=". s:palette.gui.changefg[s:style] ."'" 278 | exe "let s:sp_darkblue = ' guisp=". s:palette.gui.darkblue[s:style] ."'" 279 | exe "let s:sp_darkcyan = ' guisp=". s:palette.gui.darkcyan[s:style] ."'" 280 | exe "let s:sp_darkred = ' guisp=". s:palette.gui.darkred[s:style] ."'" 281 | exe "let s:sp_darkpurple = ' guisp=". s:palette.gui.darkpurple[s:style] ."'" 282 | 283 | "}}} 284 | " Vim Highlighting: (see :help highlight-groups)"{{{ 285 | " ---------------------------------------------------------------------------- 286 | exe "hi! ColorColumn" .s:fg_none .s:bg_line .s:fmt_none 287 | " Conceal" 288 | " Cursor" 289 | " CursorIM" 290 | exe "hi! CursorColumn" .s:fg_none .s:bg_line .s:fmt_none 291 | exe "hi! CursorLine" .s:fg_none .s:bg_line .s:fmt_none 292 | exe "hi! Directory" .s:fg_blue .s:bg_none .s:fmt_none 293 | exe "hi! DiffAdd" .s:fg_addfg .s:bg_addbg .s:fmt_none 294 | exe "hi! DiffChange" .s:fg_changefg .s:bg_changebg .s:fmt_none 295 | exe "hi! DiffDelete" .s:fg_background .s:bg_delbg .s:fmt_none 296 | exe "hi! DiffText" .s:fg_background .s:bg_blue .s:fmt_none 297 | exe "hi! ErrorMsg" .s:fg_background .s:bg_red .s:fmt_stnd 298 | exe "hi! VertSplit" .s:fg_window .s:bg_none .s:fmt_none 299 | exe "hi! Folded" .s:fg_comment .s:bg_darkcolumn .s:fmt_none 300 | exe "hi! FoldColumn" .s:fg_none .s:bg_darkcolumn .s:fmt_none 301 | exe "hi! SignColumn" .s:fg_none .s:bg_darkcolumn .s:fmt_none 302 | " Incsearch" 303 | exe "hi! LineNr" .s:fg_selection .s:bg_none .s:fmt_none 304 | exe "hi! CursorLineNr" .s:fg_yellow .s:bg_none .s:fmt_none 305 | exe "hi! MatchParen" .s:fg_background .s:bg_changebg .s:fmt_none 306 | exe "hi! ModeMsg" .s:fg_green .s:bg_none .s:fmt_none 307 | exe "hi! MoreMsg" .s:fg_green .s:bg_none .s:fmt_none 308 | exe "hi! NonText" .s:fg_selection .s:bg_none .s:fmt_none 309 | exe "hi! Pmenu" .s:fg_foreground .s:bg_selection .s:fmt_none 310 | exe "hi! PmenuSel" .s:fg_foreground .s:bg_selection .s:fmt_revr 311 | " PmenuSbar" 312 | " PmenuThumb" 313 | exe "hi! Question" .s:fg_green .s:bg_none .s:fmt_none 314 | exe "hi! Search" .s:fg_background .s:bg_yellow .s:fmt_none 315 | exe "hi! SpecialKey" .s:fg_selection .s:bg_none .s:fmt_none 316 | exe "hi! SpellCap" .s:fg_blue .s:bg_darkblue .s:fmt_undr 317 | exe "hi! SpellLocal" .s:fg_aqua .s:bg_darkcyan .s:fmt_undr 318 | exe "hi! SpellBad" .s:fg_red .s:bg_darkred .s:fmt_undr 319 | exe "hi! SpellRare" .s:fg_purple .s:bg_darkpurple .s:fmt_undr 320 | exe "hi! StatusLine" .s:fg_comment .s:bg_background .s:fmt_revr 321 | exe "hi! StatusLineNC" .s:fg_window .s:bg_comment .s:fmt_revr 322 | exe "hi! TabLine" .s:fg_foreground .s:bg_darkcolumn .s:fmt_revr 323 | " TabLineFill" 324 | " TabLineSel" 325 | exe "hi! Title" .s:fg_yellow .s:bg_none .s:fmt_none 326 | exe "hi! Visual" .s:fg_none .s:bg_selection .s:fmt_none 327 | " VisualNos" 328 | exe "hi! WarningMsg" .s:fg_red .s:bg_none .s:fmt_none 329 | " FIXME LongLineWarning to use variables instead of hardcoding 330 | hi LongLineWarning guifg=NONE guibg=#371F1C gui=underline ctermfg=NONE ctermbg=NONE cterm=underline 331 | " WildMenu" 332 | 333 | " Use defined custom background colour for terminal Vim. 334 | if !has('gui_running') && exists("g:hybrid_custom_term_colors") && g:hybrid_custom_term_colors == 1 335 | let s:bg_normal = s:bg_none 336 | else 337 | let s:bg_normal = s:bg_background 338 | endif 339 | exe "hi! Normal" .s:fg_foreground .s:bg_normal .s:fmt_none 340 | 341 | "}}} 342 | " Generic Syntax Highlighting: (see :help group-name)"{{{ 343 | " ---------------------------------------------------------------------------- 344 | exe "hi! Comment" .s:fg_comment .s:bg_none .s:fmt_none 345 | 346 | exe "hi! Constant" .s:fg_red .s:bg_none .s:fmt_none 347 | exe "hi! String" .s:fg_green .s:bg_none .s:fmt_none 348 | " Character" 349 | " Number" 350 | " Boolean" 351 | " Float" 352 | 353 | exe "hi! Identifier" .s:fg_purple .s:bg_none .s:fmt_none 354 | exe "hi! Function" .s:fg_yellow .s:bg_none .s:fmt_none 355 | 356 | exe "hi! Statement" .s:fg_blue .s:bg_none .s:fmt_none 357 | " Conditional" 358 | " Repeat" 359 | " Label" 360 | exe "hi! Operator" .s:fg_aqua .s:bg_none .s:fmt_none 361 | " Keyword" 362 | " Exception" 363 | 364 | exe "hi! PreProc" .s:fg_aqua .s:bg_none .s:fmt_none 365 | " Include" 366 | " Define" 367 | " Macro" 368 | " PreCondit" 369 | 370 | exe "hi! Type" .s:fg_orange .s:bg_none .s:fmt_none 371 | " StorageClass" 372 | exe "hi! Structure" .s:fg_aqua .s:bg_none .s:fmt_none 373 | " Typedef" 374 | 375 | exe "hi! Special" .s:fg_green .s:bg_none .s:fmt_none 376 | " SpecialChar" 377 | " Tag" 378 | " Delimiter" 379 | " SpecialComment" 380 | " Debug" 381 | " 382 | exe "hi! Underlined" .s:fg_blue .s:bg_none .s:fmt_none 383 | 384 | exe "hi! Ignore" .s:fg_none .s:bg_none .s:fmt_none 385 | 386 | exe "hi! Error" .s:fg_red .s:bg_darkred .s:fmt_undr 387 | 388 | exe "hi! Todo" .s:fg_addfg .s:bg_none .s:fmt_none 389 | 390 | " Quickfix window highlighting 391 | exe "hi! qfLineNr" .s:fg_yellow .s:bg_none .s:fmt_none 392 | " qfFileName" 393 | " qfLineNr" 394 | " qfError" 395 | 396 | "}}} 397 | " Diff Syntax Highlighting:"{{{ 398 | " ---------------------------------------------------------------------------- 399 | " Diff 400 | " diffOldFile 401 | " diffNewFile 402 | " diffFile 403 | " diffOnly 404 | " diffIdentical 405 | " diffDiffer 406 | " diffBDiffer 407 | " diffIsA 408 | " diffNoEOL 409 | " diffCommon 410 | hi! link diffRemoved Constant 411 | " diffChanged 412 | hi! link diffAdded Special 413 | " diffLine 414 | " diffSubname 415 | " diffComment 416 | 417 | "}}} 418 | " 419 | " This is needed for some reason: {{{ 420 | 421 | let &background = s:style 422 | 423 | " }}} 424 | " Legal:"{{{ 425 | " ---------------------------------------------------------------------------- 426 | " Copyright (c) 2011 Ethan Schoonover 427 | " Copyright (c) 2009-2012 NanoTech 428 | " Copyright (c) 2012 w0ng 429 | " 430 | " Permission is hereby granted, free of charge, to any per‐ 431 | " son obtaining a copy of this software and associated doc‐ 432 | " umentation files (the “Software”), to deal in the Soft‐ 433 | " ware without restriction, including without limitation 434 | " the rights to use, copy, modify, merge, publish, distrib‐ 435 | " ute, sublicense, and/or sell copies of the Software, and 436 | " to permit persons to whom the Software is furnished to do 437 | " so, subject to the following conditions: 438 | " 439 | " The above copyright notice and this permission notice 440 | " shall be included in all copies or substantial portions 441 | " of the Software. 442 | " 443 | " THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY 444 | " KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO 445 | " THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICU‐ 446 | " LAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 447 | " AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 448 | " DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CON‐ 449 | " TRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CON‐ 450 | " NECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 451 | " THE SOFTWARE. 452 | 453 | " }}} 454 | -------------------------------------------------------------------------------- /vimrc: -------------------------------------------------------------------------------- 1 | " hSATAC's vimrc 2 | " Ash Wu (aka. cAt) 3 | " Fork me on GITHUB https://github.com/hSATAC/vimrc 4 | 5 | " read https://github.com/hSATAC/vimrc/blob/master/README.md for more info 6 | 7 | 8 | " For pathogen.vim: auto load all plugins in .vim/bundle 9 | " 10 | 11 | let g:python_host_prog = '/usr/local/bin/python' 12 | let g:python3_host_prog = '/usr/local/bin/python3' 13 | 14 | if has("nvim") 15 | let $NVIM_TUI_ENABLE_TRUE_COLOR=1 16 | let base16colorspace=256 17 | endif 18 | 19 | execute pathogen#infect() 20 | 21 | "--------------------------------------------------------------------------- 22 | " ENCODING SETTINGS 23 | "--------------------------------------------------------------------------- 24 | 25 | set encoding=utf-8 26 | set fileencodings=utf-8,chinese,latin-1 27 | set fileencoding=utf-8 28 | source $VIMRUNTIME/delmenu.vim 29 | source $VIMRUNTIME/menu.vim 30 | 31 | " General Settings 32 | 33 | set nocompatible " not compatible with the old-fashion vi mode 34 | set bs=2 " allow backspacing over everything in insert mode 35 | set history=50 " keep 50 lines of command line history 36 | set ruler " show the cursor position all the time 37 | set autoread " auto read when file is changed from outside 38 | set nu " display line number 39 | set ts=4 " tabstop 4 40 | set wak=no " disable GUI alt menu 41 | set noswapfile 42 | set list listchars=tab:»·,trail:· 43 | 44 | set shell=/bin/bash 45 | 46 | filetype on " Enable filetype detection 47 | filetype indent on " Enable filetype-specific indenting 48 | filetype plugin on " Enable filetype-specific plugins 49 | 50 | retab " this will cause all existing tabs to be expanded 51 | 52 | 53 | " auto reload vimrc when editing it 54 | autocmd! bufwritepost .vimrc source ~/.vimrc 55 | 56 | 57 | syntax on " syntax highlight 58 | set hlsearch " search highlighting 59 | 60 | if has("gui_running") " GUI color and font settings 61 | if has("gui_gtk2") 62 | set guifont=Bitstream\ Vera\ Sans\ Mono\ 13 63 | else 64 | set guifont=Bitstream_Vera_Sans_Mono:h13 65 | endif 66 | set t_Co=256 " 256 color mode 67 | set cursorline " highlight current line 68 | colors hybrid 69 | set background=dark 70 | else 71 | " terminal color settings 72 | colors gruvbox 73 | set background=dark 74 | endif 75 | 76 | set clipboard=unnamed " yank to the system register (*) by default 77 | set showmatch " Cursor shows matching ) and } 78 | set showmode " Show current mode 79 | set wildchar= " start wild expansion in the command line using 80 | set wildmenu " wild char completion menu 81 | 82 | " ignore these files while expanding wild chars 83 | set wildignore=*.o,*.class,*.pyc 84 | 85 | set autoindent " auto indentation 86 | set incsearch " incremental search 87 | set nobackup " no *~ backup files 88 | set copyindent " copy the previous indentation on autoindenting 89 | set ignorecase " ignore case when searching 90 | set smartcase " ignore case if search pattern is all lowercase,case-sensitive otherwise 91 | set smarttab " insert tabs on the start of a line according to context 92 | 93 | " disable sound on errors 94 | set noerrorbells 95 | set novisualbell 96 | set t_vb= 97 | set tm=500 98 | 99 | " TAB setting{ 100 | set expandtab "replace with spaces 101 | set softtabstop=4 102 | set shiftwidth=4 103 | 104 | au FileType Makefile set noexpandtab 105 | "} 106 | 107 | " status line { 108 | set laststatus=2 109 | set statusline=\ %{HasPaste()}%<%-15.25(%f%)%m%r%h\ %w\ \ 110 | set statusline+=\ \ \ [%{&ff}/%Y] 111 | set statusline+=\ \ \ %<%20.30(%{hostname()}:%{CurDir()}%)\ 112 | set statusline+=%=%-10.(%l,%c%V%)\ %p%%/%L 113 | 114 | function! CurDir() 115 | let curdir = substitute(getcwd(), $HOME, "~", "") 116 | return curdir 117 | endfunction 118 | 119 | function! HasPaste() 120 | if &paste 121 | return '[PASTE]' 122 | else 123 | return '' 124 | endif 125 | endfunction 126 | 127 | "} 128 | 129 | " Remove trailing white spaces 130 | function StripTrailingWhitespace() 131 | if !&binary && &filetype != 'diff' 132 | normal mz 133 | normal Hmy 134 | %s/\s\+$//e 135 | normal 'yz 136 | normal `z 137 | endif 138 | endfunction 139 | 140 | " C/C++ specific settings 141 | autocmd FileType c,cpp,cc set cindent comments=sr:/*,mb:*,el:*/,:// cino=>s,e0,n0,f0,{0,}0,^-1s,:0,=s,g0,h1s,p2,t0,+2,(2,)20,*30 142 | 143 | 144 | " Python 145 | "autocmd BufNewFile,BufRead *.py set ts=2 sts=2 sw=2 noet 146 | 147 | " Ruby 148 | autocmd FileType ruby,eruby,yaml set softtabstop=2 shiftwidth=2 tabstop=2 149 | autocmd BufNewFile,BufRead *.eyaml set filetype=yaml 150 | autocmd BufNewFile,BufRead *.cap set filetype=ruby 151 | 152 | " Go 153 | "au FileType go au BufWritePre GoFmt 154 | "au FileType go 155 | "\ set ts=2 | " Set tabs to 2 spaces 156 | "\ set noexpandtab 157 | "\ set shiftwidth=2 158 | "\ set softtabstop=2 159 | 160 | " Nginx 161 | au BufRead,BufNewFile */nginx/*.conf set ft=nginx 162 | 163 | "Restore cursor to file position in previous editing session 164 | "set viminfo='10,\"100,:20,%,n~/.viminfo 165 | "set viminfo='10,\"100,:20,%,n~/.viminfo 166 | au BufReadPost * if line("'\"") > 0|if line("'\"") <= line("$")|exe("norm '\"")|else|exe "norm $"|endif|endif 167 | 168 | " Alias Q, W to q, w. ref: http://usevim.com/2013/05/01/not-an-editor-command/ 169 | command! -bang -range=% -complete=file -nargs=* W ,write 170 | 171 | command! -bang Q quit 172 | 173 | "--------------------------------------------------------------------------- 174 | " Tip #382: Search for and replace with input() in all open buffers 175 | "--------------------------------------------------------------------------- 176 | fun! Replace() 177 | let s:word = input("Replace " . expand('') . " with:") 178 | :exe 'bufdo! %s/\<' . expand('') . '\>/' . s:word . '/ge' 179 | :unlet! s:word 180 | endfun 181 | 182 | " Highlight trailing whitespaces 183 | highlight ExtraWhitespace ctermbg=red guibg=red 184 | match ExtraWhitespace /\s\+$/ 185 | autocmd BufWinEnter * match ExtraWhitespace /\s\+$/ 186 | autocmd InsertEnter * match ExtraWhitespace /\s\+\%#\@r :call Replace() 201 | 202 | " --- move around splits { 203 | " move to and maximize the below split 204 | map j_ 205 | " move to and maximize the above split 206 | map k_ 207 | " move to and maximize the left split 208 | nmap h 209 | " move to and maximize the right split 210 | nmap l 211 | set wmw=0 " set the min width of a window to 0 so we can maximize others 212 | set wmh=0 " set the min height of a window to 0 so we can maximize others 213 | " } 214 | 215 | " move around tabs. conflict with the original screen top/bottom 216 | " comment them out if you want the original H/L 217 | " go to prev tab 218 | map gT 219 | " go to next tab 220 | map gt 221 | map gt 222 | 223 | " new tab 224 | map :tabnew 225 | " close tab 226 | map :tabclose 227 | 228 | if(has("gui_running") && !has("mac")) " gvim win 32 and gvim linux 229 | map ÷ :tabclose 230 | endif 231 | if(has("gui_macvim") && !has("gui_running")) " macvim console 232 | map w :tabclose 233 | endif 234 | 235 | " ,/ turn off search highlighting 236 | nmap / :set hlsearch! hlsearch? 237 | 238 | " Bash like keys for the command line 239 | cnoremap 240 | cnoremap 241 | cnoremap 242 | 243 | " ,p toggles paste mode 244 | nmap p :set paste!set paste? 245 | 246 | " allow multiple indentation/deindentation in visual mode 247 | vnoremap < >gv 249 | 250 | " :cd. change working directory to that of the current file 251 | cmap cd. lcd %:p:h 252 | 253 | " Writing Restructured Text (Sphinx Documentation) { 254 | " Ctrl-u 1: underline Parts w/ #'s 255 | noremap 1 yyPVr#yyjp 256 | inoremap 1 yyPVr#yyjpA 257 | " Ctrl-u 2: underline Chapters w/ *'s 258 | noremap 2 yyPVr*yyjp 259 | inoremap 2 yyPVr*yyjpA 260 | " Ctrl-u 3: underline Section Level 1 w/ ='s 261 | noremap 3 yypVr= 262 | inoremap 3 yypVr=A 263 | " Ctrl-u 4: underline Section Level 2 w/ -'s 264 | noremap 4 yypVr- 265 | inoremap 4 yypVr-A 266 | " Ctrl-u 5: underline Section Level 3 w/ ^'s 267 | noremap 5 yypVr^ 268 | inoremap 5 yypVr^A 269 | "} 270 | 271 | """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 272 | " RENAME CURRENT FILE 273 | """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 274 | function! RenameFile() 275 | let old_name = expand('%') 276 | let new_name = input('New file name: ', expand('%'), 'file') 277 | if new_name != '' && new_name != old_name 278 | exec ':saveas ' . new_name 279 | exec ':silent !rm ' . old_name 280 | redraw! 281 | endif 282 | endfunction 283 | map n :call RenameFile() 284 | 285 | "--------------------------------------------------------------------------- 286 | " PROGRAMMING SHORTCUTS 287 | "--------------------------------------------------------------------------- 288 | 289 | " switch between file 290 | nnoremap o 291 | 292 | " ,g generates the header guard 293 | map g :call IncludeGuard() 294 | fun! IncludeGuard() 295 | let basename = substitute(bufname(""), '.*/', '', '') 296 | let guard = '_' . substitute(toupper(basename), '\.', '_', "H") 297 | call append(0, "#ifndef " . guard) 298 | call append(1, "#define " . guard) 299 | call append( line("$"), "#endif // for #ifndef " . guard) 300 | endfun 301 | 302 | 303 | 304 | " enable omni completion. (ctrl-x ctrl-o) 305 | set cot=menuone,preview 306 | autocmd insertleave * if pumvisible() == 0|pclose|endif 307 | autocmd filetype html,markdown setlocal omnifunc=htmlcomplete#Completetags 308 | autocmd filetype javascript setlocal omnifunc=javascriptcomplete#CompleteJS 309 | autocmd filetype python setlocal omnifunc=pythoncomplete#Complete 310 | autocmd filetype xml setlocal omnifunc=xmlcomplete#completetags 311 | autocmd filetype css set omnifunc=csscomplete#CompleteCSS 312 | autocmd filetype c set omnifunc=ccomplete#Complete 313 | autocmd filetype java set omnifunc=javacomplete#Complete 314 | autocmd filetype php set omnifunc=phpcomplete#CompletePHP 315 | autocmd FileType ruby set omnifunc=rubycomplete#Complete 316 | 317 | " use syntax complete if nothing else available 318 | if has("autocmd") && exists("+omnifunc") 319 | autocmd Filetype * 320 | \ if &omnifunc == "" | 321 | \ setlocal omnifunc=syntaxcomplete#Complete | 322 | \ endif 323 | endif 324 | 325 | 326 | " make CSS omnicompletion work for SASS and SCSS 327 | autocmd BufNewFile,BufRead *.scss set ft=scss.css 328 | autocmd BufNewFile,BufRead *.sass set ft=sass.css 329 | 330 | " Don't override register when pasting 331 | function! RestoreRegister() 332 | let @" = s:restore_reg 333 | if &clipboard == "unnamed" 334 | let @* = s:restore_reg 335 | endif 336 | return '' 337 | endfunction 338 | 339 | function! s:Repl() 340 | let s:restore_reg = @" 341 | return "p@=RestoreRegister()\" 342 | endfunction 343 | 344 | " NB: this supports "rp that replaces the selection by the contents of @r 345 | vnoremap p Repl() 346 | 347 | "--------------------------------------------------------------------------- 348 | " PLUGIN SETTINGS 349 | "--------------------------------------------------------------------------- 350 | 351 | " --- AutoClose - Inserts matching bracket, paren, brace or quote 352 | " fixed the arrow key problems caused by AutoClose 353 | "IF !HAS("GUI_RUNNING") 354 | "set term=linux 355 | "set t_k1=[11~ 356 | "set t_k2=[11~ 357 | "set t_k3=[11~ 358 | "set t_k4=[11~ 359 | ""imap oa ki 360 | ""imap ob ji 361 | ""imap oc li 362 | ""imap od hi 363 | 364 | "nmap oa k 365 | "nmap ob j 366 | "nmap oc l 367 | "nmap od h 368 | 369 | "set = 370 | "set = 371 | 372 | "if $term =~ 'xterm' 373 | "set =op 374 | "set =oq 375 | "set =or 376 | "set =os 377 | "set =oh 378 | "set =of 379 | "endif 380 | "if $term =~ 'screen' 381 | "set =op 382 | "set =oq 383 | "set =or 384 | "set =os 385 | "endif 386 | "endif 387 | 388 | " --- vim-diff-enhanced 389 | " autocmd VimEnter * CustomDiff histogram 390 | 391 | " --- ctrlp 392 | map f :CtrlPMixed 393 | 394 | let g:ctrlp_regexp = 1 395 | let g:ctrlp_match_window_reversed = 0 396 | let g:ctrlp_prompt_mappings = { 'PrtAdd(".*")': [''] } 397 | "let g:ctrlp_user_command = { 398 | "\ 'types': { 399 | "\ 1: ['.git', 'cd %s && git ls-files -c -o'], 400 | "\ 2: ['.hg', 'hg --cwd %s locate -I .'], 401 | "\ }, 402 | "\ 'fallback': 'find %s -type f' 403 | "\ } 404 | 405 | " --- taglist 406 | nmap :TlistToggle 407 | imap :TlistToggle 408 | let Tlist_Use_SingleClick = 1 409 | let Tlist_Use_Right_Window = 1 410 | let Tlist_Show_One_File = 1 411 | let tlist_php_settings = 'php;c:class;d:constant;f:function' 412 | " --- tagbar 413 | nnoremap :TagbarToggle 414 | let g:tagbar_autofocus = 1 415 | 416 | let g:tagbar_type_go = { 417 | \ 'ctagstype' : 'go', 418 | \ 'kinds' : [ 419 | \ 'p:package', 420 | \ 'i:imports:1', 421 | \ 'c:constants', 422 | \ 'v:variables', 423 | \ 't:types', 424 | \ 'n:interfaces', 425 | \ 'w:fields', 426 | \ 'e:embedded', 427 | \ 'm:methods', 428 | \ 'r:constructor', 429 | \ 'f:functions' 430 | \ ], 431 | \ 'sro' : '.', 432 | \ 'kind2scope' : { 433 | \ 't' : 'ctype', 434 | \ 'n' : 'ntype' 435 | \ }, 436 | \ 'scope2kind' : { 437 | \ 'ctype' : 't', 438 | \ 'ntype' : 'n' 439 | \ }, 440 | \ 'ctagsbin' : 'gotags', 441 | \ 'ctagsargs' : '-sort -silent' 442 | \ } 443 | 444 | " --- nerdtree 445 | let NERDTreeShowHidden=1 446 | let g:nerdtree_tabs_open_on_gui_startup=0 447 | nnoremap :NERDTreeMirrorToggle 448 | 449 | " --- Buffergator 450 | let g:buffergator_viewport_split_policy = "b" 451 | let g:buffergator_suppress_keymaps="1" 452 | let g:buffergator_autodismiss_on_select=1 453 | let g:buffergator_split_size=12 454 | let g:buffergator_autoupdate=1 455 | map b :BuffergatorToggle 456 | 457 | " --- syntastic 458 | let g:syntastic_puppet_checkers=['puppetlint'] 459 | let g:syntastic_shell = "/bin/bash" 460 | 461 | " --- gitgutter 462 | highlight clear SignColumn 463 | let g:gitgutter_enabled = 1 464 | 465 | " --- copy to osx clipboard 466 | map :w !pbcopy 467 | 468 | " --- Switch.vim 469 | nnoremap - :Switch 470 | 471 | " --- SingleCompile 472 | nmap :SCCompile 473 | nmap :SCCompileRun 474 | 475 | " --- VimRails 476 | 477 | let g:rails_projections = { 478 | \ "app/presenters/*.rb": { "command": "presenters" }, 479 | \ "app/observers/*.rb": { "command": "observers" }, 480 | \ "app/services/*.rb": { "command": "services" }, 481 | \ "app/extras/form_object/*.rb": {"command": "forms"}, 482 | \ "app/forms/*.rb": {"command": "forms"}, 483 | \ "app/extras/service/*.rb": {"command": ["services", "forms", "models"]}, 484 | \ "app/extras/view_object/*.rb": {"command": "views"}, 485 | \ "app/models/fields/*.rb": {"command": "fields"}, 486 | \ "app/models/fields_data/*.rb": {"command": "fields"}, 487 | \ "app/models/concerns/*.rb": {"command": ["models", "cerns"]}, 488 | \ "app/models/reports/*.rb": {"command": "reports"}, 489 | \ "spec/factories/*.rb": {"command": "factories"}, 490 | \ "spec/factories/fields/*.rb": {"command": "factories"}, 491 | \ "spec/features/*.rb": {"command": "features"}, 492 | \ "spec/support/*.rb": {"command": "supports"}, 493 | \ "lib/tasks/*.rake": {"alternate": ["spec/lib/tasks/%s.rake_spec.rb"]}, 494 | \ "app/assets/javascripts/*.js.coffee": {"alternate": ["spec/javascripts/%s_spec.js.coffee"]}, 495 | \ "spec/javascripts/*_spec.js.coffee": {"alternate": ["app/assets/javascripts/%s.js.coffee"]} 496 | \ } 497 | 498 | " Open/Create related spec/file 499 | function! s:CreateRelated() 500 | let related = s:GetRelatedFile(expand('%')) 501 | call s:Open(related) 502 | endfunction 503 | 504 | " Return the related filename 505 | function! s:GetRelatedFile(file) 506 | if match(a:file, '_spec\.rb$') != -1 507 | return substitute(substitute(a:file, "_spec.rb$", ".rb", ""), '^spec/', 'app/', '') 508 | else 509 | return substitute(substitute(a:file, ".rb$", "_spec.rb", ""), '^app/', 'spec/', '') 510 | endif 511 | endfunction 512 | 513 | " Open the related file in a vsplit 514 | function! s:Open(file) 515 | exec('split ' . a:file) 516 | endfunction 517 | 518 | " Register a new command `AC` for open/create a 519 | " related file 520 | command! AC :call CreateRelated() 521 | 522 | " --- dash.vim 523 | 524 | function! SearchDash() 525 | let s:browser = "/usr/bin/open" 526 | let s:wordUnderCursor = expand("") 527 | let s:url = "dash://".s:wordUnderCursor 528 | let s:cmd ="silent ! " . s:browser . " " . s:url 529 | execute s:cmd 530 | redraw! 531 | endfunction 532 | map h :call SearchDash() 533 | 534 | " --- vim-turbux 535 | let g:no_turbux_mappings = 1 536 | au Filetype ruby 537 | \ map t SendTestToTmux | 538 | \ map r SendFocusedTestToTmux | 539 | \ let g:turbux_command_rspec = 'zeus rspec' " default: rspec 540 | 541 | au FileType go map t :Tmux go test 542 | 543 | " --- vim-multiple-cursors 544 | let g:multi_cursor_exit_from_insert_mode = 0 545 | 546 | " --- align.vim 547 | 548 | " For Ruby hash 549 | command! -range AlignHash execute ",Align! P01 : =>" 550 | 551 | " --- vim-indent-guide 552 | let g:indent_guides_start_level = 2 553 | "let g:indent_guides_enable_on_vim_startup = 1 554 | let g:indent_guides_guide_size = 1 555 | let g:indent_guides_color_change_percent = 5 556 | let g:indent_guides_auto_colors = 0 557 | autocmd VimEnter,Colorscheme * :hi IndentGuidesOdd ctermbg=235 558 | autocmd VimEnter,Colorscheme * :hi IndentGuidesEven ctermbg=235 559 | 560 | " --- vim-airline 561 | set ttimeoutlen=50 562 | let g:airline_left_sep = '' 563 | let g:airline_right_sep = '' 564 | let g:airline_powerline_fonts = 0 565 | let g:airline#extensions#whitespace#enabled = 0 566 | let g:airline#extensions#branch#enabled = 1 567 | let g:airline#extensions#syntastic#enabled = 0 568 | let g:airline#extensions#tagbar#enabled = 1 569 | let g:airline#extensions#csv#enabled = 0 570 | let g:airline#extensions#hunks#enabled = 0 571 | let g:airline#extensions#virtualenv#enabled = 1 572 | 573 | let g:airline_theme_patch_func = 'AirlineThemePatch' 574 | function! AirlineThemePatch(palette) 575 | if g:airline_theme == 'wombat' 576 | for colors in values(a:palette.inactive) 577 | let colors[3] = 235 578 | endfor 579 | endif 580 | endfunction 581 | 582 | " --- easymotion 583 | "hi EasyMotionTarget ctermbg=8 ctermfg=12 584 | "hi EasyMotionShade ctermbg=none ctermfg=blue 585 | 586 | " --- Startify 587 | let g:startify_change_to_vcs_root = 1 588 | let g:startify_custom_header = [ 589 | \ ' _', 590 | \ ' |\___/| \\', 591 | \ ' ) ( |\_/| ||', 592 | \ ' =\ /= )a a `,_.-""""-. //', 593 | \ ' )===( =\Y_= / \//', 594 | \ ' / \ `"`\ / /', 595 | \ ' | | | \ | /', 596 | \ ' / \ \ /- \ \', 597 | \ ' \ / || | // /`', 598 | \ ' _/\_/\_/\_ _/_/\_/\_/\_((_|\((_//\_/\_/\_/\_', 599 | \ '', 600 | \ '', 601 | \ ] 602 | 603 | " --- snippet 604 | 605 | " Plugin key-mappings. 606 | imap (neosnippet_expand_or_jump) 607 | smap (neosnippet_expand_or_jump) 608 | xmap (neosnippet_expand_target) 609 | 610 | """ SuperTab like snippets behavior. 611 | imap 612 | \ pumvisible() ? "\" : 613 | \ neosnippet#expandable_or_jumpable() ? 614 | \ "\(neosnippet_expand_or_jump)" : "\" 615 | smap neosnippet#expandable_or_jumpable() ? 616 | \ "\(neosnippet_expand_or_jump)" : "\" 617 | 618 | """ For conceal markers. 619 | if has('conceal') 620 | "set conceallevel=2 concealcursor=niv 621 | set conceallevel=0 622 | endif 623 | 624 | set termguicolors 625 | -------------------------------------------------------------------------------- /colors/peaksea.vim: -------------------------------------------------------------------------------- 1 | " Vim color file --- psc (peak sea color) "Lite version" 2 | " Maintainer: Pan, Shi Zhu 3 | " URL: http://vim.sourceforge.net/scripts/script.php?script_id=760 4 | " Last Change: 5 Feb 2010 5 | " Version: 3.4 6 | " 7 | " Comments and e-mails are welcomed, thanks. 8 | " 9 | " The peaksea color is simply a colorscheme with the default settings of 10 | " the original ps_color. Lite version means there's no custom settings 11 | " and fancy features such as integration with reloaded.vim 12 | " 13 | " The full version of ps_color.vim will be maintained until Vim 8. 14 | " By then there will be only the lite version: peaksea.vim 15 | " 16 | " Note: Please set the background option in your .vimrc and/or .gvimrc 17 | " 18 | " It is much better *not* to set 'background' option inside 19 | " a colorscheme file. because ":set background" improperly 20 | " may cause colorscheme be sourced twice 21 | " 22 | " Color Scheme Overview: 23 | " :ru syntax/hitest.vim 24 | " 25 | " Relevant Help: 26 | " :h highlight-groups 27 | " :h psc-cterm-color-table 28 | " 29 | " Colors Order: 30 | " #rrggbb 31 | " 32 | 33 | hi clear 34 | 35 | if exists("syntax_on") 36 | syntax reset 37 | endif 38 | 39 | let g:colors_name = expand(":t:r") 40 | 41 | " I don't want to abuse folding, but here folding is used to avoid confusion. 42 | if &background=='light' 43 | " for background=light {{{2 44 | " LIGHT COLOR DEFINE START 45 | 46 | hi Normal guifg=#000000 guibg=#e0e0e0 gui=NONE 47 | hi Search guifg=NONE guibg=#f8f8f8 gui=NONE 48 | hi Visual guifg=NONE guibg=#a6caf0 gui=NONE 49 | hi Cursor guifg=#f0f0f0 guibg=#008000 gui=NONE 50 | " The idea of CursorIM is pretty good, however, the feature is still buggy 51 | " in the current version (Vim 7.0). 52 | " The following line will be kept commented until the bug fixed. 53 | " 54 | " hi CursorIM guifg=#f0f0f0 guibg=#800080 55 | hi Special guifg=#907000 guibg=NONE gui=NONE 56 | hi Comment guifg=#606000 guibg=NONE gui=NONE 57 | hi Number guifg=#907000 guibg=NONE gui=NONE 58 | hi Constant guifg=#007068 guibg=NONE gui=NONE 59 | hi StatusLine guifg=fg guibg=#a6caf0 gui=NONE 60 | hi LineNr guifg=#686868 guibg=NONE gui=NONE 61 | hi Question guifg=fg guibg=#d0d090 gui=NONE 62 | hi PreProc guifg=#009030 guibg=NONE gui=NONE 63 | hi Statement guifg=#2060a8 guibg=NONE gui=NONE 64 | hi Type guifg=#0850a0 guibg=NONE gui=NONE 65 | hi Todo guifg=#800000 guibg=#e0e090 gui=NONE 66 | " NOTE THIS IS IN THE WARM SECTION 67 | hi Error guifg=#c03000 guibg=NONE gui=NONE 68 | hi Identifier guifg=#a030a0 guibg=NONE gui=NONE 69 | hi ModeMsg guifg=fg guibg=#b0b0e0 gui=NONE 70 | hi VisualNOS guifg=fg guibg=#b0b0e0 gui=NONE 71 | hi SpecialKey guifg=#1050a0 guibg=NONE gui=NONE 72 | hi NonText guifg=#002090 guibg=#d0d0d0 gui=NONE 73 | hi Directory guifg=#a030a0 guibg=NONE gui=NONE 74 | hi ErrorMsg guifg=fg guibg=#f0b090 gui=NONE 75 | hi MoreMsg guifg=#489000 guibg=NONE gui=NONE 76 | hi Title guifg=#a030a0 guibg=NONE gui=NONE 77 | hi WarningMsg guifg=#b02000 guibg=NONE gui=NONE 78 | hi WildMenu guifg=fg guibg=#d0d090 gui=NONE 79 | hi Folded guifg=NONE guibg=#b0e0b0 gui=NONE 80 | hi FoldColumn guifg=fg guibg=#90e090 gui=NONE 81 | hi DiffAdd guifg=NONE guibg=#b0b0e0 gui=NONE 82 | hi DiffChange guifg=NONE guibg=#e0b0e0 gui=NONE 83 | hi DiffDelete guifg=#002090 guibg=#d0d0d0 gui=NONE 84 | hi DiffText guifg=NONE guibg=#c0e080 gui=NONE 85 | hi SignColumn guifg=fg guibg=#90e090 gui=NONE 86 | 87 | hi IncSearch guifg=#f0f0f0 guibg=#806060 gui=NONE 88 | hi StatusLineNC guifg=fg guibg=#c0c0c0 gui=NONE 89 | hi VertSplit guifg=fg guibg=#c0c0c0 gui=NONE 90 | hi Underlined guifg=#6a5acd guibg=NONE gui=underline 91 | hi Ignore guifg=bg guibg=NONE 92 | " NOTE THIS IS IN THE WARM SECTION 93 | if v:version >= 700 94 | if has('spell') 95 | hi SpellBad guifg=NONE guibg=NONE guisp=#c03000 96 | hi SpellCap guifg=NONE guibg=NONE guisp=#2060a8 97 | hi SpellRare guifg=NONE guibg=NONE guisp=#a030a0 98 | hi SpellLocal guifg=NONE guibg=NONE guisp=#007068 99 | endif 100 | hi Pmenu guifg=fg guibg=#e0b0e0 101 | hi PmenuSel guifg=#f0f0f0 guibg=#806060 gui=NONE 102 | hi PmenuSbar guifg=fg guibg=#c0c0c0 gui=NONE 103 | hi PmenuThumb guifg=fg guibg=#c0e080 gui=NONE 104 | hi TabLine guifg=fg guibg=#c0c0c0 gui=NONE 105 | hi TabLineFill guifg=fg guibg=#c0c0c0 gui=NONE 106 | hi TabLineSel guifg=fg guibg=NONE gui=NONE 107 | hi CursorColumn guifg=NONE guibg=#f0b090 108 | hi CursorLine guifg=NONE guibg=NONE gui=underline 109 | hi MatchParen guifg=NONE guibg=#c0e080 110 | endif 111 | 112 | " LIGHT COLOR DEFINE END 113 | 114 | " Vim 7 added stuffs 115 | if v:version >= 700 116 | hi Ignore gui=NONE 117 | 118 | " the gui=undercurl guisp could only support in Vim 7 119 | if has('spell') 120 | hi SpellBad gui=undercurl 121 | hi SpellCap gui=undercurl 122 | hi SpellRare gui=undercurl 123 | hi SpellLocal gui=undercurl 124 | endif 125 | hi TabLine gui=underline 126 | hi TabLineFill gui=underline 127 | hi CursorLine gui=underline 128 | endif 129 | 130 | " For reversed stuffs, clear the reversed prop and set the bold prop again 131 | hi IncSearch gui=bold 132 | hi StatusLine gui=bold 133 | hi StatusLineNC gui=bold 134 | hi VertSplit gui=bold 135 | hi Visual gui=bold 136 | 137 | " Enable the bold property 138 | hi Question gui=bold 139 | hi DiffText gui=bold 140 | hi Statement gui=bold 141 | hi Type gui=bold 142 | hi MoreMsg gui=bold 143 | hi ModeMsg gui=bold 144 | hi NonText gui=bold 145 | hi Title gui=bold 146 | hi DiffDelete gui=bold 147 | hi TabLineSel gui=bold 148 | 149 | " gui define for background=light end here 150 | 151 | " generally, a dumb terminal is dark, we assume the light terminal has 256 152 | " color support. 153 | if &t_Co==8 || &t_Co==16 154 | set t_Co=256 155 | endif 156 | if &t_Co==256 157 | " 256color light terminal support here 158 | 159 | hi Normal ctermfg=16 ctermbg=254 cterm=NONE 160 | " Comment/Uncomment the following line to disable/enable transparency 161 | "hi Normal ctermfg=16 ctermbg=NONE cterm=NONE 162 | hi Search ctermfg=NONE ctermbg=231 cterm=NONE 163 | hi Visual ctermfg=NONE ctermbg=153 cterm=NONE 164 | hi Cursor ctermfg=255 ctermbg=28 cterm=NONE 165 | " hi CursorIM ctermfg=255 ctermbg=90 166 | hi Special ctermfg=94 ctermbg=NONE cterm=NONE 167 | hi Comment ctermfg=58 ctermbg=NONE cterm=NONE 168 | hi Number ctermfg=94 ctermbg=NONE cterm=NONE 169 | hi Constant ctermfg=23 ctermbg=NONE cterm=NONE 170 | hi StatusLine ctermfg=fg ctermbg=153 cterm=NONE 171 | hi LineNr ctermfg=242 ctermbg=NONE cterm=NONE 172 | hi Question ctermfg=fg ctermbg=186 cterm=NONE 173 | hi PreProc ctermfg=29 ctermbg=NONE cterm=NONE 174 | hi Statement ctermfg=25 ctermbg=NONE cterm=NONE 175 | hi Type ctermfg=25 ctermbg=NONE cterm=NONE 176 | hi Todo ctermfg=88 ctermbg=186 cterm=NONE 177 | " NOTE THIS IS IN THE WARM SECTION 178 | hi Error ctermfg=130 ctermbg=NONE cterm=NONE 179 | hi Identifier ctermfg=133 ctermbg=NONE cterm=NONE 180 | hi ModeMsg ctermfg=fg ctermbg=146 cterm=NONE 181 | hi VisualNOS ctermfg=fg ctermbg=146 cterm=NONE 182 | hi SpecialKey ctermfg=25 ctermbg=NONE cterm=NONE 183 | hi NonText ctermfg=18 ctermbg=252 cterm=NONE 184 | " Comment/Uncomment the following line to disable/enable transparency 185 | "hi NonText ctermfg=18 ctermbg=NONE cterm=NONE 186 | hi Directory ctermfg=133 ctermbg=NONE cterm=NONE 187 | hi ErrorMsg ctermfg=fg ctermbg=216 cterm=NONE 188 | hi MoreMsg ctermfg=64 ctermbg=NONE cterm=NONE 189 | hi Title ctermfg=133 ctermbg=NONE cterm=NONE 190 | hi WarningMsg ctermfg=124 ctermbg=NONE cterm=NONE 191 | hi WildMenu ctermfg=fg ctermbg=186 cterm=NONE 192 | hi Folded ctermfg=NONE ctermbg=151 cterm=NONE 193 | hi FoldColumn ctermfg=fg ctermbg=114 cterm=NONE 194 | hi DiffAdd ctermfg=NONE ctermbg=146 cterm=NONE 195 | hi DiffChange ctermfg=NONE ctermbg=182 cterm=NONE 196 | hi DiffDelete ctermfg=18 ctermbg=252 cterm=NONE 197 | hi DiffText ctermfg=NONE ctermbg=150 cterm=NONE 198 | hi SignColumn ctermfg=fg ctermbg=114 cterm=NONE 199 | 200 | hi IncSearch ctermfg=255 ctermbg=95 cterm=NONE 201 | hi StatusLineNC ctermfg=fg ctermbg=250 cterm=NONE 202 | hi VertSplit ctermfg=fg ctermbg=250 cterm=NONE 203 | hi Underlined ctermfg=62 ctermbg=NONE cterm=underline 204 | hi Ignore ctermfg=bg ctermbg=NONE 205 | " NOTE THIS IS IN THE WARM SECTION 206 | if v:version >= 700 207 | if has('spell') 208 | if 0 209 | " ctermsp is not supported in Vim7, we ignore it. 210 | hi SpellBad cterm=undercurl ctermbg=NONE ctermfg=130 211 | hi SpellCap cterm=undercurl ctermbg=NONE ctermfg=25 212 | hi SpellRare cterm=undercurl ctermbg=NONE ctermfg=133 213 | hi SpellLocal cterm=undercurl ctermbg=NONE ctermfg=23 214 | else 215 | hi SpellBad cterm=undercurl ctermbg=NONE ctermfg=NONE 216 | hi SpellCap cterm=undercurl ctermbg=NONE ctermfg=NONE 217 | hi SpellRare cterm=undercurl ctermbg=NONE ctermfg=NONE 218 | hi SpellLocal cterm=undercurl ctermbg=NONE ctermfg=NONE 219 | endif 220 | endif 221 | hi Pmenu ctermfg=fg ctermbg=182 222 | hi PmenuSel ctermfg=255 ctermbg=95 cterm=NONE 223 | hi PmenuSbar ctermfg=fg ctermbg=250 cterm=NONE 224 | hi PmenuThumb ctermfg=fg ctermbg=150 cterm=NONE 225 | hi TabLine ctermfg=fg ctermbg=250 cterm=NONE 226 | hi TabLineFill ctermfg=fg ctermbg=250 cterm=NONE 227 | hi TabLineSel ctermfg=fg ctermbg=NONE cterm=NONE 228 | hi CursorColumn ctermfg=NONE ctermbg=216 229 | hi CursorLine ctermfg=NONE ctermbg=NONE cterm=underline 230 | hi MatchParen ctermfg=NONE ctermbg=150 231 | endif 232 | 233 | hi TabLine cterm=underline 234 | hi TabLineFill cterm=underline 235 | hi CursorLine cterm=underline 236 | 237 | " For reversed stuffs, clear the reversed prop and set the bold prop again 238 | hi IncSearch cterm=bold 239 | hi StatusLine cterm=bold 240 | hi StatusLineNC cterm=bold 241 | hi VertSplit cterm=bold 242 | hi Visual cterm=bold 243 | 244 | hi NonText cterm=bold 245 | hi Question cterm=bold 246 | hi Title cterm=bold 247 | hi DiffDelete cterm=bold 248 | hi DiffText cterm=bold 249 | hi Statement cterm=bold 250 | hi Type cterm=bold 251 | hi MoreMsg cterm=bold 252 | hi ModeMsg cterm=bold 253 | hi TabLineSel cterm=bold 254 | 255 | "hi lCursor ctermfg=bg ctermbg=fg cterm=NONE 256 | endif " t_Co==256 257 | " }}}2 258 | elseif &background=='dark' 259 | " for background=dark {{{2 260 | " DARK COLOR DEFINE START 261 | 262 | hi Normal guifg=#d0d0d0 guibg=#202020 gui=NONE 263 | hi Comment guifg=#d0d090 guibg=NONE gui=NONE 264 | hi Constant guifg=#80c0e0 guibg=NONE gui=NONE 265 | hi Number guifg=#e0c060 guibg=NONE gui=NONE 266 | hi Identifier guifg=#f0c0f0 guibg=NONE gui=NONE 267 | hi Statement guifg=#c0d8f8 guibg=NONE gui=NONE 268 | hi PreProc guifg=#60f080 guibg=NONE gui=NONE 269 | hi Type guifg=#b0d0f0 guibg=NONE gui=NONE 270 | hi Special guifg=#e0c060 guibg=NONE gui=NONE 271 | hi Error guifg=#f08060 guibg=NONE gui=NONE 272 | hi Todo guifg=#800000 guibg=#d0d090 gui=NONE 273 | hi Search guifg=NONE guibg=#800000 gui=NONE 274 | hi Visual guifg=#000000 guibg=#a6caf0 gui=NONE 275 | hi Cursor guifg=#000000 guibg=#00f000 gui=NONE 276 | " NOTE THIS IS IN THE COOL SECTION 277 | " hi CursorIM guifg=#000000 guibg=#f000f0 gui=NONE 278 | hi StatusLine guifg=#000000 guibg=#a6caf0 gui=NONE 279 | hi LineNr guifg=#b0b0b0 guibg=NONE gui=NONE 280 | hi Question guifg=#000000 guibg=#d0d090 gui=NONE 281 | hi ModeMsg guifg=fg guibg=#000080 gui=NONE 282 | hi VisualNOS guifg=fg guibg=#000080 gui=NONE 283 | hi SpecialKey guifg=#b0d0f0 guibg=NONE gui=NONE 284 | hi NonText guifg=#6080f0 guibg=#101010 gui=NONE 285 | hi Directory guifg=#80c0e0 guibg=NONE gui=NONE 286 | hi ErrorMsg guifg=#d0d090 guibg=#800000 gui=NONE 287 | hi MoreMsg guifg=#c0e080 guibg=NONE gui=NONE 288 | hi Title guifg=#f0c0f0 guibg=NONE gui=NONE 289 | hi WarningMsg guifg=#f08060 guibg=NONE gui=NONE 290 | hi WildMenu guifg=#000000 guibg=#d0d090 gui=NONE 291 | hi Folded guifg=NONE guibg=#004000 gui=NONE 292 | hi FoldColumn guifg=#e0e0e0 guibg=#008000 gui=NONE 293 | hi DiffAdd guifg=NONE guibg=#000080 gui=NONE 294 | hi DiffChange guifg=NONE guibg=#800080 gui=NONE 295 | hi DiffDelete guifg=#6080f0 guibg=#202020 gui=NONE 296 | hi DiffText guifg=#000000 guibg=#c0e080 gui=NONE 297 | hi SignColumn guifg=#e0e0e0 guibg=#008000 gui=NONE 298 | hi IncSearch guifg=#000000 guibg=#d0d0d0 gui=NONE 299 | hi StatusLineNC guifg=#000000 guibg=#c0c0c0 gui=NONE 300 | hi VertSplit guifg=#000000 guibg=#c0c0c0 gui=NONE 301 | hi Underlined guifg=#80a0ff guibg=NONE gui=underline 302 | hi Ignore guifg=#000000 guibg=NONE 303 | " NOTE THIS IS IN THE COOL SECTION 304 | if v:version >= 700 305 | if has('spell') 306 | " the guisp= could only support in Vim 7 307 | hi SpellBad guifg=NONE guibg=NONE guisp=#f08060 308 | hi SpellCap guifg=NONE guibg=NONE guisp=#6080f0 309 | hi SpellRare guifg=NONE guibg=NONE guisp=#f0c0f0 310 | hi SpellLocal guifg=NONE guibg=NONE guisp=#c0d8f8 311 | endif 312 | hi Pmenu guifg=fg guibg=#800080 313 | hi PmenuSel guifg=#000000 guibg=#d0d0d0 gui=NONE 314 | hi PmenuSbar guifg=fg guibg=#000080 gui=NONE 315 | hi PmenuThumb guifg=fg guibg=#008000 gui=NONE 316 | hi TabLine guifg=fg guibg=#008000 gui=NONE 317 | hi TabLineFill guifg=fg guibg=#008000 gui=NONE 318 | hi TabLineSel guifg=fg guibg=NONE gui=NONE 319 | hi CursorColumn guifg=NONE guibg=#800000 gui=NONE 320 | hi CursorLine guifg=NONE guibg=NONE gui=underline 321 | hi MatchParen guifg=NONE guibg=#800080 322 | endif 323 | 324 | " DARK COLOR DEFINE END 325 | 326 | " Vim 7 added stuffs 327 | if v:version >= 700 328 | hi Ignore gui=NONE 329 | 330 | " the gui=undercurl could only support in Vim 7 331 | if has('spell') 332 | hi SpellBad gui=undercurl 333 | hi SpellCap gui=undercurl 334 | hi SpellRare gui=undercurl 335 | hi SpellLocal gui=undercurl 336 | endif 337 | hi TabLine gui=underline 338 | hi TabLineFill gui=underline 339 | hi Underlined gui=underline 340 | hi CursorLine gui=underline 341 | endif 342 | 343 | " gui define for background=dark end here 344 | 345 | if &t_Co==8 || &t_Co==16 346 | " for 8-color and 16-color term 347 | hi Normal ctermfg=LightGrey ctermbg=Black 348 | hi Special ctermfg=Yellow ctermbg=bg 349 | hi Comment ctermfg=DarkYellow ctermbg=bg 350 | hi Constant ctermfg=Blue ctermbg=bg 351 | hi Number ctermfg=Yellow ctermbg=bg 352 | hi LineNr ctermfg=DarkGrey ctermbg=bg 353 | hi PreProc ctermfg=Green ctermbg=bg 354 | hi Statement ctermfg=Cyan ctermbg=bg 355 | hi Type ctermfg=Cyan ctermbg=bg 356 | hi Error ctermfg=Red ctermbg=bg 357 | hi Identifier ctermfg=Magenta ctermbg=bg 358 | hi SpecialKey ctermfg=Cyan ctermbg=bg 359 | hi NonText ctermfg=Blue ctermbg=bg 360 | hi Directory ctermfg=Blue ctermbg=bg 361 | hi MoreMsg ctermfg=Green ctermbg=bg 362 | hi Title ctermfg=Magenta ctermbg=bg 363 | hi WarningMsg ctermfg=Red ctermbg=bg 364 | hi DiffDelete ctermfg=Blue ctermbg=bg 365 | 366 | hi Search ctermfg=NONE ctermbg=DarkRed 367 | hi Visual ctermfg=Black ctermbg=DarkCyan 368 | hi Cursor ctermfg=Black ctermbg=Green 369 | hi StatusLine ctermfg=Black ctermbg=DarkCyan 370 | hi Question ctermfg=Black ctermbg=DarkYellow 371 | hi Todo ctermfg=DarkRed ctermbg=DarkYellow 372 | hi Folded ctermfg=White ctermbg=DarkGreen 373 | hi ModeMsg ctermfg=Grey ctermbg=DarkBlue 374 | hi VisualNOS ctermfg=Grey ctermbg=DarkBlue 375 | hi ErrorMsg ctermfg=DarkYellow ctermbg=DarkRed 376 | hi WildMenu ctermfg=Black ctermbg=DarkYellow 377 | hi FoldColumn ctermfg=White ctermbg=DarkGreen 378 | hi SignColumn ctermfg=White ctermbg=DarkGreen 379 | hi DiffText ctermfg=Black ctermbg=DarkYellow 380 | 381 | if v:version >= 700 382 | if has('spell') 383 | hi SpellBad ctermfg=NONE ctermbg=DarkRed 384 | hi SpellCap ctermfg=NONE ctermbg=DarkBlue 385 | hi SpellRare ctermfg=NONE ctermbg=DarkMagenta 386 | hi SpellLocal ctermfg=NONE ctermbg=DarkGreen 387 | endif 388 | hi Pmenu ctermfg=fg ctermbg=DarkMagenta 389 | hi PmenuSel ctermfg=Black ctermbg=fg 390 | hi PmenuSbar ctermfg=fg ctermbg=DarkBlue 391 | hi PmenuThumb ctermfg=fg ctermbg=DarkGreen 392 | hi TabLine ctermfg=fg ctermbg=DarkGreen cterm=underline 393 | hi TabLineFill ctermfg=fg ctermbg=DarkGreen cterm=underline 394 | hi CursorColumn ctermfg=NONE ctermbg=DarkRed 395 | 396 | hi TabLineSel ctermfg=fg ctermbg=bg 397 | hi CursorLine ctermfg=NONE ctermbg=bg cterm=underline 398 | 399 | hi MatchParen ctermfg=NONE ctermbg=DarkMagenta 400 | endif 401 | if &t_Co==8 402 | " 8 colour terminal support, this assumes 16 colour is available through 403 | " setting the 'bold' attribute, will get bright foreground colour. 404 | " However, the bright background color is not available for 8-color terms. 405 | " 406 | " You can manually set t_Co=16 in your .vimrc to see if your terminal 407 | " supports 16 colours, 408 | hi DiffText cterm=none 409 | hi Visual cterm=none 410 | hi Cursor cterm=none 411 | hi Comment cterm=none 412 | hi Todo cterm=none 413 | hi StatusLine cterm=none 414 | hi Question cterm=none 415 | hi DiffChange cterm=none 416 | hi ModeMsg cterm=none 417 | hi VisualNOS cterm=none 418 | hi ErrorMsg cterm=none 419 | hi WildMenu cterm=none 420 | hi DiffAdd cterm=none 421 | hi Folded cterm=none 422 | hi DiffDelete cterm=none 423 | hi Normal cterm=none 424 | hi PmenuThumb cterm=none 425 | hi Search cterm=bold 426 | hi Special cterm=bold 427 | hi Constant cterm=bold 428 | hi Number cterm=bold 429 | hi LineNr cterm=bold 430 | hi PreProc cterm=bold 431 | hi Statement cterm=bold 432 | hi Type cterm=bold 433 | hi Error cterm=bold 434 | hi Identifier cterm=bold 435 | hi SpecialKey cterm=bold 436 | hi NonText cterm=bold 437 | hi MoreMsg cterm=bold 438 | hi Title cterm=bold 439 | hi WarningMsg cterm=bold 440 | hi FoldColumn cterm=bold 441 | hi SignColumn cterm=bold 442 | hi Directory cterm=bold 443 | hi DiffDelete cterm=bold 444 | else 445 | " Background > 7 is only available with 16 or more colors 446 | 447 | hi WarningMsg cterm=none 448 | hi Search cterm=none 449 | hi Visual cterm=none 450 | hi Cursor cterm=none 451 | hi Special cterm=none 452 | hi Comment cterm=none 453 | hi Constant cterm=none 454 | hi Number cterm=none 455 | hi LineNr cterm=none 456 | hi PreProc cterm=none 457 | hi Todo cterm=none 458 | hi Error cterm=none 459 | hi Identifier cterm=none 460 | hi Folded cterm=none 461 | hi SpecialKey cterm=none 462 | hi Directory cterm=none 463 | hi ErrorMsg cterm=none 464 | hi Normal cterm=none 465 | hi PmenuThumb cterm=none 466 | hi WildMenu cterm=none 467 | hi FoldColumn cterm=none 468 | hi SignColumn cterm=none 469 | hi DiffAdd cterm=none 470 | hi DiffChange cterm=none 471 | hi Question cterm=none 472 | hi StatusLine cterm=none 473 | hi DiffText cterm=none 474 | hi IncSearch cterm=reverse 475 | hi StatusLineNC cterm=reverse 476 | hi VertSplit cterm=reverse 477 | 478 | " Well, well, bold font with color 0-7 is not possible. 479 | " So, the Question, StatusLine, DiffText cannot act as expected. 480 | 481 | hi Statement cterm=none 482 | hi Type cterm=none 483 | hi MoreMsg cterm=none 484 | hi ModeMsg cterm=none 485 | hi NonText cterm=none 486 | hi Title cterm=none 487 | hi VisualNOS cterm=none 488 | hi DiffDelete cterm=none 489 | hi TabLineSel cterm=none 490 | 491 | endif 492 | elseif &t_Co==256 493 | " 256color dark terminal support here 494 | hi Normal ctermfg=252 ctermbg=234 cterm=NONE 495 | " Comment/Uncomment the following line to disable/enable transparency 496 | "hi Normal ctermfg=252 ctermbg=NONE cterm=NONE 497 | hi Comment ctermfg=186 ctermbg=NONE cterm=NONE 498 | hi Constant ctermfg=110 ctermbg=NONE cterm=NONE 499 | hi Number ctermfg=179 ctermbg=NONE cterm=NONE 500 | hi Identifier ctermfg=219 ctermbg=NONE cterm=NONE 501 | hi Statement ctermfg=153 ctermbg=NONE cterm=NONE 502 | hi PreProc ctermfg=84 ctermbg=NONE cterm=NONE 503 | hi Type ctermfg=153 ctermbg=NONE cterm=NONE 504 | hi Special ctermfg=179 ctermbg=NONE cterm=NONE 505 | hi Error ctermfg=209 ctermbg=NONE cterm=NONE 506 | hi Todo ctermfg=88 ctermbg=186 cterm=NONE 507 | hi Search ctermfg=NONE ctermbg=88 cterm=NONE 508 | hi Visual ctermfg=16 ctermbg=153 cterm=NONE 509 | hi Cursor ctermfg=16 ctermbg=46 cterm=NONE 510 | " NOTE THIS IS IN THE COOL SECTION 511 | " hi CursorIM ctermfg=16 ctermbg=201 cterm=NONE 512 | hi StatusLine ctermfg=16 ctermbg=153 cterm=NONE 513 | hi LineNr ctermfg=249 ctermbg=NONE cterm=NONE 514 | hi Question ctermfg=16 ctermbg=186 cterm=NONE 515 | hi ModeMsg ctermfg=fg ctermbg=18 cterm=NONE 516 | hi VisualNOS ctermfg=fg ctermbg=18 cterm=NONE 517 | hi SpecialKey ctermfg=153 ctermbg=NONE cterm=NONE 518 | hi NonText ctermfg=69 ctermbg=233 cterm=NONE 519 | " Comment/Uncomment the following line to disable/enable transparency 520 | "hi NonText ctermfg=69 ctermbg=NONE cterm=NONE 521 | hi Directory ctermfg=110 ctermbg=NONE cterm=NONE 522 | hi ErrorMsg ctermfg=186 ctermbg=88 cterm=NONE 523 | hi MoreMsg ctermfg=150 ctermbg=NONE cterm=NONE 524 | hi Title ctermfg=219 ctermbg=NONE cterm=NONE 525 | hi WarningMsg ctermfg=209 ctermbg=NONE cterm=NONE 526 | hi WildMenu ctermfg=16 ctermbg=186 cterm=NONE 527 | hi Folded ctermfg=NONE ctermbg=22 cterm=NONE 528 | hi FoldColumn ctermfg=254 ctermbg=28 cterm=NONE 529 | hi DiffAdd ctermfg=NONE ctermbg=18 cterm=NONE 530 | hi DiffChange ctermfg=NONE ctermbg=90 cterm=NONE 531 | hi DiffDelete ctermfg=69 ctermbg=234 cterm=NONE 532 | hi DiffText ctermfg=16 ctermbg=150 cterm=NONE 533 | hi SignColumn ctermfg=254 ctermbg=28 cterm=NONE 534 | hi IncSearch ctermfg=16 ctermbg=252 cterm=NONE 535 | hi StatusLineNC ctermfg=16 ctermbg=250 cterm=NONE 536 | hi VertSplit ctermfg=16 ctermbg=250 cterm=NONE 537 | hi Underlined ctermfg=111 ctermbg=NONE cterm=underline 538 | hi Ignore ctermfg=16 ctermbg=NONE 539 | " NOTE THIS IS IN THE COOL SECTION 540 | if v:version >= 700 541 | if has('spell') 542 | " the ctermsp= is not supported in Vim 7 we simply ignored 543 | if 0 544 | hi SpellBad cterm=undercurl ctermbg=NONE ctermfg=209 545 | hi SpellCap cterm=undercurl ctermbg=NONE ctermfg=69 546 | hi SpellRare cterm=undercurl ctermbg=NONE ctermfg=219 547 | hi SpellLocal cterm=undercurl ctermbg=NONE ctermfg=153 548 | else 549 | hi SpellBad cterm=undercurl ctermbg=NONE ctermfg=NONE 550 | hi SpellCap cterm=undercurl ctermbg=NONE ctermfg=NONE 551 | hi SpellRare cterm=undercurl ctermbg=NONE ctermfg=NONE 552 | hi SpellLocal cterm=undercurl ctermbg=NONE ctermfg=NONE 553 | endif 554 | endif 555 | hi Pmenu ctermfg=fg ctermbg=90 556 | hi PmenuSel ctermfg=16 ctermbg=252 cterm=NONE 557 | hi PmenuSbar ctermfg=fg ctermbg=18 cterm=NONE 558 | hi PmenuThumb ctermfg=fg ctermbg=28 cterm=NONE 559 | hi TabLine ctermfg=fg ctermbg=28 cterm=NONE 560 | hi TabLineFill ctermfg=fg ctermbg=28 cterm=NONE 561 | hi TabLineSel ctermfg=fg ctermbg=NONE cterm=NONE 562 | hi CursorColumn ctermfg=NONE ctermbg=88 cterm=NONE 563 | hi CursorLine ctermfg=NONE ctermbg=NONE cterm=underline 564 | hi MatchParen ctermfg=NONE ctermbg=90 565 | hi TabLine cterm=underline 566 | hi TabLineFill cterm=underline 567 | hi Underlined cterm=underline 568 | hi CursorLine cterm=underline 569 | endif 570 | 571 | endif " t_Co 572 | 573 | " }}}2 574 | endif 575 | 576 | " Links: 577 | " 578 | " COLOR LINKS DEFINE START 579 | 580 | hi link String Constant 581 | " Character must be different from strings because in many languages 582 | " (especially C, C++) a 'char' variable is scalar while 'string' is pointer, 583 | " mistaken a 'char' for a 'string' will cause disaster! 584 | hi link Character Number 585 | hi link SpecialChar LineNr 586 | hi link Tag Identifier 587 | hi link cCppOut LineNr 588 | " The following are not standard hi links, 589 | " these are used by DrChip 590 | hi link Warning MoreMsg 591 | hi link Notice Constant 592 | " these are used by Calendar 593 | hi link CalToday PreProc 594 | " these are used by TagList 595 | hi link MyTagListTagName IncSearch 596 | hi link MyTagListTagScope Constant 597 | 598 | " COLOR LINKS DEFINE END 599 | 600 | " vim:et:nosta:sw=2:ts=8: 601 | " vim600:fdm=marker:fdl=1: 602 | --------------------------------------------------------------------------------