├── .gitignore
├── LICENSE.md
├── README.md
└── colors
└── eldar.vim
/.gitignore:
--------------------------------------------------------------------------------
1 | # Local directories
2 | code/
3 | images/
4 |
5 | # Vim files from Github Gitignore:
6 | # https://github.com/github/gitignore/blob/master/Global/vim.gitignore
7 | *.s[a-w][a-z]
8 | *.un~
9 | Session.vim
10 | .netrwhist
11 | *~
12 |
13 | # Linux files from Github Gitignore:
14 | # https://github.com/github/gitignore/blob/master/Global/Linux.gitignore
15 | .*
16 | !.gitignore
17 | *~
18 |
19 | # MacOS files from github Gitignore:
20 | # https://github.com/github/gitignore/master/Global/macOS.gitignore
21 | *.DS_Store
22 | .AppleDouble
23 | .LSOverride
24 |
25 | # Icon must end with two \r
26 | Icon
27 |
28 |
29 | # Thumbnails
30 | ._*
31 |
32 | # Files that might appear in the root of a volume
33 | .DocumentRevisions-V100
34 | .fseventsd
35 | .Spotlight-V100
36 | .TemporaryItems
37 | .Trashes
38 | .VolumeIcon.icns
39 | .com.apple.timemachine.donotpresent
40 |
41 | # Directories potentially created on remote AFP share
42 | .AppleDB
43 | .AppleDesktop
44 | Network Trash Folder
45 | Temporary Items
46 | .apdisk
47 |
--------------------------------------------------------------------------------
/LICENSE.md:
--------------------------------------------------------------------------------
1 | # The MIT License (MIT)
2 |
3 | Copyright © `2016` `Alexander Gude`
4 |
5 | Permission is hereby granted, free of charge, to any person
6 | obtaining a copy of this software and associated documentation
7 | files (the “Software”), to deal in the Software without
8 | restriction, including without limitation the rights to use,
9 | copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | copies of the Software, and to permit persons to whom the
11 | Software is furnished to do so, subject to the following
12 | conditions:
13 |
14 | The above copyright notice and this permission notice shall be
15 | included in all copies or substantial portions of the Software.
16 |
17 | THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND,
18 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
19 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
21 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
22 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
23 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
24 | OTHER DEALINGS IN THE SOFTWARE.
25 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | 
2 |
3 | Eldar is a dark color theme for Vim using bright, high-contrast colors. It is
4 | based on [elflord][elcs], one of the default Vim color schemes.
5 |
6 | [elcs]: https://github.com/vim/vim/blob/master/runtime/colors/elflord.vim
7 |
8 |
9 |
10 | Eldar looks great in both the GUI and terminal because it uses fewer than 16
11 | colors. Eldar uses the [Tango color palette][tango] in the GUI by default, but
12 | these colors can be overridden by setting `g:eldar_*` variables (see below).
13 | Eldar uses both colors and font weight to differentiate various elements. It
14 | is not a subtle scheme; it uses white on black text with high contrast colors.
15 |
16 | [tango]: http://tango.freedesktop.org/Tango_Icon_Theme_Guidelines#Color_Palette
17 |
18 | ## Installation
19 |
20 | You can install Eldar by downloading the [`eldar.vim` file][file] and placing
21 | it in `~/.vim/colors/`, or by using whatever plugin manager you prefer. For
22 | example, with [vim-plug][plug]:
23 |
24 | [file]: /colors/eldar.vim
25 | [plug]: https://github.com/junegunn/vim-plug
26 |
27 | ```vim
28 | Plug 'agude/vim-eldar'
29 | ```
30 |
31 | You can activate the color scheme with:
32 |
33 | ```vim
34 | :colorscheme eldar
35 | ```
36 |
37 | Or put it in your `.vimrc` so it activates every time you open Vim:
38 |
39 | ```vim
40 | "------------------------
41 | " Syntax: highlighting
42 | "------------------------
43 | if has('syntax')
44 | syntax enable " Turn on syntax highlighting
45 | silent! colorscheme eldar " Custom color scheme
46 | endif
47 | ```
48 |
49 | ### Change Colors
50 |
51 | To change the GUI colors, simply define the appropriate `g:eldar_*` variable
52 | in your `.vimrc` before calling `colorscheme`:
53 |
54 | ```vim
55 | "------------------------
56 | " Syntax: highlighting
57 | "------------------------
58 | if has('syntax')
59 | " Override Eldar GUI colors
60 | let g:eldar_red = "#ff0000"
61 | let g:eldar_yellow = "#ffff00"
62 | let g:eldar_green = "#00ff00"
63 | let g:eldar_cyan = "#00ffff"
64 | let g:eldar_blue = "#0000ff"
65 | let g:eldar_magenta = "#ff00ff"
66 |
67 | syntax enable " Turn on syntax highlighting
68 | silent! colorscheme eldar " Custom color scheme
69 | endif
70 | ```
71 | The GUI text and background colors default to "White" and "Black"
72 | respectively. To change these, set the following variables:
73 |
74 | ```vim
75 | let g:eldar_text = "#D3D3D3"
76 | let g:eldar_background = "#2B2B2B"
77 | ```
78 |
79 | By default terminal vim will use the background color and text color defined
80 | by your terminal profile. To override these colors, set:
81 |
82 | ```vim
83 | let g:eldar_term_text = "White"
84 | let g:eldar_term_background = "Black"
85 | ```
86 |
87 | All these variables must be set before calling `colorscheme eldar`.
88 |
89 | ## Screenshots
90 |
91 | ### Python
92 |
93 | 
94 |
95 | ### C++
96 |
97 | 
98 |
99 | ### Markdown
100 |
101 | 
102 |
103 | ### Diff
104 |
105 | 
106 |
--------------------------------------------------------------------------------
/colors/eldar.vim:
--------------------------------------------------------------------------------
1 | " ---------------------------------------------------------
2 | " ______ _ _
3 | " | ____| | | |
4 | " | |__ | | __| | __ _ _ __
5 | " | __| | |/ _` |/ _` | '__|
6 | " | |____| | (_| | (_| | |
7 | " |______|_|\__,_|\__,_|_|
8 | "
9 | " ---------------------------------------------------------
10 | "
11 | " Maintainer: Alexander Gude
12 | " Email: alex.public.account@gmail.com
13 | " File: eldar.vim
14 | " URL: github.com/agude/vim-eldar
15 | " License: MIT
16 | "
17 | " ---------------------------------------------------------
18 | "
19 | " Copyright (c) 2016--2024 Alexander Gude
20 | "
21 | " Permission is hereby granted, free of charge, to any per‐
22 | " son obtaining a copy of this software and associated doc‐
23 | " umentation files (the “Software”), to deal in the Soft‐
24 | " ware without restriction, including without limitation
25 | " the rights to use, copy, modify, merge, publish, distrib‐
26 | " ute, sublicense, and/or sell copies of the Software, and
27 | " to permit persons to whom the Software is furnished to do
28 | " so, subject to the following conditions:
29 | "
30 | " The above copyright notice and this permission notice
31 | " shall be included in all copies or substantial portions
32 | " of the Software.
33 | "
34 | " THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY
35 | " KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
36 | " THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICU‐
37 | " LAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
38 | " AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
39 | " DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CON‐
40 | " TRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CON‐
41 | " NECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
42 | " THE SOFTWARE.
43 | "
44 | " ---------------------------------------------------------
45 |
46 | " Eldar is designed for dark backgrounds
47 | set background=dark
48 |
49 | highlight clear
50 | if exists('syntax_on')
51 | syntax reset
52 | endif
53 |
54 | let g:colors_name = 'eldar'
55 |
56 | " Define colors (Tango is the default)
57 | " GUI colors
58 | let s:red = get(g:, 'eldar_red', '#EF2929')
59 | let s:yellow = get(g:, 'eldar_yellow', '#FCE94F')
60 | let s:green = get(g:, 'eldar_green', '#8AE234')
61 | let s:cyan = get(g:, 'eldar_cyan', '#34E2E2')
62 | let s:blue = get(g:, 'eldar_blue', '#729FCF')
63 | let s:magenta = get(g:, 'eldar_magenta', '#AD7FA8')
64 | let s:gui_text = get(g:, 'eldar_text', 'White')
65 | let s:gui_bg = get(g:, 'eldar_background', 'Black')
66 |
67 | " Terminal colors
68 | let s:term_text = get(g:, 'eldar_term_text', 'NONE')
69 | let s:term_bg = get(g:, 'eldar_term_background', 'NONE')
70 |
71 | " The ColourAssignment map and function to unpack it are from the bandit
72 | " colorscheme by Al Bunden, available here:
73 | " http://www.cgtk.co.uk/vim-scripts/bandit
74 |
75 | let s:ColourAssignment = {}
76 |
77 | " Unspecified colours default to NONE, EXCEPT cterm(.*) which default to matching gui(.*)
78 | "
79 | " In most cases, only GUIFG is therefore important unless support for Black and White
80 | " terminals is essential
81 |
82 | " Editor settings
83 | " ---------------
84 | if has("gui_running")
85 | let s:ColourAssignment['Normal'] = {'GUIFG': s:gui_text, 'GUIBG': s:gui_bg}
86 | else
87 | let s:ColourAssignment['Normal'] = {'CTERMFG': s:term_text, 'CTERMBG': s:term_bg}
88 | endif
89 | let s:ColourAssignment['Cursor'] = {'GUI': 'Reverse'}
90 | let s:ColourAssignment['CursorLine'] = {'GUI': 'NONE', 'GUIBG': 'NONE'}
91 | let s:ColourAssignment['LineNr'] = {'GUIFG': 'DarkGray'}
92 | let s:ColourAssignment['CursorLineNr'] = {'GUIFG': 'White'}
93 |
94 |
95 | " Number column
96 | " -------------
97 | let s:ColourAssignment['CursorColumn'] = {'GUIBG': 'DarkGrey'}
98 | let s:ColourAssignment['Folded'] = {'GUIFG': 'DarkGrey', 'GUIBG': 'Black'}
99 | let s:ColourAssignment['FoldColumn'] = {'GUIBG': 'DarkGrey'}
100 | highlight! link SignColumn FoldColumn
101 |
102 |
103 | " Window/Tab delimiters
104 | " ---------------------
105 | let s:ColourAssignment['VertSplit'] = {'GUIFG': 'White', 'GUIBG': 'NONE'}
106 | let s:ColourAssignment['ColorColumn'] = {'GUIBG': 'DarkGray'}
107 | let s:ColourAssignment['TabLine'] = {'GUIFG': 'White', 'GUIBG': 'DarkGray'}
108 | let s:ColourAssignment['TabLineFill'] = {'GUIBG': 'DarkGray'}
109 | let s:ColourAssignment['TabLineSel'] = {'GUIFG': 'Black', 'GUIBG': 'Gray'}
110 |
111 |
112 | " File Navigation / Searching
113 | " ---------------------------
114 | let s:ColourAssignment['Directory'] = {'GUIFG': s:blue, 'CTERMFG': 'Blue', 'GUI': 'Bold'}
115 | let s:ColourAssignment['Search'] = {'GUIFG': 'Black', 'GUIBG': s:yellow, 'CTERMFG': 'yellow', 'CTERMBG': 'black', 'GUI': 'Bold', 'CTERM': 'Reverse,Bold'}
116 | let s:ColourAssignment['IncSearch'] = {'GUI': 'Reverse'}
117 |
118 |
119 | " Prompt/Status
120 | " -------------
121 | let s:ColourAssignment['StatusLine'] = {'GUIFG': 'White', 'GUIBG': s:gui_bg, 'GUI': 'Bold,Reverse', 'CTERMFG': 'White', 'CTERMBG': s:term_bg}
122 | let s:ColourAssignment['StatusLineNC'] = {'GUIFG': 'White', 'GUIBG': s:gui_bg, 'GUI': 'Reverse', 'CTERMFG': 'White', 'CTERMBG': s:term_bg}
123 | let s:ColourAssignment['WildMenu'] = {'GUIFG': 'White', 'GUIBG': 'DarkGrey', 'GUI': 'Bold'}
124 | let s:ColourAssignment['Question'] = {'GUIFG': s:blue, 'CTERMFG': 'Blue'}
125 | let s:ColourAssignment['Title'] = {'GUI': 'Bold'}
126 | let s:ColourAssignment['ModeMsg'] = {'GUI': 'Bold'}
127 | let s:ColourAssignment['MoreMsg'] = {'GUIFG': s:green, 'CTERMFG': 'Green'}
128 |
129 |
130 | " Visual aid
131 | " ----------
132 | let s:ColourAssignment['MatchParen'] = {'GUIBG': s:cyan, 'CTERMBG': 'cyan'}
133 | let s:ColourAssignment['Visual'] = {'GUIBG': 'DarkGrey'}
134 | highlight! link VisualNOS Visual
135 | let s:ColourAssignment['NonText'] = {'GUIFG': s:blue, 'CTERMFG': 'blue'}
136 |
137 | let s:ColourAssignment['Todo'] = {'GUIFG': 'Black', 'GUIBG': s:yellow, 'CTERMBG': 'yellow'}
138 | let s:ColourAssignment['Underlined'] = {'GUIFG': s:cyan, 'CTERMFG': 'cyan', 'GUI': 'Underline'}
139 | let s:ColourAssignment['EndOfBuffer'] = {'GUIFG': s:blue, 'CTERMFG': 'Blue'}
140 | let s:ColourAssignment['Error'] = {'GUIFG': s:red, 'GUIBG': 'Black', 'CTERMFG': 'red', 'GUI': 'Reverse,Bold'}
141 | let s:ColourAssignment['ErrorMsg'] = {'GUIFG': s:red, 'GUIBG': 'White', 'CTERMFG': 'red', 'GUI': 'Reverse,Bold'}
142 | let s:ColourAssignment['WarningMsg'] = {'GUIFG': s:red, 'CTERMFG': 'red'}
143 | let s:ColourAssignment['Ignore'] = {'GUIFG': 'bg', 'CTERMFG': 'Black'}
144 | let s:ColourAssignment['SpecialKey'] = {'GUIFG': s:cyan, 'CTERMFG': 'Cyan'}
145 |
146 |
147 | " Variable types
148 | " --------------
149 | let s:ColourAssignment['Constant'] = {'GUIFG': s:magenta, 'CTERMFG': 'magenta'}
150 | let s:ColourAssignment['Number'] = {'GUIFG': s:red, 'CTERMFG': 'red'}
151 | highlight! link String Constant
152 | highlight! link Boolean Constant
153 | highlight! link Float Number
154 |
155 | let s:ColourAssignment['Identifier'] = {'GUIFG': s:green, 'CTERMFG': 'green', 'GUI': 'Bold'}
156 | highlight! link Function Identifier
157 |
158 |
159 | " Comments
160 | " --------
161 | let s:ColourAssignment['Comment'] = {'GUIFG': s:cyan, 'CTERMFG': 'cyan'}
162 | highlight! link SpecialComment Special
163 |
164 |
165 | " Language constructs
166 | " -------------------
167 | let s:ColourAssignment['Statement'] = {'GUIFG': s:yellow, 'CTERMFG': 'yellow', 'GUI': 'Bold'}
168 | highlight! link Conditional Statement
169 | highlight! link Repeat Statement
170 | highlight! link Label Statement
171 | highlight! link Operator Statement
172 | highlight! link Keyword Statement
173 | highlight! link Exception Statement
174 |
175 | let s:ColourAssignment['Special'] = {'GUIFG': s:red, 'CTERMFG': 'red'}
176 | highlight! link SpecialChar Special
177 | highlight! link Tag Special
178 | highlight! link Delimiter Special
179 | highlight! link Debug Special
180 |
181 |
182 | " C like
183 | " ------
184 | let s:ColourAssignment['PreProc'] = {'GUIFG': s:blue, 'CTERMFG': 'blue', 'GUI': 'Bold'}
185 | highlight! link Include PreProc
186 | highlight! link Define PreProc
187 | highlight! link Macro PreProc
188 | highlight! link PreCondit PreProc
189 |
190 | let s:ColourAssignment['Type'] = {'GUIFG': s:green, 'CTERMFG': 'green', 'GUI': 'Bold'}
191 | let s:ColourAssignment['Structure'] = {'GUIFG': s:magenta, 'CTERMFG': 'magenta'}
192 | highlight! link StorageClass Type
193 | highlight! link Typedef Type
194 |
195 |
196 | " Diff
197 | " ----
198 | let s:ColourAssignment['DiffAdd'] = {'GUIFG': s:green, 'GUIBG': 'Black', 'CTERMFG': 'Green', 'GUI': 'Reverse,Bold'}
199 | let s:ColourAssignment['DiffChange'] = {'GUIFG': 'NONE'}
200 | let s:ColourAssignment['DiffDelete'] = {'GUIFG': s:red, 'GUIBG': 'Black', 'CTERMFG': 'Red', 'GUI': 'Reverse,Bold'}
201 | let s:ColourAssignment['DiffText'] = {'GUIFG': s:blue, 'GUIBG': 'Black', 'CTERMFG': 'Blue', 'GUI': 'Reverse,Bold'}
202 |
203 |
204 | " Completion menu
205 | " ---------------
206 | let s:ColourAssignment['Pmenu'] = {'GUIFG': 'Black', 'GUIBG': 'Grey'}
207 | let s:ColourAssignment['PmenuSel'] = {'GUIFG': s:yellow, 'GUIBG': 'DarkGrey', 'GUI': 'Bold', 'CTERMFG': 'yellow'}
208 | let s:ColourAssignment['PmenuThumb'] = {'GUIBG': 'DarkGrey'}
209 | highlight! link PmenuSbar Pmenu
210 |
211 |
212 | " Spelling
213 | " --------
214 | let s:ColourAssignment['SpellBad'] = {'GUIFG': s:red, 'GUISP': s:red, 'CTERMFG': 'red', 'GUI': 'undercurl'}
215 | let s:ColourAssignment['SpellCap'] = {'GUIFG': s:blue, 'GUISP': s:blue, 'CTERMFG': 'blue', 'GUI': 'undercurl'}
216 | let s:ColourAssignment['SpellLocal'] = {'GUIFG': s:yellow, 'GUISP': s:yellow, 'CTERMFG': 'yellow', 'GUI': 'undercurl'}
217 | let s:ColourAssignment['SpellRare'] = {'GUIFG': s:green, 'GUISP': s:green, 'CTERMFG': 'green', 'GUI': 'undercurl'}
218 |
219 |
220 | " Text Formatting
221 | " ---------------
222 | let s:ColourAssignment['Italic'] = {'GUIFG': 'White', 'GUI': 'Italic'}
223 | let s:ColourAssignment['Bold'] = {'GUIFG': 'White', 'GUI': 'Bold'}
224 | let s:ColourAssignment['BoldItalic'] = {'GUIFG': 'White', 'GUI': 'Italic,Bold'}
225 | highlight! link htmlItalic Italic
226 | highlight! link htmlBold Bold
227 | highlight! link htmlBoldItalic BoldItalic
228 |
229 |
230 | " Function to translate the ColourAssignments to highlight lines
231 | let s:colours = {}
232 | let s:valid_cterm_colours =
233 | \ [
234 | \ 'Black', 'DarkBlue', 'DarkGreen', 'DarkCyan',
235 | \ 'DarkRed', 'DarkMagenta', 'Brown', 'DarkYellow',
236 | \ 'LightGray', 'LightGrey', 'Gray', 'Grey',
237 | \ 'DarkGray', 'DarkGrey', 'Blue', 'LightBlue',
238 | \ 'Green', 'LightGreen', 'Cyan', 'LightCyan',
239 | \ 'Red', 'LightRed', 'Magenta', 'LightMagenta',
240 | \ 'Yellow', 'LightYellow', 'White',
241 | \ ]
242 |
243 | for s:key in keys(s:ColourAssignment)
244 | let s:colours = s:ColourAssignment[s:key]
245 | if has_key(s:colours, 'TERM')
246 | let s:term = s:colours['TERM']
247 | else
248 | let s:term = 'NONE'
249 | endif
250 | if has_key(s:colours, 'GUI')
251 | let s:gui = s:colours['GUI']
252 | else
253 | let s:gui = 'NONE'
254 | endif
255 | if has_key(s:colours, 'GUIFG')
256 | let s:guifg = s:colours['GUIFG']
257 | else
258 | let s:guifg = 'NONE'
259 | endif
260 | if has_key(s:colours, 'GUIBG')
261 | let s:guibg = s:colours['GUIBG']
262 | else
263 | let s:guibg = 'NONE'
264 | endif
265 | if has_key(s:colours, 'CTERM')
266 | let s:cterm = s:colours['CTERM']
267 | else
268 | let s:cterm = s:gui
269 | endif
270 | if has_key(s:colours, 'CTERMFG')
271 | let s:ctermfg = s:colours['CTERMFG']
272 | else
273 | if index(s:valid_cterm_colours, s:guifg) != -1
274 | let s:ctermfg = s:guifg
275 | else
276 | let s:ctermfg = 'NONE'
277 | endif
278 | endif
279 | if has_key(s:colours, 'CTERMBG')
280 | let s:ctermbg = s:colours['CTERMBG']
281 | else
282 | if index(s:valid_cterm_colours, s:guibg) != -1
283 | let s:ctermbg = s:guibg
284 | else
285 | let s:ctermbg = 'NONE'
286 | endif
287 | endif
288 | if has_key(s:colours, 'GUISP')
289 | let s:guisp = s:colours['GUISP']
290 | else
291 | let s:guisp = 'NONE'
292 | endif
293 |
294 | if s:key =~# '^\k*$'
295 | execute 'highlight '.s:key.' term='.s:term.' cterm='.s:cterm.' gui='.s:gui.' ctermfg='.s:ctermfg.' guifg='.s:guifg.' ctermbg='.s:ctermbg.' guibg='.s:guibg.' guisp='.s:guisp
296 | endif
297 | endfor
298 |
--------------------------------------------------------------------------------