Skip to content

Commit a3ef279

Browse files
author
anand
committed
latest config
1 parent 1f31205 commit a3ef279

File tree

15 files changed

+753
-3
lines changed

15 files changed

+753
-3
lines changed

.gitmodules

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,18 @@
6161
[submodule "bundle/vim-go"]
6262
path = bundle/vim-go
6363
url = https://github.com/fatih/vim-go.git
64+
[submodule "bundle/ultisnips"]
65+
path = bundle/ultisnips
66+
url = git://github.com/SirVer/ultisnips.git
67+
[submodule "bundle/vim-snippets"]
68+
path = bundle/vim-snippets
69+
url = git://github.com/honza/vim-snippets.git
70+
[submodule "bundle/dracula-theme"]
71+
path = bundle/dracula-theme
72+
url = [email protected]:dracula/vim.git
73+
[submodule "bundle/snow"]
74+
path = bundle/snow
75+
url = [email protected]:nightsense/snow.git
76+
[submodule "bundle/vim-jsx"]
77+
path = bundle/vim-jsx
78+
url = https://github.com/mxw/vim-jsx.git

bundle/dracula-theme

Submodule dracula-theme added at a88e82a

bundle/onhalf-vim/README.md

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# Vim Installation & Usage
2+
3+
![screenshot: vim](../screenshots/vim.png)
4+
NeoVim + Tmux with true colors on iTerm2.
5+
6+
## Installation
7+
### Using a plugin manager (recommended)
8+
9+
Use [Pathogen](http://github.com/tpope/vim-pathogen),
10+
[Vundle](http://github.com/gmarik/vundle),
11+
[Neobundle](http://github.com/Shougo/neobundle.vim) or your favourite Vim
12+
package manager.
13+
14+
To install with Vundle, put
15+
16+
Plugin 'sonph/onehalf', {'rtp': 'vim/'}
17+
18+
in your `.vimrc`, restart vim then execute `:PluginInstall`. This will install
19+
both the color schemes and vim-airline themes.
20+
21+
### Manual Installation
22+
Download the files in [vim/](./vim/) and put them in their respective folders
23+
(`./vim/colors/` and `./vim/autoload/airline/themes/`)
24+
25+
## Usage
26+
Put `colorscheme <scheme>` and `let g:airline_theme='<theme>'`, if using airline
27+
or `let g:lightline.colorscheme='<theme>'`, if using lightline, in your `.vimrc`
28+
to set the color scheme and airline (or lightline) theme. Make sure you have
29+
syntax highlighting on, and 256 colors set. Vim version >= 7.4 recommended.
30+
31+
For example:
32+
33+
syntax on
34+
set t_Co=256
35+
set cursorline
36+
colorscheme onehalflight
37+
let g:airline_theme='onehalfdark'
38+
" lightline
39+
" let g:lightline.colorscheme='onehalfdark'
40+
41+
42+
### True Colors
43+
By default vim only allows specifying one of the 256 (8 bit) predefined colors
44+
([wikipedia](https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit)).
45+
46+
If you want to match colors in vim and in your terminal exactly, you must enable _true colors_ (24
47+
bit).
48+
49+
In vim/neovim, use `set termguicolors` option:
50+
51+
```
52+
if exists('+termguicolors')
53+
let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
54+
let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum"
55+
set termguicolors
56+
endif
57+
```
58+
59+
If you use tmux, you must use version 2.2 or newer. Put this in your config:
60+
61+
```
62+
set -g default-terminal "tmux-256color"
63+
set -ga terminal-overrides ",*256col*:Tc"
64+
```
65+
66+
([source](https://github.com/tmux/tmux/issues/1246))
67+
68+
To test if your neovim/tmux/terminal combination supports true colors or not, use this
69+
[test script](https://github.com/sonph/dotfiles/blob/master/bin/truecolor.sh):
70+
71+
![truecolors](./truecolors.png)
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
" ==============================================================================
2+
" Name: One Half Dark
3+
" Author: Son A. Pham <[email protected]>
4+
" Url: https://github.com/sonph/onehalf
5+
" License: The MIT License (MIT)
6+
"
7+
" A dark vim-airline theme based on Atom's One, best used with the onehalf
8+
" vim colorschemes. See github.com/sonph/onehalf for installation
9+
" instructions, a light theme and colorschemes for other editors/terminals.
10+
"
11+
" For documentation, see :h airline-themes or vim-airline's dark.vim theme at
12+
" https://github.com/vim-airline/vim-airline/blob/master/autoload/airline/themes/dark.vim
13+
"
14+
" ==============================================================================
15+
16+
17+
" _g: gui, _c: cterm
18+
let s:light_g = '#dcdfe4'
19+
let s:light_c = 255
20+
let s:med_hi_g = '#5d677a'
21+
let s:med_hi_c = 243
22+
let s:med_lo_g = '#313640'
23+
let s:med_lo_c = 238
24+
let s:dark_g = '#282c34'
25+
let s:dark_c = 236
26+
27+
let s:green_g = '#98c379'
28+
let s:green_c = 114
29+
let s:blue_g = '#61afef'
30+
let s:blue_c = 75
31+
let s:yellow_g = '#e5c07b'
32+
let s:yellow_c = 180
33+
let s:red_g = '#e06c75'
34+
let s:red_c = 168
35+
36+
37+
let g:airline#themes#onehalfdark#palette = {}
38+
39+
40+
" Normal mode
41+
" Array format: [guifg, guibg, ctermfg, ctermbg, opts]
42+
let s:normal_outer = [s:dark_g, s:green_g, s:dark_c, s:green_c]
43+
let s:normal_middle = [s:light_g, s:med_hi_g, s:light_c, s:med_hi_c]
44+
let s:normal_inner = [s:green_g, s:med_lo_g, s:green_c, s:med_lo_c]
45+
let s:normal_inner_modified = [s:yellow_g, s:med_lo_g, s:yellow_c, s:med_lo_c]
46+
let g:airline#themes#onehalfdark#palette.normal =
47+
\ airline#themes#generate_color_map(s:normal_outer, s:normal_middle, s:normal_inner)
48+
let g:airline#themes#onehalfdark#palette.normal_modified =
49+
\ airline#themes#generate_color_map(s:normal_outer, s:normal_middle, s:normal_inner_modified)
50+
51+
52+
" Insert mode
53+
let s:insert_outer = [s:med_lo_g, s:blue_g, s:med_lo_c, s:blue_c]
54+
let s:insert_middle = s:normal_middle
55+
let s:insert_inner = [s:blue_g, s:med_lo_g, s:blue_c, s:med_lo_c]
56+
let g:airline#themes#onehalfdark#palette.insert =
57+
\ airline#themes#generate_color_map(s:insert_outer, s:insert_middle, s:insert_inner)
58+
let g:airline#themes#onehalfdark#palette.insert_modified =
59+
\ copy(g:airline#themes#onehalfdark#palette.normal_modified)
60+
61+
62+
" Replace mode
63+
let s:replace_outer = [s:med_lo_g, s:red_g, s:med_lo_c, s:red_c]
64+
let s:replace_middle = s:normal_middle
65+
let s:replace_inner = [s:red_g, s:med_lo_g, s:red_c, s:med_lo_c]
66+
let g:airline#themes#onehalfdark#palette.replace =
67+
\ airline#themes#generate_color_map(s:replace_outer, s:replace_middle, s:replace_inner)
68+
let g:airline#themes#onehalfdark#palette.replace_modified =
69+
\ copy(g:airline#themes#onehalfdark#palette.insert_modified)
70+
71+
72+
" Visual mode
73+
let s:visual_outer = [s:dark_g, s:yellow_g, s:dark_c, s:yellow_c]
74+
let s:visual_middle = s:normal_middle
75+
let s:visual_inner = [s:yellow_g, s:med_lo_g, s:yellow_c, s:med_lo_c]
76+
let g:airline#themes#onehalfdark#palette.visual =
77+
\ airline#themes#generate_color_map(s:visual_outer, s:visual_middle, s:visual_inner)
78+
let g:airline#themes#onehalfdark#palette.visual_modified =
79+
\ copy(g:airline#themes#onehalfdark#palette.insert_modified)
80+
81+
82+
" Inactive window
83+
let s:inactive = [s:light_g, s:med_lo_g, s:light_c, s:med_lo_c]
84+
let s:inactive_modified = [s:yellow_g, '', s:yellow_c, '']
85+
let g:airline#themes#onehalfdark#palette.inactive =
86+
\ airline#themes#generate_color_map(s:inactive, s:inactive, s:inactive)
87+
let g:airline#themes#onehalfdark#palette.inactive_modified =
88+
\ airline#themes#generate_color_map(s:inactive, s:inactive, s:inactive_modified)
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
" ==============================================================================
2+
" Name: One Half Light
3+
" Author: Son A. Pham <[email protected]>
4+
" Url: https://github.com/sonph/onehalf
5+
" License: The MIT License (MIT)
6+
"
7+
" A light vim-airline theme based on Atom's One, best used with the onehalf
8+
" vim colorschemes. See github.com/sonph/onehalf for installation
9+
" instructions, a dark theme and colorschemes for other editors/terminals.
10+
"
11+
" For documentation, see :h airline-themes or vim-airline's dark.vim theme at
12+
" https://github.com/vim-airline/vim-airline/blob/master/autoload/airline/themes/dark.vim
13+
"
14+
" ==============================================================================
15+
16+
17+
" _g: gui, _c: cterm
18+
let s:dark_g = '#969696'
19+
let s:dark_c = 245
20+
let s:med_lo_g = '#e3e3e3'
21+
let s:med_lo_c = 254
22+
let s:med_hi_g = '#f0f0f0'
23+
let s:med_hi_c = 255
24+
let s:light_g = '#fafafa'
25+
let s:light_c = 231
26+
27+
let s:green_g = '#50a14f'
28+
let s:green_c = 71
29+
let s:blue_g = '#0184bc'
30+
let s:blue_c = 31
31+
let s:yellow_g = '#c18401'
32+
let s:yellow_c = 136
33+
let s:red_g = '#e45649'
34+
let s:red_c = 167
35+
36+
37+
let g:airline#themes#onehalflight#palette = {}
38+
39+
40+
" Normal mode
41+
" Array format: [guifg, guibg, ctermfg, ctermbg, opts]
42+
let s:normal_outer = [s:light_g, s:green_g, s:light_c, s:green_c]
43+
let s:normal_middle = [s:dark_g, s:med_hi_g, s:dark_c, s:med_hi_c]
44+
let s:normal_inner = [s:green_g, s:light_g, s:green_c, s:light_c]
45+
let s:normal_inner_modified = [s:yellow_g, s:med_hi_g, s:yellow_c, s:med_hi_c]
46+
let g:airline#themes#onehalflight#palette.normal =
47+
\ airline#themes#generate_color_map(s:normal_outer, s:normal_middle, s:normal_inner)
48+
let g:airline#themes#onehalflight#palette.normal_modified =
49+
\ airline#themes#generate_color_map(s:normal_outer, s:normal_middle, s:normal_inner_modified)
50+
51+
52+
" Insert mode
53+
let s:insert_outer = [s:light_g, s:blue_g, s:light_c, s:blue_c]
54+
let s:insert_middle = s:normal_middle
55+
let s:insert_inner = [s:blue_g, s:light_g, s:blue_c, s:light_c]
56+
let g:airline#themes#onehalflight#palette.insert =
57+
\ airline#themes#generate_color_map(s:insert_outer, s:insert_middle, s:insert_inner)
58+
let g:airline#themes#onehalflight#palette.insert_modified =
59+
\ copy(g:airline#themes#onehalflight#palette.normal_modified)
60+
61+
62+
" Replace mode
63+
let s:replace_outer = [s:light_g, s:red_g, s:light_c, s:red_c]
64+
let s:replace_middle = s:normal_middle
65+
let s:replace_inner = [s:red_g, s:light_g, s:red_c, s:light_c]
66+
let g:airline#themes#onehalflight#palette.replace =
67+
\ airline#themes#generate_color_map(s:replace_outer, s:replace_middle, s:replace_inner)
68+
let g:airline#themes#onehalflight#palette.replace_modified =
69+
\ copy(g:airline#themes#onehalflight#palette.insert_modified)
70+
71+
72+
" Visual mode
73+
let s:visual_outer = [s:light_g, s:yellow_g, s:light_c, s:yellow_c]
74+
let s:visual_middle = s:normal_middle
75+
let s:visual_inner = [s:yellow_g, s:light_g, s:yellow_c, s:light_c]
76+
let g:airline#themes#onehalflight#palette.visual =
77+
\ airline#themes#generate_color_map(s:visual_outer, s:visual_middle, s:visual_inner)
78+
let g:airline#themes#onehalflight#palette.visual_modified =
79+
\ copy(g:airline#themes#onehalflight#palette.insert_modified)
80+
81+
82+
" Inactive window
83+
let s:inactive = [s:dark_g, s:med_hi_g, s:dark_c, s:med_hi_c]
84+
let s:inactive_modified = [s:yellow_g, '', s:yellow_c, '']
85+
let g:airline#themes#onehalflight#palette.inactive =
86+
\ airline#themes#generate_color_map(s:inactive, s:inactive, s:inactive)
87+
let g:airline#themes#onehalflight#palette.inactive_modified =
88+
\ airline#themes#generate_color_map(s:inactive, s:inactive, s:inactive_modified)
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
" =============================================================================
2+
" Filename: autoload/lightline/colorscheme/onehalfdark.vim
3+
" Author: sonph
4+
" License: MIT License
5+
" Last Change: 2016/06/22
6+
" =============================================================================
7+
8+
let s:mono0 = [ '#282c34', 236 ]
9+
let s:mono1 = [ '#313640', 238 ]
10+
let s:mono2 = [ '#5d677a', 243 ]
11+
let s:mono3 = [ '#dcdfe4', 255 ]
12+
13+
let s:yellow = [ '#e5c07b', 180 ]
14+
let s:red = [ '#e06c75', 168 ]
15+
let s:magenta = [ '#c678dd', 176 ]
16+
let s:blue = [ '#61afef', 75 ]
17+
let s:cyan = [ '#56b6c2', 73 ]
18+
let s:green = [ '#98c379', 114 ]
19+
20+
let s:p = {'normal': {}, 'inactive': {}, 'insert': {}, 'replace': {}, 'visual': {}, 'tabline': {}}
21+
22+
let s:p.normal.left = [ [ s:mono0, s:green ], [ s:mono3, s:mono2 ] ]
23+
let s:p.normal.middle = [ [ s:mono3, s:mono1 ] ]
24+
let s:p.normal.right = [ [ s:mono0, s:mono3 ], [ s:mono3, s:mono2 ] ]
25+
26+
let s:p.normal.error = [ [ s:mono0, s:red ] ]
27+
let s:p.normal.warning = [ [ s:mono0, s:yellow ] ]
28+
29+
let s:p.inactive.left = [ [ s:mono3, s:mono2 ], [ s:mono3, s:mono2 ] ]
30+
let s:p.inactive.middle = [ [ s:mono3, s:mono1 ] ]
31+
let s:p.inactive.right = [ [ s:mono0, s:mono3 ], [ s:mono3, s:mono2 ] ]
32+
33+
let s:p.insert.left = [ [ s:mono0, s:blue ], [ s:mono3, s:mono2 ] ]
34+
let s:p.replace.left = [ [ s:mono0, s:red ], [ s:mono3, s:mono2 ] ]
35+
let s:p.visual.left = [ [ s:mono0, s:yellow ], [ s:mono3, s:mono2 ] ]
36+
37+
let s:p.tabline.left = [ [ s:mono2, s:mono1] ]
38+
let s:p.tabline.tabsel = [ [ s:mono3, s:mono2 ] ]
39+
let s:p.tabline.middle = [ [ s:mono2, s:mono1] ]
40+
let s:p.tabline.right = [ [ s:mono0, s:mono3 ] ]
41+
42+
let g:lightline#colorscheme#onehalfdark#palette = lightline#colorscheme#flatten(s:p)

0 commit comments

Comments
 (0)