Update 2026-01-25 09:38 OpenBSD/amd64-t14

This commit is contained in:
c0dev0id 2026-01-25 09:38:17 +01:00
parent 0769d7a789
commit 186dfa8096
1240 changed files with 189747 additions and 315946 deletions

View File

@ -1,7 +1,6 @@
! -- CURSOR --!
!Xcursor.size: 32
Xcursor.size: 64
Xcursor.theme: Adwaida
Xcursor.size: 48
Xcursor.theme: Adwaita
xterm.cursorTheme:
! -- XFT -- !

View File

@ -1,4 +0,0 @@
GitHub Copilot is offered under the [GitHub Terms of
Service](https://docs.github.com/en/site-policy/github-terms/github-terms-for-additional-products-and-features#github-copilot).
Copyright (C) 2023 GitHub, Inc. - All Rights Reserved.

View File

@ -1,64 +0,0 @@
# GitHub Copilot for Vim and Neovim
GitHub Copilot uses OpenAI Codex to suggest code and entire functions in
real-time right from your editor. Trained on billions of lines of public
code, GitHub Copilot turns natural language prompts including comments and
method names into coding suggestions across dozens of languages.
Copilot.vim is a Vim/Neovim plugin for GitHub Copilot.
To learn more, visit
[https://github.com/features/copilot](https://github.com/features/copilot).
## Subscription
GitHub Copilot requires a subscription. It is free for verified students and
maintainers of popular open source projects on GitHub.
GitHub Copilot is subject to the [GitHub Additional Product
Terms](https://docs.github.com/en/site-policy/github-terms/github-terms-for-additional-products-and-features).
## Getting started
1. Install [Neovim][] or the latest patch of [Vim][] (9.0.0185 or newer).
2. Install [Node.js][].
3. Install `github/copilot.vim` using vim-plug, packer.nvim, or any other
plugin manager. Or to install manually, run one of the following
commands:
* Vim, Linux/macOS:
git clone https://github.com/github/copilot.vim.git \
~/.vim/pack/github/start/copilot.vim
* Neovim, Linux/macOS:
git clone https://github.com/github/copilot.vim.git \
~/.config/nvim/pack/github/start/copilot.vim
* Vim, Windows (PowerShell command):
git clone https://github.com/github/copilot.vim.git `
$HOME/vimfiles/pack/github/start/copilot.vim
* Neovim, Windows (PowerShell command):
git clone https://github.com/github/copilot.vim.git `
$HOME/AppData/Local/nvim/pack/github/start/copilot.vim
4. Start Vim/Neovim and invoke `:Copilot setup`.
[Node.js]: https://nodejs.org/en/download/
[Neovim]: https://github.com/neovim/neovim/releases/latest
[Vim]: https://github.com/vim/vim
Suggestions are displayed inline and can be accepted by pressing the tab key.
See `:help copilot` for more information.
## Troubleshooting
Wed love to get your help in making GitHub Copilot better! If you have
feedback or encounter any problems, please reach out on our [Feedback
forum](https://github.com/orgs/community/discussions/categories/copilot).

View File

@ -1,4 +0,0 @@
If you discover a security issue in this repo, please submit it through the
[GitHub Security Bug Bounty](https://hackerone.com/github).
Thanks for helping make GitHub Copilot safe for everyone.

View File

@ -1,860 +0,0 @@
scriptencoding utf-8
let s:has_nvim_ghost_text = has('nvim-0.7') && exists('*nvim_buf_get_mark')
let s:vim_minimum_version = '9.0.0185'
let s:has_vim_ghost_text = has('patch-' . s:vim_minimum_version) && has('textprop')
let s:has_ghost_text = s:has_nvim_ghost_text || s:has_vim_ghost_text
let s:hlgroup = 'CopilotSuggestion'
let s:annot_hlgroup = 'CopilotAnnotation'
if s:has_vim_ghost_text && empty(prop_type_get(s:hlgroup))
call prop_type_add(s:hlgroup, {'highlight': s:hlgroup})
endif
if s:has_vim_ghost_text && empty(prop_type_get(s:annot_hlgroup))
call prop_type_add(s:annot_hlgroup, {'highlight': s:annot_hlgroup})
endif
function! s:Echo(msg) abort
if has('nvim') && &cmdheight == 0
call v:lua.vim.notify(a:msg, v:null, {'title': 'GitHub Copilot'})
else
echo a:msg
endif
endfunction
function! s:EditorConfiguration() abort
let filetypes = copy(s:filetype_defaults)
if type(get(g:, 'copilot_filetypes')) == v:t_dict
call extend(filetypes, g:copilot_filetypes)
endif
return {
\ 'enableAutoCompletions': empty(get(g:, 'copilot_enabled', 1)) ? v:false : v:true,
\ 'disabledLanguages': map(sort(keys(filter(filetypes, { k, v -> empty(v) }))), { _, v -> {'languageId': v}}),
\ }
endfunction
function! copilot#Init(...) abort
call copilot#util#Defer({ -> exists('s:client') || s:Start() })
endfunction
function! s:Running() abort
return exists('s:client.job') || exists('s:client.client_id')
endfunction
function! s:Start() abort
if s:Running() || exists('s:client.startup_error')
return
endif
let s:client = copilot#client#New({'editorConfiguration' : s:EditorConfiguration()})
endfunction
function! s:Stop() abort
if exists('s:client')
let client = remove(s:, 'client')
call client.Close()
endif
endfunction
function! copilot#Client() abort
call s:Start()
return s:client
endfunction
function! copilot#RunningClient() abort
if s:Running()
return s:client
else
return v:null
endif
endfunction
if has('nvim-0.7') && !has(luaeval('vim.version().api_prerelease') ? 'nvim-0.8.1' : 'nvim-0.8.0')
let s:editor_warning = 'Neovim 0.7 support is deprecated and will be dropped in a future release of copilot.vim.'
endif
if has('vim_starting') && exists('s:editor_warning')
call copilot#logger#Warn(s:editor_warning)
endif
function! s:EditorVersionWarning() abort
if exists('s:editor_warning')
echohl WarningMsg
echo 'Warning: ' . s:editor_warning
echohl None
endif
endfunction
function! copilot#Request(method, params, ...) abort
let client = copilot#Client()
return call(client.Request, [a:method, a:params] + a:000)
endfunction
function! copilot#Call(method, params, ...) abort
let client = copilot#Client()
return call(client.Call, [a:method, a:params] + a:000)
endfunction
function! copilot#Notify(method, params, ...) abort
let client = copilot#Client()
return call(client.Notify, [a:method, a:params] + a:000)
endfunction
function! copilot#NvimNs() abort
return nvim_create_namespace('github-copilot')
endfunction
function! copilot#Clear() abort
if exists('g:_copilot_timer')
call timer_stop(remove(g:, '_copilot_timer'))
endif
if exists('b:_copilot')
call copilot#client#Cancel(get(b:_copilot, 'first', {}))
call copilot#client#Cancel(get(b:_copilot, 'cycling', {}))
endif
call s:UpdatePreview()
unlet! b:_copilot
return ''
endfunction
function! copilot#Dismiss() abort
call copilot#Clear()
call s:UpdatePreview()
return ''
endfunction
let s:filetype_defaults = {
\ 'gitcommit': 0,
\ 'gitrebase': 0,
\ 'hgcommit': 0,
\ 'svn': 0,
\ 'cvs': 0,
\ '.': 0}
function! s:BufferDisabled() abort
if &buftype =~# '^\%(help\|prompt\|quickfix\|terminal\)$'
return 5
endif
if exists('b:copilot_disabled')
return empty(b:copilot_disabled) ? 0 : 3
endif
if exists('b:copilot_enabled')
return empty(b:copilot_enabled) ? 4 : 0
endif
let short = empty(&l:filetype) ? '.' : split(&l:filetype, '\.', 1)[0]
let config = {}
if type(get(g:, 'copilot_filetypes')) == v:t_dict
let config = g:copilot_filetypes
endif
if has_key(config, &l:filetype)
return empty(config[&l:filetype])
elseif has_key(config, short)
return empty(config[short])
elseif has_key(config, '*')
return empty(config['*'])
else
return get(s:filetype_defaults, short, 1) == 0 ? 2 : 0
endif
endfunction
function! copilot#Enabled() abort
return get(g:, 'copilot_enabled', 1)
\ && empty(s:BufferDisabled())
endfunction
let s:inline_invoked = 1
let s:inline_automatic = 2
function! copilot#Complete(...) abort
if exists('g:_copilot_timer')
call timer_stop(remove(g:, '_copilot_timer'))
endif
let target = [bufnr(''), getbufvar('', 'changedtick'), line('.'), col('.')]
if !exists('b:_copilot.target') || b:_copilot.target !=# target
if exists('b:_copilot.first')
call copilot#client#Cancel(b:_copilot.first)
endif
if exists('b:_copilot.cycling')
call copilot#client#Cancel(b:_copilot.cycling)
endif
let params = {
\ 'textDocument': {'uri': bufnr('')},
\ 'position': copilot#util#AppendPosition(),
\ 'formattingOptions': {'insertSpaces': &expandtab ? v:true : v:false, 'tabSize': shiftwidth()},
\ 'context': {'triggerKind': s:inline_automatic}}
let b:_copilot = {
\ 'target': target,
\ 'params': params,
\ 'first': copilot#Request('textDocument/inlineCompletion', params)}
let g:_copilot_last = b:_copilot
endif
let completion = b:_copilot.first
if !a:0
return completion.Await()
else
call copilot#client#Result(completion, function(a:1, [b:_copilot]))
if a:0 > 1
call copilot#client#Error(completion, function(a:2, [b:_copilot]))
endif
endif
endfunction
function! s:HideDuringCompletion() abort
return get(g:, 'copilot_hide_during_completion', 1)
endfunction
function! s:SuggestionTextWithAdjustments() abort
let empty = ['', 0, 0, {}]
try
if mode() !~# '^[iR]' || (s:HideDuringCompletion() && pumvisible()) || !exists('b:_copilot.suggestions')
return empty
endif
let choice = get(b:_copilot.suggestions, b:_copilot.choice, {})
if !has_key(choice, 'range') || choice.range.start.line != line('.') - 1 || type(choice.insertText) !=# v:t_string
return empty
endif
let line = getline('.')
let offset = col('.') - 1
let choice_text = strpart(line, 0, copilot#util#UTF16ToByteIdx(line, choice.range.start.character)) . substitute(choice.insertText, "\n*$", '', '')
let typed = strpart(line, 0, offset)
let end_offset = copilot#util#UTF16ToByteIdx(line, choice.range.end.character)
if end_offset < 0
let end_offset = len(line)
endif
let delete = strpart(line, offset, end_offset - offset)
if typed =~# '^\s*$'
let leading = matchstr(choice_text, '^\s\+')
let unindented = strpart(choice_text, len(leading))
if strpart(typed, 0, len(leading)) == leading && unindented !=# delete
return [unindented, len(typed) - len(leading), strchars(delete), choice]
endif
elseif typed ==# strpart(choice_text, 0, offset)
return [strpart(choice_text, offset), 0, strchars(delete), choice]
endif
catch
call copilot#logger#Exception()
endtry
return empty
endfunction
function! s:Advance(count, context, ...) abort
if a:context isnot# get(b:, '_copilot', {})
return
endif
let a:context.choice += a:count
if a:context.choice < 0
let a:context.choice += len(a:context.suggestions)
endif
let a:context.choice %= len(a:context.suggestions)
call s:UpdatePreview()
endfunction
function! s:GetSuggestionsCyclingCallback(context, result) abort
let callbacks = remove(a:context, 'cycling_callbacks')
let seen = {}
for suggestion in a:context.suggestions
let seen[suggestion.insertText] = 1
endfor
for suggestion in get(a:result, 'items', [])
if !has_key(seen, suggestion.insertText)
call add(a:context.suggestions, suggestion)
let seen[suggestion.insertText] = 1
endif
endfor
for Callback in callbacks
call Callback(a:context)
endfor
endfunction
function! s:GetSuggestionsCycling(callback) abort
if exists('b:_copilot.cycling_callbacks')
call add(b:_copilot.cycling_callbacks, a:callback)
elseif exists('b:_copilot.cycling')
call a:callback(b:_copilot)
elseif exists('b:_copilot.suggestions')
let params = deepcopy(b:_copilot.first.params)
let params.context.triggerKind = s:inline_invoked
let b:_copilot.cycling_callbacks = [a:callback]
let b:_copilot.cycling = copilot#Request('textDocument/inlineCompletion',
\ params,
\ function('s:GetSuggestionsCyclingCallback', [b:_copilot]),
\ function('s:GetSuggestionsCyclingCallback', [b:_copilot]),
\ )
call s:UpdatePreview()
endif
return ''
endfunction
function! copilot#Next() abort
return s:GetSuggestionsCycling(function('s:Advance', [1]))
endfunction
function! copilot#Previous() abort
return s:GetSuggestionsCycling(function('s:Advance', [-1]))
endfunction
function! copilot#GetDisplayedSuggestion() abort
let [text, outdent, delete, item] = s:SuggestionTextWithAdjustments()
return {
\ 'item': item,
\ 'text': text,
\ 'outdentSize': outdent,
\ 'deleteSize': delete}
endfunction
function! s:ClearPreview() abort
if s:has_nvim_ghost_text
call nvim_buf_del_extmark(0, copilot#NvimNs(), 1)
elseif s:has_vim_ghost_text
call prop_remove({'type': s:hlgroup, 'all': v:true})
call prop_remove({'type': s:annot_hlgroup, 'all': v:true})
endif
endfunction
function! s:UpdatePreview() abort
try
let [text, outdent, delete, item] = s:SuggestionTextWithAdjustments()
let text = split(text, "\r\n\\=\\|\n", 1)
if empty(text[-1])
call remove(text, -1)
endif
if empty(text) || !s:has_ghost_text
return s:ClearPreview()
endif
if exists('b:_copilot.cycling_callbacks')
let annot = '(1/…)'
elseif exists('b:_copilot.cycling')
let annot = '(' . (b:_copilot.choice + 1) . '/' . len(b:_copilot.suggestions) . ')'
else
let annot = ''
endif
call s:ClearPreview()
if s:has_nvim_ghost_text
let data = {'id': 1}
let data.virt_text_pos = 'overlay'
let append = strpart(getline('.'), col('.') - 1 + delete)
let data.virt_text = [[text[0] . append . repeat(' ', delete - len(text[0])), s:hlgroup]]
if len(text) > 1
let data.virt_lines = map(text[1:-1], { _, l -> [[l, s:hlgroup]] })
if !empty(annot)
let data.virt_lines[-1] += [[' '], [annot, s:annot_hlgroup]]
endif
elseif len(annot)
let data.virt_text += [[' '], [annot, s:annot_hlgroup]]
endif
let data.hl_mode = 'combine'
call nvim_buf_set_extmark(0, copilot#NvimNs(), line('.')-1, col('.')-1, data)
elseif s:has_vim_ghost_text
let new_suffix = text[0]
let current_suffix = getline('.')[col('.') - 1 :]
let inset = ''
while delete > 0 && !empty(new_suffix)
let last_char = matchstr(new_suffix, '.$')
let new_suffix = matchstr(new_suffix, '^.\{-\}\ze.$')
if last_char ==# matchstr(current_suffix, '.$')
if !empty(inset)
call prop_add(line('.'), col('.') + len(current_suffix), {'type': s:hlgroup, 'text': inset})
let inset = ''
endif
let current_suffix = matchstr(current_suffix, '^.\{-\}\ze.$')
let delete -= 1
else
let inset = last_char . inset
endif
endwhile
if !empty(new_suffix . inset)
call prop_add(line('.'), col('.'), {'type': s:hlgroup, 'text': new_suffix . inset})
endif
for line in text[1:]
call prop_add(line('.'), 0, {'type': s:hlgroup, 'text_align': 'below', 'text': line})
endfor
if !empty(annot)
call prop_add(line('.'), col('$'), {'type': s:annot_hlgroup, 'text': ' ' . annot})
endif
endif
call copilot#Notify('textDocument/didShowCompletion', {'item': item})
catch
return copilot#logger#Exception()
endtry
endfunction
function! s:HandleTriggerResult(state, result) abort
let a:state.suggestions = type(a:result) == type([]) ? a:result : get(empty(a:result) ? {} : a:result, 'items', [])
let a:state.choice = 0
if get(b:, '_copilot') is# a:state
call s:UpdatePreview()
endif
endfunction
function! s:HandleTriggerError(state, result) abort
let a:state.suggestions = []
let a:state.choice = 0
let a:state.error = a:result
if get(b:, '_copilot') is# a:state
call s:UpdatePreview()
endif
endfunction
function! copilot#Suggest() abort
if !s:Running()
return ''
endif
try
call copilot#Complete(function('s:HandleTriggerResult'), function('s:HandleTriggerError'))
catch
call copilot#logger#Exception()
endtry
return ''
endfunction
function! s:Trigger(bufnr, timer) abort
let timer = get(g:, '_copilot_timer', -1)
if a:bufnr !=# bufnr('') || a:timer isnot# timer || mode() !=# 'i'
return
endif
unlet! g:_copilot_timer
return copilot#Suggest()
endfunction
function! copilot#Schedule() abort
if !s:has_ghost_text || !s:Running() || !copilot#Enabled()
call copilot#Clear()
return
endif
call s:UpdatePreview()
let delay = get(g:, 'copilot_idle_delay', 45)
call timer_stop(get(g:, '_copilot_timer', -1))
let g:_copilot_timer = timer_start(delay, function('s:Trigger', [bufnr('')]))
endfunction
function! s:Attach(bufnr, ...) abort
try
return copilot#Client().Attach(a:bufnr)
catch
call copilot#logger#Exception()
endtry
endfunction
function! copilot#OnFileType() abort
if empty(s:BufferDisabled()) && &l:modifiable && &l:buflisted
call copilot#util#Defer(function('s:Attach'), bufnr(''))
endif
endfunction
function! s:Focus(bufnr, ...) abort
if s:Running() && copilot#Client().IsAttached(a:bufnr)
call copilot#Client().Notify('textDocument/didFocus', {'textDocument': {'uri': copilot#Client().Attach(a:bufnr).uri}})
endif
endfunction
function! copilot#OnBufEnter() abort
let bufnr = bufnr('')
call copilot#util#Defer(function('s:Focus'), bufnr)
endfunction
function! copilot#OnInsertLeavePre() abort
call copilot#Clear()
call s:ClearPreview()
endfunction
function! copilot#OnInsertEnter() abort
return copilot#Schedule()
endfunction
function! copilot#OnCompleteChanged() abort
if s:HideDuringCompletion()
return copilot#Clear()
else
return copilot#Schedule()
endif
endfunction
function! copilot#OnCursorMovedI() abort
return copilot#Schedule()
endfunction
function! copilot#OnBufUnload() abort
endfunction
function! copilot#OnVimLeavePre() abort
endfunction
function! copilot#TextQueuedForInsertion() abort
try
return remove(s:, 'suggestion_text')
catch
return ''
endtry
endfunction
function! copilot#Accept(...) abort
let s = copilot#GetDisplayedSuggestion()
if !empty(s.text)
unlet! b:_copilot
let text = ''
if a:0 > 1
let text = substitute(matchstr(s.text, "\n*" . '\%(' . a:2 .'\)'), "\n*$", '', '')
endif
if empty(text)
let text = s.text
endif
if text ==# s.text && has_key(s.item, 'command')
call copilot#Request('workspace/executeCommand', s.item.command)
else
let line_text = strpart(getline('.'), 0, col('.') - 1) . text
call copilot#Notify('textDocument/didPartiallyAcceptCompletion', {
\ 'item': s.item,
\ 'acceptedLength': copilot#util#UTF16Width(line_text) - s.item.range.start.character})
endif
call s:ClearPreview()
let s:suggestion_text = text
let recall = text =~# "\n" ? "\<C-R>\<C-O>=" : "\<C-R>\<C-R>="
return repeat("\<Left>\<Del>", s.outdentSize) . repeat("\<Del>", s.deleteSize) .
\ recall . "copilot#TextQueuedForInsertion()\<CR>" . (a:0 > 1 ? '' : "\<End>")
endif
let default = get(g:, 'copilot_tab_fallback', pumvisible() ? "\<C-N>" : "\t")
if !a:0
return default
elseif type(a:1) == v:t_string
return a:1
elseif type(a:1) == v:t_func
try
return call(a:1, [])
catch
return default
endtry
else
return default
endif
endfunction
function! copilot#AcceptWord(...) abort
return copilot#Accept(a:0 ? a:1 : '', '\%(\k\@!.\)*\k*')
endfunction
function! copilot#AcceptLine(...) abort
return copilot#Accept(a:0 ? a:1 : "\r", "[^\n]\\+")
endfunction
function! s:BrowserCallback(into, code) abort
let a:into.code = a:code
endfunction
function! copilot#Browser() abort
if type(get(g:, 'copilot_browser')) == v:t_list
let cmd = copy(g:copilot_browser)
elseif type(get(g:, 'open_command')) == v:t_list
let cmd = copy(g:open_command)
elseif has('win32')
let cmd = ['rundll32', 'url.dll,FileProtocolHandler']
elseif has('mac')
let cmd = ['open']
elseif executable('wslview')
return ['wslview']
elseif executable('xdg-open')
return ['xdg-open']
else
return []
endif
if executable(get(cmd, 0, ''))
return cmd
else
return []
endif
endfunction
let s:commands = {}
function! s:EnabledStatusMessage() abort
let buf_disabled = s:BufferDisabled()
if !s:has_ghost_text
if has('nvim')
return "Neovim 0.6 required to support ghost text"
else
return "Vim " . s:vim_minimum_version . " required to support ghost text"
endif
elseif !get(g:, 'copilot_enabled', 1)
return 'Disabled globally by :Copilot disable'
elseif buf_disabled is# 5
return 'Disabled for current buffer by buftype=' . &buftype
elseif buf_disabled is# 4
return 'Disabled for current buffer by b:copilot_enabled'
elseif buf_disabled is# 3
return 'Disabled for current buffer by b:copilot_disabled'
elseif buf_disabled is# 2
return 'Disabled for filetype=' . &filetype . ' by internal default'
elseif buf_disabled
return 'Disabled for filetype=' . &filetype . ' by g:copilot_filetypes'
elseif !copilot#Enabled()
return 'BUG: Something is wrong with enabling/disabling'
else
return ''
endif
endfunction
function! s:VerifySetup() abort
let error = copilot#Client().StartupError()
if !empty(error)
echo 'Copilot: ' . error
return
endif
let status = copilot#Call('checkStatus', {})
if !has_key(status, 'user')
echo 'Copilot: Not authenticated. Invoke :Copilot setup'
return
endif
if status.status ==# 'NoTelemetryConsent'
echo 'Copilot: Telemetry terms not accepted. Invoke :Copilot setup'
return
endif
if status.status ==# 'NotAuthorized'
echo "Copilot: You don't have access to GitHub Copilot. Sign up by visiting https://github.com/settings/copilot"
return
endif
return 1
endfunction
function! s:commands.status(opts) abort
if !s:VerifySetup()
return
endif
if exists('s:client.status.status') && s:client.status.status =~# 'Warning\|Error'
echo 'Copilot: ' . s:client.status.status
if !empty(get(s:client.status, 'message', ''))
echon ': ' . s:client.status.message
endif
return
endif
let status = s:EnabledStatusMessage()
if !empty(status)
echo 'Copilot: ' . status
return
endif
echo 'Copilot: Ready'
call s:EditorVersionWarning()
endfunction
function! s:commands.signout(opts) abort
let status = copilot#Call('checkStatus', {'options': {'localChecksOnly': v:true}})
if has_key(status, 'user')
echo 'Copilot: Signed out as GitHub user ' . status.user
else
echo 'Copilot: Not signed in'
endif
call copilot#Call('signOut', {})
endfunction
function! s:commands.setup(opts) abort
let startup_error = copilot#Client().StartupError()
if !empty(startup_error)
echo 'Copilot: ' . startup_error
return
endif
let browser = copilot#Browser()
let status = copilot#Call('checkStatus', {})
if has_key(status, 'user')
let data = {'status': 'AlreadySignedIn', 'user': status.user}
else
let data = copilot#Call('signInInitiate', {})
endif
if has_key(data, 'verificationUri')
let uri = data.verificationUri
if has('clipboard')
try
let @+ = data.userCode
catch
endtry
try
let @* = data.userCode
catch
endtry
endif
let codemsg = "First copy your one-time code: " . data.userCode . "\n"
try
if len(&mouse)
let mouse = &mouse
set mouse=
endif
if get(a:opts, 'bang')
call s:Echo(codemsg . "In your browser, visit " . uri)
elseif len(browser)
call input(codemsg . "Press ENTER to open GitHub in your browser\n")
let status = {}
call copilot#job#Stream(browser + [uri], v:null, v:null, function('s:BrowserCallback', [status]))
let time = reltime()
while empty(status) && reltimefloat(reltime(time)) < 5
sleep 10m
endwhile
if get(status, 'code', browser[0] !=# 'xdg-open') != 0
call s:Echo("Failed to open browser. Visit " . uri)
else
call s:Echo("Opened " . uri)
endif
else
call s:Echo(codemsg . "Could not find browser. Visit " . uri)
endif
call s:Echo("Waiting (could take up to 10 seconds)")
let request = copilot#Request('signInConfirm', {'userCode': data.userCode}).Wait()
finally
if exists('mouse')
let &mouse = mouse
endif
endtry
if request.status ==# 'error'
return 'echoerr ' . string('Copilot: Authentication failure: ' . request.error.message)
else
let status = request.result
endif
elseif get(data, 'status', '') isnot# 'AlreadySignedIn'
return 'echoerr ' . string('Copilot: Something went wrong')
endif
let user = get(status, 'user', '<unknown>')
echo 'Copilot: Authenticated as GitHub user ' . user
endfunction
let s:commands.auth = s:commands.setup
let s:commands.signin = s:commands.setup
function! s:commands.help(opts) abort
return a:opts.mods . ' help ' . (len(a:opts.arg) ? ':Copilot_' . a:opts.arg : 'copilot')
endfunction
function! s:commands.version(opts) abort
echo 'copilot.vim ' .copilot#client#EditorPluginInfo().version
let editorInfo = copilot#client#EditorInfo()
echo editorInfo.name . ' ' . editorInfo.version
if s:Running()
let versions = s:client.Request('getVersion', {})
if exists('s:client.serverInfo.version')
echo s:client.serverInfo.name . ' ' . s:client.serverInfo.version
else
echo 'GitHub Copilot Language Server ' . versions.Await().version
endif
if exists('s:client.node_version')
echo 'Node.js ' . s:client.node_version
else
echo 'Node.js ' . substitute(get(versions.Await(), 'runtimeVersion', '?'), '^node/', '', 'g')
endif
else
echo 'Not running'
if exists('s:client.node_version')
echo 'Node.js ' . s:client.node_version
endif
endif
if has('win32')
echo 'Windows'
elseif has('macunix')
echo 'macOS'
elseif !has('unix')
echo 'Unknown OS'
elseif isdirectory('/sys/kernel')
echo 'Linux'
else
echo 'UNIX'
endif
call s:EditorVersionWarning()
endfunction
function! s:UpdateEditorConfiguration() abort
try
if s:Running()
call copilot#Notify('notifyChangeConfiguration', {'settings': s:EditorConfiguration()})
endif
catch
call copilot#logger#Exception()
endtry
endfunction
let s:feedback_url = 'https://github.com/orgs/community/discussions/categories/copilot'
function! s:commands.feedback(opts) abort
echo s:feedback_url
let browser = copilot#Browser()
if len(browser)
call copilot#job#Stream(browser + [s:feedback_url], v:null, v:null, v:null)
endif
endfunction
function! s:commands.restart(opts) abort
call s:Stop()
echo 'Copilot: Restarting language server'
call s:Start()
endfunction
function! s:commands.disable(opts) abort
let g:copilot_enabled = 0
call s:UpdateEditorConfiguration()
endfunction
function! s:commands.enable(opts) abort
let g:copilot_enabled = 1
call s:UpdateEditorConfiguration()
endfunction
function! s:commands.panel(opts) abort
if s:VerifySetup()
return copilot#panel#Open(a:opts)
endif
endfunction
function! s:commands.log(opts) abort
return a:opts.mods . ' split +$ copilot:///log'
endfunction
function! copilot#CommandComplete(arg, lead, pos) abort
let args = matchstr(strpart(a:lead, 0, a:pos), 'C\%[opilot][! ] *\zs.*')
if args !~# ' '
return sort(filter(map(keys(s:commands), { k, v -> tr(v, '_', '-') }),
\ { k, v -> strpart(v, 0, len(a:arg)) ==# a:arg }))
else
return []
endif
endfunction
function! copilot#Command(line1, line2, range, bang, mods, arg) abort
let cmd = matchstr(a:arg, '^\%(\\.\|\S\)\+')
let arg = matchstr(a:arg, '\s\zs\S.*')
if !empty(cmd) && !has_key(s:commands, tr(cmd, '-', '_'))
return 'echoerr ' . string('Copilot: unknown command ' . string(cmd))
endif
try
if empty(cmd)
if !s:Running()
let cmd = 'restart'
else
try
let opts = copilot#Call('checkStatus', {'options': {'localChecksOnly': v:true}})
if opts.status !=# 'OK' && opts.status !=# 'MaybeOK'
let cmd = 'setup'
else
let cmd = 'panel'
endif
catch
call copilot#logger#Exception()
let cmd = 'log'
endtry
endif
endif
let opts = {'line1': a:line1, 'line2': a:line2, 'range': a:range, 'bang': a:bang, 'mods': a:mods, 'arg': arg}
let retval = s:commands[tr(cmd, '-', '_')](opts)
if type(retval) == v:t_string
return retval
else
return ''
endif
catch /^Copilot:/
return 'echoerr ' . string(v:exception)
endtry
endfunction

View File

@ -1,764 +0,0 @@
scriptencoding utf-8
let s:plugin_version = copilot#version#String()
let s:error_canceled = {'code': -32800, 'message': 'Canceled'}
let s:error_exit = {'code': -32097, 'message': 'Process exited'}
let s:error_connection_inactive = {'code': -32096, 'message': 'Connection inactive'}
let s:root = expand('<sfile>:h:h:h')
if !exists('s:instances')
let s:instances = {}
endif
" allow sourcing this file to reload the Lua file too
if has('nvim')
lua package.loaded._copilot = nil
endif
function! s:Warn(msg) abort
if !empty(get(g:, 'copilot_no_startup_warnings'))
return
endif
echohl WarningMsg
echomsg 'Copilot: ' . a:msg
echohl NONE
endfunction
function! s:VimClose() dict abort
if !has_key(self, 'job')
return
endif
let job = self.job
if has_key(self, 'kill')
call job_stop(job, 'kill')
call copilot#logger#Warn('Process forcefully terminated')
return
endif
let self.kill = v:true
let self.shutdown = self.Request('shutdown', {}, function(self.Notify, ['exit']))
call timer_start(2000, { _ -> job_stop(job, 'kill') })
call copilot#logger#Debug('Process shutdown initiated')
endfunction
function! s:LogSend(request, line) abort
return '--> ' . a:line
endfunction
function! s:RejectRequest(request, error) abort
if a:request.status !=# 'running'
return
endif
let a:request.waiting = {}
call remove(a:request, 'resolve')
let reject = remove(a:request, 'reject')
let a:request.status = 'error'
let a:request.error = deepcopy(a:error)
for Cb in reject
let a:request.waiting[timer_start(0, function('s:Callback', [a:request, 'error', Cb]))] = 1
endfor
if index([s:error_canceled.code, s:error_connection_inactive.code], a:error.code) != -1
return
endif
let msg = 'Method ' . a:request.method . ' errored with E' . a:error.code . ': ' . json_encode(a:error.message)
if empty(reject)
call copilot#logger#Error(msg)
else
call copilot#logger#Debug(msg)
endif
endfunction
function! s:AfterInitialized(fn, ...) dict abort
call add(self.after_initialized, function(a:fn, a:000))
endfunction
function! s:Send(instance, request) abort
if !has_key(a:instance, 'job')
return v:false
endif
try
call ch_sendexpr(a:instance.job, a:request)
return v:true
catch /^Vim\%((\a\+)\)\=:E906:/
let a:instance.kill = v:true
let job = remove(a:instance, 'job')
call job_stop(job)
call timer_start(2000, { _ -> job_stop(job, 'kill') })
call copilot#logger#Warn('Terminating process after failed write')
return v:false
catch /^Vim\%((\a\+)\)\=:E631:/
return v:false
endtry
endfunction
function! s:VimNotify(method, params) dict abort
let request = {'method': a:method, 'params': a:params}
call self.AfterInitialized(function('s:Send', [self, request]))
endfunction
function! s:RequestWait() dict abort
while self.status ==# 'running'
sleep 1m
endwhile
while !empty(get(self, 'waiting', {}))
sleep 1m
endwhile
return self
endfunction
function! s:RequestAwait() dict abort
call self.Wait()
if has_key(self, 'result')
return self.result
endif
throw 'Copilot:E' . self.error.code . ': ' . self.error.message
endfunction
function! s:RequestClient() dict abort
return get(s:instances, self.client_id, v:null)
endfunction
if !exists('s:id')
let s:id = 0
endif
if !exists('s:progress_token_id')
let s:progress_token_id = 0
endif
function! s:SetUpRequest(instance, id, method, params, progress, ...) abort
let request = {
\ 'client_id': a:instance.id,
\ 'id': a:id,
\ 'method': a:method,
\ 'params': a:params,
\ 'Client': function('s:RequestClient'),
\ 'Wait': function('s:RequestWait'),
\ 'Await': function('s:RequestAwait'),
\ 'Cancel': function('s:RequestCancel'),
\ 'resolve': [],
\ 'reject': [],
\ 'progress': a:progress,
\ 'status': 'running'}
let args = a:000[2:-1]
if len(args)
if !empty(a:1)
call add(request.resolve, { v -> call(a:1, [v] + args)})
endif
if !empty(a:2)
call add(request.reject, { v -> call(a:2, [v] + args)})
endif
return request
endif
if a:0 && !empty(a:1)
call add(request.resolve, a:1)
endif
if a:0 > 1 && !empty(a:2)
call add(request.reject, a:2)
endif
return request
endfunction
function! s:UrlEncode(str) abort
return substitute(iconv(a:str, 'latin1', 'utf-8'),'[^A-Za-z0-9._~!$&''()*+,;=:@/-]','\="%".printf("%02X",char2nr(submatch(0)))','g')
endfunction
let s:slash = exists('+shellslash') ? '\' : '/'
function! s:UriFromBufnr(bufnr) abort
let absolute = tr(bufname(a:bufnr), s:slash, '/')
if absolute !~# '^\a\+:\|^/\|^$' && getbufvar(a:bufnr, 'buftype') =~# '^\%(nowrite\)\=$'
let absolute = substitute(tr(getcwd(), s:slash, '/'), '/\=$', '/', '') . absolute
endif
return s:UriFromPath(absolute)
endfunction
function! s:UriFromPath(absolute) abort
let absolute = a:absolute
if has('win32') && absolute =~# '^\a://\@!'
return 'file:///' . strpart(absolute, 0, 2) . s:UrlEncode(strpart(absolute, 2))
elseif absolute =~# '^/'
return 'file://' . s:UrlEncode(absolute)
elseif absolute =~# '^\a[[:alnum:].+-]*:\|^$'
return absolute
else
return ''
endif
endfunction
function! s:BufferText(bufnr) abort
return join(getbufline(a:bufnr, 1, '$'), "\n") . "\n"
endfunction
let s:valid_request_key = '^\%(id\|method\|params\)$'
function! s:SendRequest(instance, request, ...) abort
if !has_key(a:instance, 'job') || get(a:instance, 'shutdown', a:request) isnot# a:request
return s:RejectRequest(a:request, s:error_connection_inactive)
endif
let json = filter(copy(a:request), 'v:key =~# s:valid_request_key')
if empty(s:Send(a:instance, json)) && has_key(a:request, 'id') && has_key(a:instance.requests, a:request.id)
call s:RejectRequest(remove(a:instance.requests, a:request.id), {'code': -32099, 'message': 'Write failed'})
endif
endfunction
function! s:RegisterWorkspaceFolderForBuffer(instance, buf) abort
let root = getbufvar(a:buf, 'workspace_folder')
if type(root) != v:t_string
return
endif
let root = s:UriFromPath(substitute(root, '[\/]$', '', ''))
if empty(root) || has_key(a:instance.workspaceFolders, root)
return
endif
let a:instance.workspaceFolders[root] = v:true
call a:instance.Notify('workspace/didChangeWorkspaceFolders', {'event': {'added': [{'uri': root, 'name': fnamemodify(root, ':t')}], 'removed': []}})
endfunction
function! s:PreprocessParams(instance, params) abort
let bufnr = v:null
for doc in filter([get(a:params, 'textDocument', {})], 'type(get(v:val, "uri", "")) == v:t_number')
let bufnr = doc.uri
call s:RegisterWorkspaceFolderForBuffer(a:instance, bufnr)
call extend(doc, a:instance.Attach(bufnr))
endfor
let progress_tokens = []
for key in keys(a:params)
if key =~# 'Token$' && type(a:params[key]) == v:t_func
let s:progress_token_id += 1
let a:instance.progress[s:progress_token_id] = a:params[key]
call add(progress_tokens, s:progress_token_id)
let a:params[key] = s:progress_token_id
endif
endfor
return [bufnr, progress_tokens]
endfunction
function! s:VimAttach(bufnr) dict abort
if !bufloaded(a:bufnr)
return {'uri': '', 'version': 0}
endif
let bufnr = a:bufnr
let doc = {
\ 'uri': s:UriFromBufnr(bufnr),
\ 'version': getbufvar(bufnr, 'changedtick', 0),
\ 'languageId': getbufvar(bufnr, '&filetype'),
\ }
if has_key(self.open_buffers, bufnr) && (
\ self.open_buffers[bufnr].uri !=# doc.uri ||
\ self.open_buffers[bufnr].languageId !=# doc.languageId)
call self.Notify('textDocument/didClose', {'textDocument': {'uri': self.open_buffers[bufnr].uri}})
call remove(self.open_buffers, bufnr)
endif
if !has_key(self.open_buffers, bufnr)
call self.Notify('textDocument/didOpen', {'textDocument': extend({'text': s:BufferText(bufnr)}, doc)})
let self.open_buffers[bufnr] = doc
else
call self.Notify('textDocument/didChange', {
\ 'textDocument': {'uri': doc.uri, 'version': doc.version},
\ 'contentChanges': [{'text': s:BufferText(bufnr)}]})
let self.open_buffers[bufnr].version = doc.version
endif
return doc
endfunction
function! s:VimIsAttached(bufnr) dict abort
return bufloaded(a:bufnr) && has_key(self.open_buffers, a:bufnr) ? v:true : v:false
endfunction
function! s:VimRequest(method, params, ...) dict abort
let s:id += 1
let params = deepcopy(a:params)
let [_, progress] = s:PreprocessParams(self, params)
let request = call('s:SetUpRequest', [self, s:id, a:method, params, progress] + a:000)
call self.AfterInitialized(function('s:SendRequest', [self, request]))
let self.requests[s:id] = request
return request
endfunction
function! s:Call(method, params, ...) dict abort
let request = call(self.Request, [a:method, a:params] + a:000)
if a:0
return request
endif
return request.Await()
endfunction
function! s:Cancel(request) dict abort
if has_key(self.requests, get(a:request, 'id', ''))
call self.Notify('$/cancelRequest', {'id': a:request.id})
call s:RejectRequest(remove(self.requests, a:request.id), s:error_canceled)
endif
endfunction
function! s:RequestCancel() dict abort
let instance = self.Client()
if !empty(instance)
call instance.Cancel(self)
elseif get(self, 'status', '') ==# 'running'
call s:RejectRequest(self, s:error_canceled)
endif
return self
endfunction
function! s:DispatchMessage(instance, method, handler, id, params, ...) abort
try
let response = {'result': call(a:handler, [a:params, a:instance])}
if response.result is# 0
let response.result = v:null
endif
catch
call copilot#logger#Exception('lsp.request.' . a:method)
let response = {'error': {'code': -32000, 'message': v:exception}}
endtry
if a:id isnot# v:null
call s:Send(a:instance, extend({'id': a:id}, response))
endif
if !has_key(s:notifications, a:method)
return response
endif
endfunction
function! s:OnMessage(instance, body, ...) abort
if !has_key(a:body, 'method')
return s:OnResponse(a:instance, a:body)
endif
let request = a:body
let id = get(request, 'id', v:null)
let params = get(request, 'params', v:null)
if has_key(a:instance.methods, request.method)
return s:DispatchMessage(a:instance, request.method, a:instance.methods[request.method], id, params)
elseif id isnot# v:null
call s:Send(a:instance, {"id": id, "error": {"code": -32700, "message": "Method not found: " . request.method}})
call copilot#logger#Debug('Unexpected request ' . request.method . ' called with ' . json_encode(params))
elseif request.method !~# '^\$/'
call copilot#logger#Debug('Unexpected notification ' . request.method . ' called with ' . json_encode(params))
endif
endfunction
function! s:OnResponse(instance, response, ...) abort
let response = a:response
let id = get(a:response, 'id', v:null)
if !has_key(a:instance.requests, id)
return
endif
let request = remove(a:instance.requests, id)
for progress_token in request.progress
if has_key(a:instance.progress, progress_token)
call remove(a:instance.progress, progress_token)
endif
endfor
if request.status !=# 'running'
return
endif
if has_key(response, 'result')
let request.waiting = {}
let resolve = remove(request, 'resolve')
call remove(request, 'reject')
let request.status = 'success'
let request.result = response.result
for Cb in resolve
let request.waiting[timer_start(0, function('s:Callback', [request, 'result', Cb]))] = 1
endfor
else
call s:RejectRequest(request, response.error)
endif
endfunction
function! s:OnErr(instance, ch, line, ...) abort
if !has_key(a:instance, 'serverInfo')
call copilot#logger#Bare('<-! ' . a:line)
endif
endfunction
function! s:OnExit(instance, code, ...) abort
let a:instance.exit_status = a:code
if has_key(a:instance, 'job')
call remove(a:instance, 'job')
endif
if has_key(a:instance, 'client_id')
call remove(a:instance, 'client_id')
endif
let message = 'Process exited with status ' . a:code
if a:code >= 18 && a:code < 100
let message = 'Node.js too old. ' .
\ (get(a:instance.node, 0, 'node') ==# 'node' ? 'Upgrade' : 'Change g:copilot_node_command') .
\ ' to ' . a:code . '.x or newer'
endif
if !has_key(a:instance, 'serverInfo') && !has_key(a:instance, 'startup_error')
let a:instance.startup_error = message
endif
for id in sort(keys(a:instance.requests), { a, b -> +a > +b })
call s:RejectRequest(remove(a:instance.requests, id), s:error_exit)
endfor
if has_key(a:instance, 'after_initialized')
let a:instance.AfterInitialized = function('copilot#util#Defer')
for Fn in remove(a:instance, 'after_initialized')
call copilot#util#Defer(Fn)
endfor
endif
call copilot#util#Defer({ -> get(s:instances, a:instance.id) is# a:instance ? remove(s:instances, a:instance.id) : {} })
if a:code == 0
call copilot#logger#Info(message)
else
call copilot#logger#Warn(message)
if !has_key(a:instance, 'kill')
call copilot#util#Defer(function('s:Warn'), message)
endif
endif
endfunction
function! copilot#client#LspInit(id, initialize_result) abort
if !has_key(s:instances, a:id)
return
endif
call s:PostInit(a:initialize_result, s:instances[a:id])
endfunction
function! copilot#client#LspExit(id, code, signal) abort
if !has_key(s:instances, a:id)
return
endif
let instance = remove(s:instances, a:id)
call s:OnExit(instance, a:code)
endfunction
function! copilot#client#LspResponse(id, opts, ...) abort
if !has_key(s:instances, a:id)
return
endif
call s:OnResponse(s:instances[a:id], a:opts)
endfunction
function! s:NvimAttach(bufnr) dict abort
if !bufloaded(a:bufnr)
return {'uri': '', 'version': 0}
endif
call luaeval('pcall(vim.lsp.buf_attach_client, _A[1], _A[2])', [a:bufnr, self.id])
return luaeval('{uri = vim.uri_from_bufnr(_A), version = vim.lsp.util.buf_versions[_A]}', a:bufnr)
endfunction
function! s:NvimIsAttached(bufnr) dict abort
return bufloaded(a:bufnr) ? luaeval('vim.lsp.buf_is_attached(_A[1], _A[2])', [a:bufnr, self.id]) : v:false
endfunction
function! s:NvimRequest(method, params, ...) dict abort
let params = deepcopy(a:params)
let [bufnr, progress] = s:PreprocessParams(self, params)
let request = call('s:SetUpRequest', [self, v:null, a:method, params, progress] + a:000)
call self.AfterInitialized(function('s:NvimDoRequest', [self, request, bufnr]))
return request
endfunction
function! s:NvimDoRequest(client, request, bufnr) abort
let request = a:request
if has_key(a:client, 'client_id') && !has_key(a:client, 'kill')
let request.id = eval("v:lua.require'_copilot'.lsp_request(a:client.id, a:request.method, a:request.params, a:bufnr)")
endif
if request.id isnot# v:null
let a:client.requests[request.id] = request
else
if has_key(a:client, 'client_id')
call copilot#client#LspExit(a:client.client_id, -1, -1)
endif
call copilot#util#Defer(function('s:RejectRequest'), request, s:error_connection_inactive)
endif
return request
endfunction
function! s:NvimClose() dict abort
if !has_key(self, 'client_id')
return
endif
let self.kill = v:true
return luaeval('vim.lsp.get_client_by_id(_A).stop()', self.client_id)
endfunction
function! s:NvimNotify(method, params) dict abort
call self.AfterInitialized(function('s:NvimDoNotify', [self.client_id, a:method, a:params]))
endfunction
function! s:NvimDoNotify(client_id, method, params) abort
return eval("v:lua.require'_copilot'.rpc_notify(a:client_id, a:method, a:params)")
endfunction
function! copilot#client#LspHandle(id, request) abort
if !has_key(s:instances, a:id)
return
endif
return s:OnMessage(s:instances[a:id], a:request)
endfunction
let s:script_name = 'dist/language-server.js'
function! s:Command() abort
if !has('nvim-0.7') && v:version < 900
return [[], [], 'Vim version too old']
endif
let script = get(g:, 'copilot_command', '')
if type(script) == type('')
let script = [expand(script)]
endif
if empty(script) || !filereadable(script[0])
let script = [s:root . '/' . s:script_name]
if !filereadable(script[0])
return [[], [], 'Could not find ' . s:script_name . ' (bad install?)']
endif
elseif script[0] !~# '\.js$'
return [[], script + ['--stdio'], '']
endif
let node = get(g:, 'copilot_node_command', '')
if empty(node)
let node = ['node']
elseif type(node) == type('')
let node = [expand(node)]
endif
if !executable(get(node, 0, ''))
if get(node, 0, '') ==# 'node'
return [[], [], 'Node.js not found in PATH']
else
return [[], [], 'Node.js executable `' . get(node, 0, '') . "' not found"]
endif
endif
return [node, script + ['--stdio'], '']
endfunction
function! s:UrlDecode(str) abort
return substitute(a:str, '%\(\x\x\)', '\=iconv(nr2char("0x".submatch(1)), "utf-8", "latin1")', 'g')
endfunction
function! copilot#client#EditorInfo() abort
if !exists('s:editor_version')
if has('nvim')
let s:editor_version = matchstr(execute('version'), 'NVIM v\zs[^[:space:]]\+')
else
let s:editor_version = (v:version / 100) . '.' . (v:version % 100) . (exists('v:versionlong') ? printf('.%04d', v:versionlong % 10000) : '')
endif
endif
return {'name': has('nvim') ? 'Neovim': 'Vim', 'version': s:editor_version}
endfunction
function! copilot#client#EditorPluginInfo() abort
return {'name': 'copilot.vim', 'version': s:plugin_version}
endfunction
function! copilot#client#Settings() abort
let settings = {
\ 'http': {
\ 'proxy': get(g:, 'copilot_proxy', v:null),
\ 'proxyStrictSSL': get(g:, 'copilot_proxy_strict_ssl', v:null)},
\ 'github-enterprise': {'uri': get(g:, 'copilot_auth_provider_url', v:null)},
\ }
if type(settings.http.proxy) ==# v:t_string && settings.http.proxy =~# '^[^/]\+$'
let settings.http.proxy = 'http://' . settings.http.proxy
endif
if type(get(g:, 'copilot_settings')) == v:t_dict
call extend(settings, g:copilot_settings)
endif
return settings
endfunction
function! s:PostInit(result, instance) abort
let a:instance.serverInfo = get(a:result, 'serverInfo', {})
if !has_key(a:instance, 'node_version') && has_key(a:result.serverInfo, 'nodeVersion')
let a:instance.node_version = a:result.serverInfo.nodeVersion
endif
let a:instance.AfterInitialized = function('copilot#util#Defer')
for Fn in remove(a:instance, 'after_initialized')
call copilot#util#Defer(Fn)
endfor
endfunction
function! s:InitializeResult(result, instance) abort
call s:Send(a:instance, {'method': 'initialized', 'params': {}})
call s:PostInit(a:result, a:instance)
endfunction
function! s:InitializeError(error, instance) abort
if !has_key(a:instance, 'startup_error')
let a:instance.startup_error = 'Unexpected error E' . a:error.code . ' initializing language server: ' . a:error.message
call a:instance.Close()
endif
endfunction
function! s:StartupError() dict abort
while (has_key(self, 'job') || has_key(self, 'client_id')) && !has_key(self, 'startup_error') && !has_key(self, 'serverInfo')
sleep 10m
endwhile
if has_key(self, 'serverInfo')
return ''
else
return get(self, 'startup_error', 'Something unexpected went wrong spawning the language server')
endif
endfunction
function! s:StatusNotification(params, instance) abort
let a:instance.status = a:params
endfunction
function! s:Nop(...) abort
return v:null
endfunction
function! s:False(...) abort
return v:false
endfunction
function! s:Progress(params, instance) abort
if has_key(a:instance.progress, a:params.token)
call a:instance.progress[a:params.token](a:params.value)
endif
endfunction
let s:notifications = {
\ '$/progress': function('s:Progress'),
\ 'featureFlagsNotification': function('s:Nop'),
\ 'statusNotification': function('s:StatusNotification'),
\ 'window/logMessage': function('copilot#handlers#window_logMessage'),
\ }
let s:vim_handlers = {
\ 'window/showMessageRequest': function('copilot#handlers#window_showMessageRequest'),
\ 'window/showDocument': function('copilot#handlers#window_showDocument'),
\ }
let s:vim_capabilities = {
\ 'workspace': {'workspaceFolders': v:true},
\ 'window': {'showDocument': {'support': v:true}},
\ }
function! copilot#client#New(...) abort
let opts = a:0 ? a:1 : {}
let instance = {'requests': {},
\ 'progress': {},
\ 'workspaceFolders': {},
\ 'after_initialized': [],
\ 'status': {'status': 'Starting', 'message': ''},
\ 'AfterInitialized': function('s:AfterInitialized'),
\ 'Close': function('s:Nop'),
\ 'Notify': function('s:False'),
\ 'Request': function('s:VimRequest'),
\ 'Attach': function('s:Nop'),
\ 'IsAttached': function('s:False'),
\ 'Call': function('s:Call'),
\ 'Cancel': function('s:Cancel'),
\ 'StartupError': function('s:StartupError'),
\ }
let instance.methods = copy(s:notifications)
let [node, argv, command_error] = s:Command()
if !empty(command_error)
let instance.id = -1
let instance.startup_error = command_error
call copilot#logger#Error(command_error)
return instance
endif
let instance.node = node
let command = node + argv
let opts = {}
let opts.initializationOptions = {
\ 'editorInfo': copilot#client#EditorInfo(),
\ 'editorPluginInfo': copilot#client#EditorPluginInfo(),
\ }
let opts.workspaceFolders = []
let settings = extend(copilot#client#Settings(), get(opts, 'editorConfiguration', {}))
if type(get(g:, 'copilot_workspace_folders')) == v:t_list
for folder in g:copilot_workspace_folders
if type(folder) == v:t_string && !empty(folder) && folder !~# '\*\*\|^/$'
for path in glob(folder . '/', 0, 1)
let uri = s:UriFromPath(substitute(path, '[\/]*$', '', ''))
call add(opts.workspaceFolders, {'uri': uri, 'name': fnamemodify(uri, ':t')})
endfor
elseif type(folder) == v:t_dict && has_key(v:t_dict, 'uri') && !empty(folder.uri) && has_key(folder, 'name')
call add(opts.workspaceFolders, folder)
endif
endfor
endif
for folder in opts.workspaceFolders
let instance.workspaceFolders[folder.uri] = v:true
endfor
if has('nvim')
call extend(instance, {
\ 'Close': function('s:NvimClose'),
\ 'Notify': function('s:NvimNotify'),
\ 'Request': function('s:NvimRequest'),
\ 'Attach': function('s:NvimAttach'),
\ 'IsAttached': function('s:NvimIsAttached'),
\ })
let instance.client_id = eval("v:lua.require'_copilot'.lsp_start_client(command, keys(instance.methods), opts, settings)")
let instance.id = instance.client_id
else
call extend(instance, {
\ 'Close': function('s:VimClose'),
\ 'Notify': function('s:VimNotify'),
\ 'Attach': function('s:VimAttach'),
\ 'IsAttached': function('s:VimIsAttached'),
\ })
let state = {'headers': {}, 'mode': 'headers', 'buffer': ''}
let instance.open_buffers = {}
let instance.methods = extend(s:vim_handlers, instance.methods)
let instance.job = job_start(command, {
\ 'cwd': copilot#job#Cwd(),
\ 'noblock': 1,
\ 'stoponexit': '',
\ 'in_mode': 'lsp',
\ 'out_mode': 'lsp',
\ 'out_cb': { j, d -> copilot#util#Defer(function('s:OnMessage'), instance, d) },
\ 'err_cb': function('s:OnErr', [instance]),
\ 'exit_cb': { j, d -> copilot#util#Defer(function('s:OnExit'), instance, d) },
\ })
let instance.id = job_info(instance.job).process
let opts.capabilities = s:vim_capabilities
let opts.processId = getpid()
let request = instance.Request('initialize', opts, function('s:InitializeResult'), function('s:InitializeError'), instance)
call call(remove(instance.after_initialized, 0), [])
call instance.Notify('workspace/didChangeConfiguration', {'settings': settings})
endif
let s:instances[instance.id] = instance
return instance
endfunction
function! copilot#client#Cancel(request) abort
if type(a:request) == type({}) && has_key(a:request, 'Cancel')
call a:request.Cancel()
endif
endfunction
function! s:Callback(request, type, callback, timer) abort
call remove(a:request.waiting, a:timer)
if has_key(a:request, a:type)
call a:callback(a:request[a:type])
endif
endfunction
function! copilot#client#Result(request, callback) abort
if has_key(a:request, 'resolve')
call add(a:request.resolve, a:callback)
elseif has_key(a:request, 'result')
let a:request.waiting[timer_start(0, function('s:Callback', [a:request, 'result', a:callback]))] = 1
endif
endfunction
function! copilot#client#Error(request, callback) abort
if has_key(a:request, 'reject')
call add(a:request.reject, a:callback)
elseif has_key(a:request, 'error')
let a:request.waiting[timer_start(0, function('s:Callback', [a:request, 'error', a:callback]))] = 1
endif
endfunction
function! s:CloseBuffer(bufnr) abort
for instance in values(s:instances)
try
if has_key(instance, 'job') && has_key(instance.open_buffers, a:bufnr)
let buffer = remove(instance.open_buffers, a:bufnr)
call instance.Notify('textDocument/didClose', {'textDocument': {'uri': buffer.uri}})
endif
catch
call copilot#logger#Exception()
endtry
endfor
endfunction
augroup copilot_close
autocmd!
if !has('nvim')
autocmd BufUnload * call s:CloseBuffer(+expand('<abuf>'))
endif
augroup END

View File

@ -1,31 +0,0 @@
function! copilot#handlers#window_logMessage(params, ...) abort
call copilot#logger#Raw(get(a:params, 'type', 6), get(a:params, 'message', ''))
endfunction
function! copilot#handlers#window_showMessageRequest(params, ...) abort
let choice = inputlist([a:params.message . "\n\nRequest Actions:"] +
\ map(copy(get(a:params, 'actions', [])), { i, v -> (i + 1) . '. ' . v.title}))
return choice > 0 ? get(a:params.actions, choice - 1, v:null) : v:null
endfunction
function! s:BrowserCallback(into, code) abort
let a:into.code = a:code
endfunction
function! copilot#handlers#window_showDocument(params, ...) abort
echo a:params.uri
if empty(get(a:params, 'external'))
return {'success': v:false}
endif
let browser = copilot#Browser()
if empty(browser)
return {'success': v:false}
endif
let status = {}
call copilot#job#Stream(browser + [a:params.uri], v:null, v:null, function('s:BrowserCallback', [status]))
let time = reltime()
while empty(status) && reltimefloat(reltime(time)) < 1
sleep 10m
endwhile
return {'success': get(status, 'code') ? v:false : v:true}
endfunction

View File

@ -1,106 +0,0 @@
scriptencoding utf-8
function! copilot#job#Nop(...) abort
endfunction
function! s:Jobs(job_or_jobs) abort
let jobs = type(a:job_or_jobs) == v:t_list ? copy(a:job_or_jobs) : [a:job_or_jobs]
call map(jobs, { k, v -> type(v) == v:t_dict ? get(v, 'job', '') : v })
call filter(jobs, { k, v -> type(v) !=# type('') })
return jobs
endfunction
let s:job_stop = exists('*job_stop') ? 'job_stop' : 'jobstop'
function! copilot#job#Stop(job) abort
for job in s:Jobs(a:job)
call call(s:job_stop, [job])
endfor
return copilot#job#Wait(a:job)
endfunction
let s:sleep = has('patch-8.2.2366') ? 'sleep! 1m' : 'sleep 1m'
function! copilot#job#Wait(jobs) abort
let jobs = s:Jobs(a:jobs)
if exists('*jobwait')
call jobwait(jobs)
else
for job in jobs
while ch_status(job) !=# 'closed' || job_status(job) ==# 'run'
exe s:sleep
endwhile
endfor
endif
return a:jobs
endfunction
function! s:VimExitCallback(result, exit_cb, job, data) abort
let a:result.exit_status = a:data
if !has_key(a:result, 'closed')
return
endif
call remove(a:result, 'closed')
call a:exit_cb(a:result.exit_status)
endfunction
function! s:VimCloseCallback(result, exit_cb, job) abort
if !has_key(a:result, 'exit_status')
let a:result.closed = v:true
return
endif
call a:exit_cb(a:result.exit_status)
endfunction
function! s:NvimCallback(cb, job, data, type) dict abort
let self[a:type][0] .= remove(a:data, 0)
call extend(self[a:type], a:data)
while len(self[a:type]) > 1
call a:cb(substitute(remove(self[a:type], 0), "\r$", '', ''))
endwhile
endfunction
function! s:NvimExitCallback(out_cb, err_cb, exit_cb, job, data, type) dict abort
if len(self.stderr[0])
call a:err_cb(substitute(self.stderr[0], "\r$", '', ''))
endif
call a:exit_cb(a:data)
endfunction
function! copilot#job#Cwd() abort
let home = expand("~")
if !isdirectory(home) && isdirectory($VIM)
return $VIM
endif
return home
endfunction
function! copilot#job#Stream(argv, out_cb, err_cb, ...) abort
let exit_status = []
let ExitCb = function(a:0 && !empty(a:1) ? a:1 : { e -> add(exit_status, e) }, a:000[2:-1])
let OutCb = function(empty(a:out_cb) ? 'copilot#job#Nop' : a:out_cb, a:000[2:-1])
let ErrCb = function(empty(a:err_cb) ? 'copilot#job#Nop' : a:err_cb, a:000[2:-1])
let state = {'headers': {}, 'mode': 'headers', 'buffer': ''}
if exists('*job_start')
let result = {}
let job = job_start(a:argv, {
\ 'cwd': copilot#job#Cwd(),
\ 'out_mode': 'raw',
\ 'out_cb': { j, d -> OutCb(d) },
\ 'err_cb': { j, d -> ErrCb(d) },
\ 'exit_cb': function('s:VimExitCallback', [result, ExitCb]),
\ 'close_cb': function('s:VimCloseCallback', [result, ExitCb]),
\ })
else
let jopts = {
\ 'cwd': copilot#job#Cwd(),
\ 'stderr': [''],
\ 'on_stdout': { j, d, t -> OutCb(join(d, "\n")) },
\ 'on_stderr': function('s:NvimCallback', [ErrCb]),
\ 'on_exit': function('s:NvimExitCallback', [OutCb, ErrCb, ExitCb])}
let job = jobstart(a:argv, jopts)
endif
if a:0
return job
endif
call copilot#job#Wait(job)
return exit_status[0]
endfunction

View File

@ -1,105 +0,0 @@
if !exists('s:log_file')
let s:log_file = tempname() . '-copilot.log'
try
call writefile([], s:log_file)
catch
endtry
endif
let s:logs = []
function! copilot#logger#BufReadCmd() abort
try
setlocal modifiable noreadonly
silent call deletebufline('', 1, '$')
if !empty(s:logs)
call setline(1, s:logs)
endif
finally
setlocal buftype=nofile bufhidden=wipe nobuflisted nomodified nomodifiable
endtry
endfunction
let s:level_prefixes = ['', '[ERROR] ', '[WARN] ', '[INFO] ', '[DEBUG] ', '[DEBUG] ']
function! copilot#logger#Raw(level, message) abort
let lines = type(a:message) == v:t_list ? copy(a:message) : split(a:message, "\n", 1)
let lines[0] = strftime('[%Y-%m-%d %H:%M:%S] ') . get(s:level_prefixes, a:level, '[UNKNOWN] ') . get(lines, 0, '')
try
if !filewritable(s:log_file)
return
endif
call map(lines, { k, L -> type(L) == v:t_func ? call(L, []) : L })
call extend(s:logs, lines)
let overflow = len(s:logs) - get(g:, 'copilot_log_history', 10000)
if overflow > 0
call remove(s:logs, 0, overflow - 1)
endif
let bufnr = bufnr('copilot:///log')
if bufnr > 0 && bufloaded(bufnr)
call setbufvar(bufnr, '&modifiable', 1)
call setbufline(bufnr, 1, s:logs)
call setbufvar(bufnr, '&modifiable', 0)
for winid in win_findbuf(bufnr)
if has('nvim') && winid != win_getid()
call nvim_win_set_cursor(winid, [len(s:logs), 0])
endif
endfor
endif
catch
endtry
endfunction
function! copilot#logger#Debug(...) abort
if empty(get(g:, 'copilot_debug'))
return
endif
call copilot#logger#Raw(4, a:000)
endfunction
function! copilot#logger#Info(...) abort
call copilot#logger#Raw(3, a:000)
endfunction
function! copilot#logger#Warn(...) abort
call copilot#logger#Raw(2, a:000)
endfunction
function! copilot#logger#Error(...) abort
call copilot#logger#Raw(1, a:000)
endfunction
function! copilot#logger#Bare(...) abort
call copilot#logger#Raw(0, a:000)
endfunction
function! copilot#logger#Exception(...) abort
if !empty(v:exception) && v:exception !=# 'Vim:Interrupt'
call copilot#logger#Error('Exception: ' . v:exception . ' @ ' . v:throwpoint)
let client = copilot#RunningClient()
if !empty(client)
let [_, type, code, message; __] = matchlist(v:exception, '^\%(\(^[[:alnum:]_#]\+\)\%((\a\+)\)\=\%(\(:E-\=\d\+\)\)\=:\s*\)\=\(.*\)$')
let stacklines = []
for frame in split(substitute(v:throwpoint, ', \S\+ \(\d\+\)$', '[\1]', ''), '\.\@<!\.\.\.\@!')
let fn_line = matchlist(frame, '^\%(function \)\=\(\S\+\)\[\(\d\+\)\]$')
if !empty(fn_line)
call add(stacklines, {'function': substitute(fn_line[1], '^<SNR>\d\+_', '<SID>', ''), 'lineno': +fn_line[2]})
elseif frame =~# ' Autocmds for "\*"$'
call add(stacklines, {'function': frame})
elseif frame =~# ' Autocmds for ".*"$'
call add(stacklines, {'function': substitute(frame, ' for ".*"$', ' for "[redacted]"', '')})
else
call add(stacklines, {'function': '[redacted]'})
endif
endfor
return client.Request('telemetry/exception', {
\ 'transaction': a:0 ? a:1 : '',
\ 'platform': 'other',
\ 'exception_detail': [{
\ 'type': type . code,
\ 'value': message,
\ 'stacktrace': stacklines}]
\ }, v:null, function('copilot#util#Nop'))
endif
endif
endfunction

View File

@ -1,167 +0,0 @@
scriptencoding utf-8
if !exists('s:panel_id')
let s:panel_id = 0
endif
let s:separator = repeat('─', 72)
function! s:Render(state) abort
let bufnr = bufnr('^' . a:state.panel . '$')
let state = a:state
if !bufloaded(bufnr)
return
endif
let sorted = a:state.items
if !empty(get(a:state, 'error'))
let lines = ['Error: ' . a:state.error.message]
let sorted = []
elseif get(a:state, 'percentage') == 100
let lines = ['Synthesized ' . (len(sorted) == 1 ? '1 completion' : len(sorted) . ' completions')]
else
let lines = [substitute('Synthesizing ' . matchstr(get(a:state, 'message', ''), '\d\+\%(/\d\+\)\=') . ' completions', ' \+', ' ', 'g')]
endif
if len(sorted)
call add(lines, 'Press <CR> on a completion to accept')
endif
let leads = {}
for item in sorted
let insert = split(item.insertText, "\r\n\\=\\|\n", 1)
let insert[0] = strpart(a:state.line, 0, copilot#util#UTF16ToByteIdx(a:state.line, item.range.start.character)) . insert[0]
let lines += [s:separator] + insert
if !has_key(leads, string(item.range.start))
let match = insert[0 : a:state.position.line - item.range.start.line]
let match[-1] = strpart(match[-1], 0, copilot#util#UTF16ToByteIdx(match[-1], a:state.position.character))
call map(match, { k, v -> escape(v, '][^$.*\~') })
let leads[string(item.range.start)] = join(match, '\n')
endif
endfor
try
call setbufvar(bufnr, '&modifiable', 1)
call setbufvar(bufnr, '&readonly', 0)
call setbufline(bufnr, 1, lines)
finally
call setbufvar(bufnr, '&modifiable', 0)
endtry
call clearmatches()
call matchadd('CopilotSuggestion', '\C^' . s:separator . '\n\zs\%(' . join(sort(values(leads), { a, b -> len(b) - len(a) }), '\|') . '\)', 10, 4)
endfunction
function! s:PartialResult(state, value) abort
let items = type(a:value) == v:t_list ? a:value : a:value.items
call extend(a:state.items, items)
call s:Render(a:state)
endfunction
function! s:WorkDone(state, value) abort
if has_key(a:value, 'message')
let a:state.message = a:value.message
endif
if has_key(a:value, 'percentage')
let a:state.percentage = a:value.percentage
call s:Render(a:state)
endif
endfunction
function! copilot#panel#Accept(...) abort
let state = get(b:, 'copilot_panel', {})
if empty(state.items)
return ''
endif
if !has_key(state, 'bufnr') || !bufloaded(get(state, 'bufnr', -1))
return "echoerr 'Buffer was closed'"
endif
let at = a:0 ? a:1 : line('.')
let index = 0
for lnum in range(1, at)
if getline(lnum) ==# s:separator
let index += 1
endif
endfor
if index > 0 && index <= len(state.items)
let item = state.items[index - 1]
let lnum = item.range.start.line + 1
if getbufline(state.bufnr, lnum) !=# [state.line]
return 'echoerr "Buffer has changed since synthesizing completion"'
endif
let lines = split(item.insertText, "\n", 1)
let old_first = getbufline(state.bufnr, item.range.start.line + 1)[0]
let lines[0] = strpart(old_first, 0, copilot#util#UTF16ToByteIdx(old_first, item.range.start.character)) . lines[0]
let old_last = getbufline(state.bufnr, item.range.end.line + 1)[0]
let lines[-1] .= strpart(old_last, copilot#util#UTF16ToByteIdx(old_last, item.range.end.character))
call deletebufline(state.bufnr, item.range.start.line + 1, item.range.end.line + 1)
call appendbufline(state.bufnr, item.range.start.line, lines)
call copilot#Request('workspace/executeCommand', item.command)
bwipeout
let win = bufwinnr(state.bufnr)
if win > 0
exe win . 'wincmd w'
exe item.range.start.line + len(lines)
if state.was_insert
startinsert!
else
normal! $
endif
endif
endif
return ''
endfunction
function! s:Initialize(state) abort
let &l:filetype = 'copilot' . (empty(a:state.filetype) ? '' : '.' . a:state.filetype)
let &l:tabstop = a:state.tabstop
nmap <buffer><script> <CR> <Cmd>exe copilot#panel#Accept()<CR>
nmap <buffer><script> [[ <Cmd>call search('^─\{9,}\n.', 'bWe')<CR>
nmap <buffer><script> ]] <Cmd>call search('^─\{9,}\n.', 'We')<CR>
endfunction
function! s:BufReadCmd() abort
setlocal bufhidden=wipe buftype=nofile nobuflisted nomodifiable
let state = get(b:, 'copilot_panel')
if type(state) != v:t_dict
return
endif
call s:Initialize(state)
call s:Render(state)
return ''
endfunction
function! s:Result(state, result) abort
let a:state.percentage = 100
call s:PartialResult(a:state, a:result)
endfunction
function! s:Error(state, error) abort
let a:state.error = a:error
call s:Render(a:state)
endfunction
function! copilot#panel#Open(opts) abort
let s:panel_id += 1
let state = {'items': [], 'filetype': &filetype, 'was_insert': mode() =~# '^[iR]', 'bufnr': bufnr(''), 'tabstop': &tabstop}
let state.panel = 'copilot:///panel/' . s:panel_id
if state.was_insert
let state.position = copilot#util#AppendPosition()
stopinsert
else
let state.position = {'line': a:opts.line1 >= 1 ? a:opts.line1 - 1 : 0, 'character': copilot#util#UTF16Width(getline('.'))}
endif
let state.line = getline(state.position.line + 1)
let params = {
\ 'textDocument': {'uri': state.bufnr},
\ 'position': state.position,
\ 'partialResultToken': function('s:PartialResult', [state]),
\ 'workDoneToken': function('s:WorkDone', [state]),
\ }
let response = copilot#Request('textDocument/copilotPanelCompletion', params, function('s:Result', [state]), function('s:Error', [state]))
exe substitute(a:opts.mods, '\C\<tab\>', '-tab', 'g') 'keepalt split' state.panel
let b:copilot_panel = state
call s:Initialize(state)
call s:Render(state)
return ''
endfunction
augroup github_copilot_panel
autocmd!
autocmd BufReadCmd copilot:///panel/* exe s:BufReadCmd()
augroup END

View File

@ -1,61 +0,0 @@
let s:deferred = []
function! copilot#util#Nop(...) abort
return v:null
endfunction
function! copilot#util#Defer(fn, ...) abort
call add(s:deferred, function(a:fn, a:000))
return timer_start(0, function('s:RunDeferred'))
endfunction
function! s:RunDeferred(...) abort
if empty(s:deferred)
return
endif
let Fn = remove(s:deferred, 0)
call timer_start(0, function('s:RunDeferred'))
call call(Fn, [])
endfunction
function! copilot#util#UTF16Width(str) abort
return strchars(substitute(a:str, "\\%#=2[^\u0001-\uffff]", " ", 'g'))
endfunction
if exists('*utf16idx')
function! copilot#util#UTF16ToByteIdx(str, utf16_idx) abort
return byteidx(a:str, a:utf16_idx, 1)
endfunction
elseif has('nvim')
function! copilot#util#UTF16ToByteIdx(str, utf16_idx) abort
try
return v:lua.vim.str_byteindex(a:str, a:utf16_idx, 1)
catch /^Vim(return):E5108:/
return -1
endtry
endfunction
else
function! copilot#util#UTF16ToByteIdx(str, utf16_idx) abort
if copilot#util#UTF16Width(a:str) < a:utf16_idx
return -1
endif
let end_offset = len(a:str)
while copilot#util#UTF16Width(strpart(a:str, 0, end_offset)) > a:utf16_idx && end_offset > 0
let end_offset -= 1
endwhile
return end_offset
endfunction
endif
function! copilot#util#AppendPosition() abort
let line = getline('.')
let col_byte = col('.') - (mode() =~# '^[iR]' || empty(line))
let col_utf16 = copilot#util#UTF16Width(strpart(line, 0, col_byte))
return {'line': line('.') - 1, 'character': col_utf16}
endfunction

View File

@ -1,3 +0,0 @@
function! copilot#version#String() abort
return '1.41.0'
endfunction

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,199 +0,0 @@
*copilot.txt* GitHub Copilot - Your AI pair programmer
GETTING STARTED *copilot*
Invoke `:Copilot setup` to authenticate and enable GitHub Copilot.
Suggestions are displayed inline and can be accepted by pressing <Tab>. If
inline suggestions do not appear to be working, invoke `:Copilot status` to
verify Copilot is enabled and not experiencing any issues.
COMMANDS *:Copilot*
*:Copilot_disable*
:Copilot disable Globally disable GitHub Copilot inline suggestions.
*:Copilot_enable*
:Copilot enable Re-enable GitHub Copilot after :Copilot disable.
*:Copilot_setup*
:Copilot setup Authenticate and enable GitHub Copilot.
*:Copilot_signout*
:Copilot signout Sign out of GitHub Copilot.
*:Copilot_status*
:Copilot status Check if GitHub Copilot is operational for the current
buffer and report on any issues.
*:Copilot_panel*
:Copilot panel Open a window with up to 10 completions for the
current buffer. Use <CR> to accept a completion.
Maps are also provided for [[ and ]] to jump from
completion to completion. This is the default command
if :Copilot is called without an argument.
*:Copilot_version*
:Copilot version Show version information.
*:Copilot_feedback*
:Copilot feedback Open the website for providing GitHub Copilot
feedback. Be sure to include |:Copilot_version|
output when reporting a bug.
OPTIONS *copilot-options*
*g:copilot_filetypes*
g:copilot_filetypes A dictionary mapping file types to their enabled
status. Most file types are enabled by default, so
generally this is used for opting out.
>
let g:copilot_filetypes = {
\ 'xml': v:false,
\ }
<
Disabling all file types can be done by setting the
special key "*". File types can then be turned back
on individually.
>
let g:copilot_filetypes = {
\ '*': v:false,
\ 'python': v:true,
\ }
<
*b:copilot_enabled*
b:copilot_enabled Set to v:false to disable GitHub Copilot for the
current buffer. Or set to v:true to force enabling
it, overriding g:copilot_filetypes.
*g:copilot_node_command*
g:copilot_node_command Tell Copilot what `node` binary to use with
g:copilot_node_command. This is useful if the `node`
in your PATH is an unsupported version.
>
let g:copilot_node_command =
\ "~/.nodenv/versions/18.18.0/bin/node"
<
*g:copilot_proxy*
g:copilot_proxy Tell Copilot what proxy server to use.
>
let g:copilot_proxy = 'http://localhost:3128'
<
If this is not set, Copilot will use the value of
environment variables like $HTTPS_PROXY.
*g:copilot_proxy_strict_ssl*
g:copilot_proxy_strict_ssl
Corporate proxies sometimes use a man-in-the-middle
SSL certificate which is incompatible with GitHub
Copilot. To work around this, SSL certificate
verification can be disabled:
>
let g:copilot_proxy_strict_ssl = v:false
<
You can also tell Node.js to disable SSL verification
by setting the $NODE_TLS_REJECT_UNAUTHORIZED
environment variable to "0".
*g:copilot_workspace_folders*
g:copilot_workspace_folders
A list of "workspace folders" or project roots that
Copilot may use to improve to improve the quality of
suggestions.
>
let g:copilot_workspace_folders =
\ ["~/Projects/myproject"]
<
You can also set b:workspace_folder for an individual
buffer and newly seen values will be added
automatically.
MAPS *copilot-maps*
*copilot-i_<Tab>*
Copilot.vim uses <Tab> to accept the current suggestion. If you have an
existing <Tab> map, that will be used as the fallback when no suggestion is
displayed.
*copilot#Accept()*
If you'd rather use a key that isn't <Tab>, define an <expr> map that calls
copilot#Accept(). Here's an example with CTRL-J:
>
imap <silent><script><expr> <C-J> copilot#Accept("\<CR>")
let g:copilot_no_tab_map = v:true
<
Lua version:
>
vim.keymap.set('i', '<C-J>', 'copilot#Accept("\\<CR>")', {
expr = true,
replace_keycodes = false
})
vim.g.copilot_no_tab_map = true
<
The argument to copilot#Accept() is the fallback for when no suggestion is
displayed. In this example, a regular carriage return is used. If no
fallback is desired, use an argument of "" (an empty string).
Other Maps ~
Note that M- (a.k.a. meta or alt) maps are highly dependent on your terminal
to function correctly and may be unsupported with your setup. As an
alternative, you can create your own versions that invoke the <Plug> maps
instead. Here's an example that maps CTRL-L to accept one word of the
current suggestion:
>
imap <C-L> <Plug>(copilot-accept-word)
<
Lua version:
>
vim.keymap.set('i', '<C-L>', '<Plug>(copilot-accept-word)')
<
*copilot-i_CTRL-]*
<C-]> Dismiss the current suggestion.
<Plug>(copilot-dismiss)
*copilot-i_ALT-]*
<M-]> Cycle to the next suggestion, if one is available.
<Plug>(copilot-next)
*copilot-i_ALT-[*
<M-[> Cycle to the previous suggestion.
<Plug>(copilot-previous)
*copilot-i_ALT-\*
<M-\> Explicitly request a suggestion, even if Copilot
<Plug>(copilot-suggest) is disabled.
*copilot-i_ALT-Right*
<M-Right> Accept the next word of the current suggestion.
<Plug>(copilot-accept-word)
*copilot-i_ALT-CTRL-Right*
<M-C-Right> Accept the next line of the current suggestion.
<Plug>(copilot-accept-line)
SYNTAX HIGHLIGHTING *copilot-highlighting*
Inline suggestions are highlighted using the CopilotSuggestion group,
defaulting to a medium gray. The best place to override this is with
a |ColorScheme| autocommand:
>
autocmd ColorScheme solarized
\ highlight CopilotSuggestion guifg=#555555 ctermfg=8
<
Lua version:
>
vim.api.nvim_create_autocmd('ColorScheme', {
pattern = 'solarized',
-- group = ...,
callback = function()
vim.api.nvim_set_hl(0, 'CopilotSuggestion', {
fg = '#555555',
ctermfg = 8,
force = true
})
end
})
<
vim:tw=78:et:ft=help:norl:

View File

@ -1,89 +0,0 @@
local copilot = {}
local showDocument = function(err, result, ctx, _)
local fallback = vim.lsp.handlers['window/showDocument']
if not fallback or (result.external and vim.g.copilot_browser) then
return vim.fn['copilot#handlers#window_showDocument'](result)
else
return fallback(err, result, ctx, _)
end
end
copilot.lsp_start_client = function(cmd, handler_names, opts, settings)
local handlers = {['window/showDocument'] = showDocument}
local id
for _, name in ipairs(handler_names) do
handlers[name] = function(err, result, ctx, _)
if result then
local retval = vim.call('copilot#client#LspHandle', id, { method = name, params = result })
if type(retval) == 'table' then
return retval.result, retval.error
elseif vim.lsp.handlers[name] then
return vim.lsp.handlers[name](err, result, ctx, _)
end
end
end
end
local workspace_folders = opts.workspaceFolders
if #workspace_folders == 0 then
workspace_folders = nil
end
id = vim.lsp.start_client({
cmd = cmd,
cmd_cwd = vim.call('copilot#job#Cwd'),
name = 'GitHub Copilot',
init_options = opts.initializationOptions,
workspace_folders = workspace_folders,
settings = settings,
handlers = handlers,
on_init = function(client, initialize_result)
vim.call('copilot#client#LspInit', client.id, initialize_result)
if vim.fn.has('nvim-0.8') == 0 then
client.notify('workspace/didChangeConfiguration', { settings = settings })
end
end,
on_exit = function(code, signal, client_id)
vim.schedule(function()
vim.call('copilot#client#LspExit', client_id, code, signal)
end)
end,
})
return id
end
copilot.lsp_request = function(client_id, method, params, bufnr)
local client = vim.lsp.get_client_by_id(client_id)
if not client then
return
end
if bufnr == vim.NIL then
bufnr = nil
end
local _, id
_, id = client.request(method, params, function(err, result)
vim.call('copilot#client#LspResponse', client_id, { id = id, error = err, result = result })
end, bufnr)
return id
end
copilot.rpc_request = function(client_id, method, params)
local client = vim.lsp.get_client_by_id(client_id)
if not client then
return
end
local _, id
_, id = client.rpc.request(method, params, function(err, result)
vim.call('copilot#client#LspResponse', client_id, { id = id, error = err, result = result })
end)
return id
end
copilot.rpc_notify = function(client_id, method, params)
local client = vim.lsp.get_client_by_id(client_id)
if not client then
return
end
return client.rpc.notify(method, params)
end
return copilot

View File

@ -1,114 +0,0 @@
if exists('g:loaded_copilot')
finish
endif
let g:loaded_copilot = 1
scriptencoding utf-8
command! -bang -nargs=? -range=-1 -complete=customlist,copilot#CommandComplete Copilot exe copilot#Command(<line1>, <count>, +"<range>", <bang>0, "<mods>", <q-args>)
if v:version < 800 || !exists('##InsertLeavePre')
finish
endif
function! s:ColorScheme() abort
if &t_Co == 256
hi def CopilotSuggestion guifg=#808080 ctermfg=244
else
hi def CopilotSuggestion guifg=#808080 ctermfg=12
endif
hi def link CopilotAnnotation MoreMsg
endfunction
function! s:MapTab() abort
if get(g:, 'copilot_no_tab_map') || get(g:, 'copilot_no_maps')
return
endif
let tab_map = maparg('<Tab>', 'i', 0, 1)
if !has_key(tab_map, 'rhs')
imap <script><silent><nowait><expr> <Tab> empty(get(g:, 'copilot_no_tab_map')) ? copilot#Accept() : "\t"
elseif tab_map.rhs !~# 'copilot'
if tab_map.expr
let tab_fallback = '{ -> ' . tab_map.rhs . ' }'
else
let tab_fallback = substitute(json_encode(tab_map.rhs), '<', '\\<', 'g')
endif
let tab_fallback = substitute(tab_fallback, '<SID>', '<SNR>' . get(tab_map, 'sid') . '_', 'g')
if get(tab_map, 'noremap') || get(tab_map, 'script') || mapcheck('<Left>', 'i') || mapcheck('<Del>', 'i')
exe 'imap <script><silent><nowait><expr> <Tab> copilot#Accept(' . tab_fallback . ')'
else
exe 'imap <silent><nowait><expr> <Tab> copilot#Accept(' . tab_fallback . ')'
endif
endif
endfunction
function! s:Event(type) abort
try
call call('copilot#On' . a:type, [])
catch
call copilot#logger#Exception('autocmd.' . a:type)
endtry
endfunction
augroup github_copilot
autocmd!
autocmd FileType * call s:Event('FileType')
autocmd InsertLeavePre * call s:Event('InsertLeavePre')
autocmd BufLeave * if mode() =~# '^[iR]'|call s:Event('InsertLeavePre')|endif
autocmd InsertEnter * call s:Event('InsertEnter')
autocmd BufEnter * if mode() =~# '^[iR]'|call s:Event('InsertEnter')|endif
autocmd BufEnter * call s:Event('BufEnter')
autocmd CursorMovedI * call s:Event('CursorMovedI')
autocmd CompleteChanged * call s:Event('CompleteChanged')
autocmd ColorScheme,VimEnter * call s:ColorScheme()
autocmd VimEnter * call s:MapTab() | call copilot#Init()
autocmd BufUnload * call s:Event('BufUnload')
autocmd VimLeavePre * call s:Event('VimLeavePre')
autocmd BufReadCmd copilot://* setlocal buftype=nofile bufhidden=wipe nobuflisted nomodifiable
autocmd BufReadCmd copilot:///log call copilot#logger#BufReadCmd() | setfiletype copilotlog
augroup END
call s:ColorScheme()
call s:MapTab()
if !get(g:, 'copilot_no_maps')
imap <Plug>(copilot-dismiss) <Cmd>call copilot#Dismiss()<CR>
if empty(mapcheck('<C-]>', 'i'))
imap <silent><script><nowait><expr> <C-]> copilot#Dismiss() . "\<C-]>"
endif
imap <Plug>(copilot-next) <Cmd>call copilot#Next()<CR>
imap <Plug>(copilot-previous) <Cmd>call copilot#Previous()<CR>
imap <Plug>(copilot-suggest) <Cmd>call copilot#Suggest()<CR>
imap <script><silent><nowait><expr> <Plug>(copilot-accept-word) copilot#AcceptWord()
imap <script><silent><nowait><expr> <Plug>(copilot-accept-line) copilot#AcceptLine()
try
if !has('nvim') && &encoding ==# 'utf-8'
" avoid 8-bit meta collision with UTF-8 characters
let s:restore_encoding = 1
silent noautocmd set encoding=cp949
endif
if empty(mapcheck('<M-]>', 'i'))
imap <M-]> <Plug>(copilot-next)
endif
if empty(mapcheck('<M-[>', 'i'))
imap <M-[> <Plug>(copilot-previous)
endif
if empty(mapcheck('<M-Bslash>', 'i'))
imap <M-Bslash> <Plug>(copilot-suggest)
endif
if empty(mapcheck('<M-Right>', 'i'))
imap <M-Right> <Plug>(copilot-accept-word)
endif
if empty(mapcheck('<M-C-Right>', 'i'))
imap <M-C-Right> <Plug>(copilot-accept-line)
endif
finally
if exists('s:restore_encoding')
silent noautocmd set encoding=utf-8
endif
endtry
endif
let s:dir = expand('<sfile>:h:h')
if getftime(s:dir . '/doc/copilot.txt') > getftime(s:dir . '/doc/tags')
silent! execute 'helptags' fnameescape(s:dir . '/doc')
endif

View File

@ -1,19 +0,0 @@
scriptencoding utf-8
if exists("b:current_syntax")
finish
endif
let s:subtype = matchstr(&l:filetype, '\<copilot\.\zs[[:alnum:]_-]\+')
if !empty(s:subtype) && s:subtype !=# 'copilot'
silent! exe 'syn include @copilotLanguageTop syntax/' . s:subtype . '.vim'
unlet! b:current_syntax
endif
syn region copilotHeader start="\%^" end="^─\@="
syn region copilotPanelItem matchgroup=copilotSeparator start="^─\{9,}$" end="\%(^─\{9,\}$\)\@=\|\%$" keepend contains=@copilotLanguageTop
hi def link copilotHeader PreProc
hi def link copilotSeparator Comment
let b:current_syntax = "copilot"

View File

@ -1,25 +0,0 @@
scriptencoding utf-8
if exists("b:current_syntax")
finish
endif
let s:subtype = matchstr(&l:filetype, '\<copilot\.\zs[[:alnum:]_-]\+')
if !empty(s:subtype) && s:subtype !=# 'copilot'
exe 'syn include @copilotLanguageTop syntax/' . s:subtype . '.vim'
unlet! b:current_syntax
endif
syn match copilotlogError '\[ERROR\]'
syn match copilotlogWarn '\[WARN\]'
syn match copilotlogInfo '\[INFO\]'
syn match copilotlogDebug '\[DEBUG\]'
syn match copilotlogTime '^\[\d\d\d\d-\d\d-\d\d.\d\d:\d\d:\d\d\]' nextgroup=copilotlogError,copilotlogWarn,copilotLogInfo,copilotLogDebug skipwhite
hi def link copilotlogTime NonText
hi def link copilotlogError ErrorMsg
hi def link copilotlogWarn WarningMsg
hi def link copilotlogInfo MoreMsg
hi def link copilotlogDebug ModeMsg
let b:current_syntax = "copilotlog"

View File

@ -0,0 +1,39 @@
#!/bin/sh
gitcmd() {
rm -rf "$1"
git clone --depth 1 "https://github.com/$2" "$1"
rm -rf "$1/.git*"
}
gitcmd vim-copilot github/copilot.vim
gitcmd vim-copilot-chat DanBradbury/copilot-chat.vim
gitcmd vim-ale dense-analysis/ale
gitcmd vim-fugitive tpope/vim-fugitive
gitcmd vim-kotlin udalov/kotlin-vim
gitcmd vim-colorschemes flazz/vim-colorschemes
gitcmd vim-awesome-colorschemes rafi/awesome-vim-colorschemes
gitcmd vim-lucius jonathanfilip/vim-lucius
gitcmd vim-clap liuchengxu/vim-clap
gitcmd vim-bufferline ap/vim-buftabline
gitcmd vim-conflict-marker rhysd/conflict-marker.vim
gitcmd vim-diffchar rickhowe/diffchar.vim
gitcmd vim-fileline aur-archive/vim-fileline
gitcmd vim-gitgutter airblade/vim-gitgutter
gitcmd vim-gnupg jamessan/vim-gnupg
gitcmd vim-hugo phelipetls/vim-hugo
gitcmd vim-hugo-helper robertbasic/vim-hugo-helper
gitcmd vim-improve-diff lambdalisue/vim-improve-diff
gitcmd vim-ledger ledger/vim-ledger
gitcmd vim-ledger-x rcaputo/vim-ledger_x
gitcmd vim-markdown gabrielelana/vim-markdown
gitcmd vim-snipmate vim-scripts/snipMate
gitcmd vim-spotdiff rickhowe/spotdiff.vim
gitcmd vim-sxhkdrc baskerville/vim-sxhkdrc
gitcmd vim-tabular godlygeek/tabular
gitcmd vim-tagbar preservim/tagbar
gitcmd vim-tagbar-markdown taoso/tagbar-markdown
gitcmd vim-traces markonm/traces.vim
gitcmd vim-undotree mbbill/undotree
gitcmd vim-undoquit AndrewRadev/undoquit.vim

@ -0,0 +1 @@
Subproject commit 6d9962946172fda4f25f9f5773b601aa4b2bedaf

@ -0,0 +1 @@
Subproject commit ae5e02298c8de6a5aa98fe4d29a21874cfcc3619

View File

@ -0,0 +1,5 @@
/plugin/buftabline.vim export-subst
/.gitignore export-ignore
/.gitattributes export-ignore
/README.md export-ignore
/LICENSE export-ignore

View File

@ -0,0 +1 @@
/doc/tags

View File

@ -1,21 +1,21 @@
The MIT License (MIT)
Copyright (C) 2013 Bailey Ling
Copyright (c) 2015 Aristotle Pagaltzis
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@ -1,38 +1,150 @@
# vim-bufferline
<h1 align="center">Buftabline</h1>
Super simple vim plugin to show the list of buffers in the command bar.
<div align="center">
A well-integrated, low-configuration buffer list that lives in the tabline<br>
<img src="https://raw.githubusercontent.com/ap/vim-buftabline/fe615be277cfba1ecadc52d61fa173d034817d67/screenshot.png" width="787">
</div>
# screenshots
#### in the statusline
Buffer basics
-------------
![img](img/bufferline-status.png)
If you dont know anything about buffers, the minimum you have to know is that
a buffer in Vim essentially means a file, and if you set `hidden`, Vim can keep
files open without necessarily displaying them on screen. You can then use the
`:bnext` and `:bprev` commands to change which buffer is being displayed in the
current window, and `:ls` to look at the list of buffers.
#### or the command bar
If this is all news to you, you should probably add this to your configuration:
![img](img/bufferline-command.png)
set hidden
nnoremap <C-N> :bnext<CR>
nnoremap <C-P> :bprev<CR>
# configuration
For the full story, read [`:help windows.txt`][windows].
`:help bufferline`
# installation
Why this and not Vim tabs?
--------------------------
* [pathogen](https://github.com/tpope/vim-pathogen)
* `git clone https://github.com/bling/vim-bufferline ~/.vim/bundle/vim-bufferline`
* [neobundle](https://github.com/Shougo/neobundle.vim)
* `NeoBundle 'bling/vim-bufferline'`
* [vundle](https://github.com/gmarik/vundle)
* `Plugin 'bling/vim-bufferline'`
* [vam](https://github.com/MarcWeber/vim-addon-manager)
* `call vam#ActivateAddons([ 'vim-bufferline' ])`
* [vim-plug](https://github.com/junegunn/vim-plug)
* `Plug 'bling/vim-bufferline'`
Vim tabs are not very useful except in very particular circumstances.
To understand why this is, you have to understand that the display in Vim
has 3 layers of indirection:
# credits
1. Buffers correspond to files.
This was inspired by the [buftabs](http://www.vim.org/scripts/script.php?script_id=1664) script.
Not necessarily to files on disk, but in potentiality; i.e. a buffer becomes
the content of a file when you do `:w`
# license
2. Windows correspond to rectangular areas on the screen, each associated with
some buffer.
MIT License. Copyright (c) 2013 Bailey Ling.
Any window can be associated with any buffer, and any buffer with any
window. You can change which buffer is shown in a window at any time, and
you can split and resize windows to create any on-screen arrangement you
want. So you could have 3 windows showing the same buffer, e.g. to work on
several areas of a file at once.
Note that while windows are always associated with a buffer - i.e. an area
of the screen always shows some file , a buffer need not be associated with
any window i.e. a file may be loaded without being shown on screen.
3. Tabs correspond to entire screens, i.e. to an arrangement of windows.
In other windowing environments this concept is often called a viewport,
or a virtual desktop. Each window belongs to one particular tab. But note
that a buffer can be shown in any window (or no window at all), so any file
can appear any number of times in any number of tabs. Tabs and files do not
have anything to do with each other.
Now it is possible to open just one full-screen window in each tab, and in each
window edit a different buffer, in effect associating tabs with files. But this
only works if you stay away from any other window or buffer management, i.e. if
you never create splits and never touch the buffer list. Even then there are
parts of Vim (such as the help function and the netrw Explorer) that expect to
be working with windows, not tabs, and so can easily inadvertently shatter the
illusion.
So if you consider what Vim tabs actually are, i.e. viewports, and you use Vim
in a typical way, there are only very limited circumstances in which you will
ever need such functionality, if at all.
What the typical user wants when they think of tabs is simply the ability to
open multiple files and then flip between them, which in Vim means they want
buffers not tabs.
Buftabline vs. X
----------------
As of Nov 15, 2014, here is how Buftabline compares with some other plugins
of which I am aware that they offer related functionality, roughly in order
of their age.
* [MiniBufExpl](http://www.vim.org/scripts/script.php?script_id=159)
Obviously no rundown can be complete without the veteran of buffer list
plugins, Mini Buffer Explorer. There are two major differences:
1. Buftabline uses the tabline while MiniBufExpl renders to a special buffer
in a split. The tabline is newer than MiniBufExpl, and unlike a buffer, it
is guaranteed to stick to the top of the screen within Vim, unaffected by
any splits.
2. Because Buftabline uses the tabline, it cannot offer any functionality
relating to the management of buffers: all it does is show you the list.
OTOH, this also makes Buftabline very lightweight from a user perspective:
Vim has plenty of facilities for managing buffers and with Buftabline you
will be using those same as without it. Buftabline need not aspire to be
your sole interface to Vims buffers.
* [buftabs](http://www.vim.org/scripts/script.php?script_id=1664)
Buftabs is what you get when you try to implement Buftabline on a Vim that
does not yet have the `tabline`. It can only render your tabs near or at the
bottom of the Vim screen, and you have the choice between trading in your
`statusline` for the list, or having it flicker “behind” the command line. If
MiniBufExpl is too heavy for you, buftabs is the best you can do in absence
of the `tabline`.
I used this for a long time.
* [bufferline](https://github.com/bling/vim-bufferline)
Essentially a newer rendition of buftabs.
* [Airline](http://www.vim.org/scripts/script.php?script_id=4661)
If you already use Airline, you do not need Buftabline: the functionality
comes built in see `:help airline-tabline`.
If you do not already use Airline, you may not want to: it is far heavier
than Buftabline, to the point of dragging down performance. C.f.
[Pretty statuslines vs cursor speed][badperf]
* [BufLine](http://www.vim.org/scripts/script.php?script_id=4940)
This is very similar in scope and strategy to Buftabline, but not nearly as
simple. The code is more than 5 times as long. There are lots of options and
mappings so despite its limited scope compared to something like MiniBufExpl
or Airline, it feels like a Big Plugin one that requires a large up-front
commitment. And subjective though this is, I will call its default colors
ugly (while the ones in Buftabline depend entirely on your colorscheme), nor
does it make any attempt to harmonise with the user colorscheme.
* [WinTabs](https://github.com/zefei/vim-wintabs)
This is another Big Plugin, though much, much better. It supports Vim tabs
in addition to buffers, and tries to implement a functionality that is not
native to Vim tabs: scoping buffers to certain tabs. This means it also
needs to hook into sessions in order to support them, which it does. All in
all, if you want to use Vim tabs (i.e. viewports), this is probably the best
plugin for you Buftabline will be too simplistic for your preferences.
<!-- vim: et fenc=utf8
-->
[windows]: http://vimdoc.sourceforge.net/htmldoc/windows.html
[badperf]: https://www.reddit.com/r/vim/comments/2lw1fd/pretty_statuslines_vs_cursor_speed/

View File

@ -1,130 +0,0 @@
" keep track of vimrc setting
let s:updatetime = &updatetime
" keep track of scrollinf window start
let s:window_start = 0
function! s:generate_names()
let names = []
let i = 1
let last_buffer = bufnr('$')
let current_buffer = bufnr('%')
while i <= last_buffer
if bufexists(i) && buflisted(i)
let modified = ' '
if getbufvar(i, '&mod')
let modified = g:bufferline_modified
endif
let fname = fnamemodify(bufname(i), g:bufferline_fname_mod)
if g:bufferline_pathshorten != 0
let fname = pathshorten(fname)
endif
let fname = substitute(fname, "%", "%%", "g")
let skip = 0
for ex in g:bufferline_excludes
if match(fname, ex) > -1
let skip = 1
break
endif
endfor
if !skip
let name = ''
if g:bufferline_show_bufnr != 0 && g:bufferline_status_info.count >= g:bufferline_show_bufnr
let name = i . ':'
endif
let name .= fname . modified
if current_buffer == i
let name = g:bufferline_active_buffer_left . name . g:bufferline_active_buffer_right
let g:bufferline_status_info.current = name
else
let name = g:bufferline_separator . name . g:bufferline_separator
endif
call add(names, [i, name])
endif
endif
let i += 1
endwhile
if len(names) > 1
if g:bufferline_rotate == 1
call bufferline#algos#fixed_position#modify(names)
endif
endif
return names
endfunction
function! bufferline#get_echo_string()
" check for special cases like help files
let current = bufnr('%')
if !bufexists(current) || !buflisted(current)
return bufname('%')
endif
let names = s:generate_names()
let line = ''
for val in names
let line .= val[1]
endfor
let index = match(line, '\V'.g:bufferline_status_info.current)
let g:bufferline_status_info.count = len(names)
let g:bufferline_status_info.before = strpart(line, 0, index)
let g:bufferline_status_info.after = strpart(line, index + len(g:bufferline_status_info.current))
return line
endfunction
function! s:echo()
if &filetype ==# 'unite'
return
endif
let line = bufferline#get_echo_string()
" 12 is magical and is the threshold for when it doesn't wrap text anymore
let width = &columns - 12
if g:bufferline_rotate == 2
let current_buffer_start = stridx(line, g:bufferline_active_buffer_left)
let current_buffer_end = stridx(line, g:bufferline_active_buffer_right)
if current_buffer_start < s:window_start
let s:window_start = current_buffer_start
endif
if current_buffer_end > (s:window_start + width)
let s:window_start = current_buffer_end - width + 1
endif
let line = strpart(line, s:window_start, width)
else
let line = strpart(line, 0, width)
endif
echo line
if &updatetime != s:updatetime
let &updatetime = s:updatetime
endif
endfunction
function! s:cursorhold_callback()
call s:echo()
autocmd! bufferline CursorHold
endfunction
function! s:refresh(updatetime)
let &updatetime = a:updatetime
autocmd bufferline CursorHold * call s:cursorhold_callback()
endfunction
function! bufferline#init_echo()
augroup bufferline
au!
" events which output a message which should be immediately overwritten
autocmd BufWinEnter,WinEnter,InsertLeave,VimResized * call s:refresh(1)
augroup END
autocmd CursorHold * call s:echo()
endfunction

View File

@ -1,9 +0,0 @@
" pins the active buffer to a specific index in the list
function! bufferline#algos#fixed_position#modify(names)
let current = bufnr('%')
while a:names[g:bufferline_fixed_index][0] != current
let first = remove(a:names, 0)
call add(a:names, first)
endwhile
endfunction

View File

@ -1,119 +0,0 @@
*bufferline.txt* Simple plugin for generating buffer list names
==============================================================================
INTRODUCTION *bufferline*
vim-bufferline is a simple plugin that helps you keep track of all your open
buffers. It also integrates nicely with vim-airline.
==============================================================================
CONFIGURATION *bufferline-configuration*
There are a couple configuration values available (shown with their default
values):
* denotes whether bufferline should automatically echo to the command bar
>
let g:bufferline_echo = 1
<
* the separator used on the left side of a buffer
>
let g:bufferline_active_buffer_left = '['
<
* the separator used on the right side of a buffer
>
let g:bufferline_active_buffer_right = ']'
<
* the symbol to denote that a buffer is modified
>
let g:bufferline_modified = '+'
<
* denotes whether buffer numbers should be displayed
>
let g:bufferline_show_bufnr = 1
<
* denotes whether the bufferline should have rotation applied
>
" default, no rotate, no scrolling
let g:bufferline_rotate = 0
" scrolling with fixed current buffer position
let g:bufferline_rotate = 1
" scrolling without fixed current buffer position
let g:bufferline_rotate = 2
<
* only valid when `g:bufferline_rotate` is set to 1:
>
let g:bufferline_fixed_index = 0 "always first
let g:bufferline_fixed_index = 1 "always second (default)
let g:bufferline_fixed_index = -1 "always last
<
* denotes how to display the filename of a buffer (see |filename-modifiers|
for more details)
>
let g:bufferline_fname_mod = ':t'
<
* denotes the highlight group for inactive buffers when used in the
|statusline|
>
let g:bufferline_inactive_highlight = 'StatusLineNC'
<
* denotes the highlight group for the active buffer when used in the
|statusline|
>
let g:bufferline_active_highlight = 'StatusLine'
<
* denotes whether the active highlight should be used when there is only one
buffer.
>
let g:bufferline_solo_highlight = 0
<
* denotes any exclude patterns.
>
let g:bufferline_excludes = [] "see source for defaults
<
* denotes whether paths in buffer names should be |pathshorten()|-ed.
>
let g:bufferline_pathshorten = 0
<
==============================================================================
STATUSLINE INTEGRATION *bufferline-statusline*
>
let g:bufferline_echo = 0
autocmd VimEnter *
\ let &statusline='%{bufferline#refresh_status()}'
\ .bufferline#get_status_string()
<
The function refresh_status() returns an empty string and only exists to
populate some global variables. Since it is inside an %{} block, the
variables will get updated whenever the statusline needs to be drawn.
get_status_string() creates a string which references these variables.
==============================================================================
CONTRIBUTIONS *bufferline-contributions*
Contributions and pull requests are welcome.
==============================================================================
LICENSE *bufferline-license*
MIT License. Copyright © 2013 Bailey Ling.
vim:tw=78:ts=8:ft=help:norl:

View File

@ -0,0 +1,143 @@
*buftabline.txt* Use the tabline to render buffer tabs
BUFTABLINE by Aristotle Pagaltzis
==============================================================================
0. Contents *buftabline*
1. Intro ....................................... |buftabline-intro|
2. Configuration settings ...................... |buftabline-config|
3. Mappings .................................... |buftabline-mappings|
4. Tab coloring and colorscheme support ........ |buftabline-colors|
5. Source ...................................... |buftabline-source|
==============================================================================
1. Intro *buftabline-intro*
This plugin takes over the 'tabline' and renders the buffer list in it instead
of a tab list. It is designed with the ideal that it should Just Work: drop it
into your setup and you're done. There is only minimal configurable behavior.
==============================================================================
2. Configuration settings *buftabline-config*
Changes to any of the plugin's configuration settings at runtime will not take
effect immediately unless you force an update: >
:call buftabline#update(0)
<
*g:buftabline_show* number (default 2)
The value of this option specifies when the line with buffer labels will
be displayed:
0: never
1: only if there are at least two buffers
2: always
This is analogous to the 'showtabline' setting, only for the |buftabline|.
*g:buftabline_numbers* number (default 0)
The value of this option specifies how to number the buffer labels:
0: no numbering
1: buffer number
2: ordinal number
The buffer number corresponds to Vim's internal buffer number as shown by
the |:ls| command, whereas the ordinal number is a simple sequential count
from left to right.
*g:buftabline_indicators* boolean (default off)
When on, the buffer's state is indicated in the buffer label. Currently
the only state indicated is whether the buffer is 'modified'.
*g:buftabline_separators* boolean (default off)
When on, a vertical line is drawn inbetween tabs. (This is not strictly
correct. The effect is actually achieved by replacing the space on the
left side of each tab with U+23B8 LEFT VERTICAL BOX LINE. Therefore the
separator will be highlighted the same way as the tab to its left.)
*g:buftabline_plug_max* number (default 10)
The number of |buftabline-mappings| that will be created by the plugin.
You can request more of them or turn off the functionality entirely by
setting this to 0. Note it only has an effect before loading the plugin,
not if you change it later.
==============================================================================
3. Mappings *buftabline-mappings*
To switch buffers by their ordinal number (|g:buftabline_numbers| = 2) you can
map keys to the |<Plug>| mappings provided by this plugin: >
nmap <leader>1 <Plug>BufTabLine.Go(1)
nmap <leader>2 <Plug>BufTabLine.Go(2)
nmap <leader>3 <Plug>BufTabLine.Go(3)
nmap <leader>4 <Plug>BufTabLine.Go(4)
nmap <leader>5 <Plug>BufTabLine.Go(5)
nmap <leader>6 <Plug>BufTabLine.Go(6)
nmap <leader>7 <Plug>BufTabLine.Go(7)
nmap <leader>8 <Plug>BufTabLine.Go(8)
nmap <leader>9 <Plug>BufTabLine.Go(9)
nmap <leader>0 <Plug>BufTabLine.Go(10)
<
There is also a |<Plug>| mapping which always switches to the last buffer: >
nmap <leader>0 <Plug>BufTabLine.Go(-1)
<
On Mac OS, you probably want to use a |<D-| mapping instead, which will emulate
the standard Cmd+1, Cmd+2, etc. keybindings for this feature: >
nmap <D-1> <Plug>BufTabLine.Go(1)
nmap <D-2> <Plug>BufTabLine.Go(2)
nmap <D-3> <Plug>BufTabLine.Go(3)
nmap <D-4> <Plug>BufTabLine.Go(4)
nmap <D-5> <Plug>BufTabLine.Go(5)
nmap <D-6> <Plug>BufTabLine.Go(6)
nmap <D-7> <Plug>BufTabLine.Go(7)
nmap <D-8> <Plug>BufTabLine.Go(8)
nmap <D-9> <Plug>BufTabLine.Go(9)
nmap <D-0> <Plug>BufTabLine.Go(10)
" or to go to the last buffer:
nmap <D-0> <Plug>BufTabLine.Go(-1)
<
You can ask for more (or fewer) than the default 10 <Plug> mappings using the
|g:buftabline_plug_max| setting.
==============================================================================
4. Tab coloring and colorscheme support *buftabline-colors*
This plugin uses several custom highlight groups to render the buffer tabs.
The custom groups are linked to several other built-in Vim highlight groups
that should provide a sensible default which automatically harmonizes with
your |colorscheme|.
However, if you dislike your colorscheme's chosen tabline colours, you can
override the default links in your |vimrc| -- c.f. |:hi-link|.
Or if you are a colorscheme designer (|44.1|), you can add support to your
colorscheme for this plugin specifically.
The highlight groups and their default links are as follows:
Custom group Default link Meaning
*BufTabLineCurrent* |TabLineSel| Buffer shown in current window
*BufTabLineActive* |PmenuSel| Buffer shown in other window
*BufTabLineHidden* |TabLine| Buffer not currently visible
*BufTabLineFill* |TabLineFill| Empty area
*BufTabLineModifiedCurrent* |BufTabLineCurrent| (Same as linked but 'modified')
*BufTabLineModifiedActive* |BufTabLineActive| (Same as linked but 'modified')
*BufTabLineModifiedHidden* |BufTabLineHidden| (Same as linked but 'modified')
==============================================================================
5. Source *buftabline-source*
https://github.com/ap/vim-buftabline
vim:tw=78:et:ft=help:norl:

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

View File

@ -1,61 +0,0 @@
if exists('g:loaded_bufferline')
finish
endif
let g:loaded_bufferline = 1
function! s:check_defined(variable, default)
if !exists(a:variable)
let {a:variable} = a:default
endif
endfunction
call s:check_defined('g:bufferline_active_buffer_left', '[')
call s:check_defined('g:bufferline_active_buffer_right', ']')
call s:check_defined('g:bufferline_separator', ' ')
call s:check_defined('g:bufferline_modified', '+')
call s:check_defined('g:bufferline_echo', 1)
call s:check_defined('g:bufferline_show_bufnr', 1)
call s:check_defined('g:bufferline_fname_mod', ':t')
call s:check_defined('g:bufferline_inactive_highlight', 'StatusLineNC')
call s:check_defined('g:bufferline_active_highlight', 'StatusLine')
call s:check_defined('g:bufferline_rotate', 0)
call s:check_defined('g:bufferline_fixed_index', 1)
call s:check_defined('g:bufferline_solo_highlight', 0)
call s:check_defined('g:bufferline_excludes', ['\[vimfiler\]'])
call s:check_defined('g:bufferline_pathshorten', 0)
function! bufferline#generate_string()
return "bufferline#generate_string() is obsolete! Please consult README."
endfunction
let g:bufferline_status_info = {
\ 'count': 0,
\ 'before': '',
\ 'current': '',
\ 'after': '',
\ }
function! bufferline#refresh_status()
if g:bufferline_solo_highlight
if g:bufferline_status_info.count == 1
exec printf('highlight! link %s %s', g:bufferline_active_highlight, g:bufferline_inactive_highlight)
else
exec printf('highlight! link %s NONE', g:bufferline_active_highlight)
endif
endif
call bufferline#get_echo_string()
return ''
endfunction
function! bufferline#get_status_string()
return
\ '%#'.g:bufferline_inactive_highlight.'#'
\.'%{g:bufferline_status_info.before}'
\.'%#'.g:bufferline_active_highlight.'#'
\.' %{g:bufferline_status_info.current} '
\.'%#'.g:bufferline_inactive_highlight.'#'
\.'%{g:bufferline_status_info.after}'
endfunction
if g:bufferline_echo
call bufferline#init_echo()
endif

View File

@ -0,0 +1,219 @@
" Vim global plugin for rendering the buffer list in the tabline
" Licence: The MIT License (MIT)
" Commit: $Format:%H$
" {{{ Copyright (c) 2015 Aristotle Pagaltzis <pagaltzis@gmx.de>
"
" Permission is hereby granted, free of charge, to any person obtaining a copy
" of this software and associated documentation files (the "Software"), to deal
" in the Software without restriction, including without limitation the rights
" to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
" copies of the Software, and to permit persons to whom the Software is
" furnished to do so, subject to the following conditions:
"
" The above copyright notice and this permission notice shall be included in
" all copies or substantial portions of the Software.
"
" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
" AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
" LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
" OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
" THE SOFTWARE.
" }}}
if v:version < 700
echoerr printf('Vim 7 is required for buftabline (this is only %d.%d)',v:version/100,v:version%100)
finish
endif
scriptencoding utf-8
hi default link BufTabLineCurrent TabLineSel
hi default link BufTabLineActive PmenuSel
hi default link BufTabLineHidden TabLine
hi default link BufTabLineFill TabLineFill
hi default link BufTabLineModifiedCurrent BufTabLineCurrent
hi default link BufTabLineModifiedActive BufTabLineActive
hi default link BufTabLineModifiedHidden BufTabLineHidden
let g:buftabline_numbers = get(g:, 'buftabline_numbers', 0)
let g:buftabline_indicators = get(g:, 'buftabline_indicators', 0)
let g:buftabline_separators = get(g:, 'buftabline_separators', 0)
let g:buftabline_show = get(g:, 'buftabline_show', 2)
let g:buftabline_plug_max = get(g:, 'buftabline_plug_max', 10)
function! buftabline#user_buffers() " help buffers are always unlisted, but quickfix buffers are not
return filter(range(1,bufnr('$')),'buflisted(v:val) && "quickfix" !=? getbufvar(v:val, "&buftype")')
endfunction
function! s:switch_buffer(bufnum, clicks, button, mod)
execute 'buffer' a:bufnum
endfunction
function s:SID()
return matchstr(expand('<sfile>'), '<SNR>\d\+_')
endfunction
let s:dirsep = fnamemodify(getcwd(),':p')[-1:]
let s:centerbuf = winbufnr(0)
let s:tablineat = has('tablineat')
let s:sid = s:SID() | delfunction s:SID
function! buftabline#render()
let show_num = g:buftabline_numbers == 1
let show_ord = g:buftabline_numbers == 2
let show_mod = g:buftabline_indicators
let lpad = g:buftabline_separators ? nr2char(0x23B8) : ' '
let bufnums = buftabline#user_buffers()
let centerbuf = s:centerbuf " prevent tabline jumping around when non-user buffer current (e.g. help)
" pick up data on all the buffers
let tabs = []
let path_tabs = []
let tabs_per_tail = {}
let currentbuf = winbufnr(0)
let screen_num = 0
for bufnum in bufnums
let screen_num = show_num ? bufnum : show_ord ? screen_num + 1 : ''
let tab = { 'num': bufnum, 'pre': '' }
let tab.hilite = currentbuf == bufnum ? 'Current' : bufwinnr(bufnum) > 0 ? 'Active' : 'Hidden'
if currentbuf == bufnum | let [centerbuf, s:centerbuf] = [bufnum, bufnum] | endif
let bufpath = bufname(bufnum)
if strlen(bufpath)
let tab.path = fnamemodify(bufpath, ':p:~:.')
let tab.sep = strridx(tab.path, s:dirsep, strlen(tab.path) - 2) " keep trailing dirsep
let tab.label = tab.path[tab.sep + 1:]
let pre = screen_num
if getbufvar(bufnum, '&mod')
let tab.hilite = 'Modified' . tab.hilite
if show_mod | let pre = '+' . pre | endif
endif
if strlen(pre) | let tab.pre = pre . ' ' | endif
let tabs_per_tail[tab.label] = get(tabs_per_tail, tab.label, 0) + 1
let path_tabs += [tab]
elseif -1 < index(['nofile','acwrite'], getbufvar(bufnum, '&buftype')) " scratch buffer
let tab.label = ( show_mod ? '!' . screen_num : screen_num ? screen_num . ' !' : '!' )
else " unnamed file
let tab.label = ( show_mod && getbufvar(bufnum, '&mod') ? '+' : '' )
\ . ( screen_num ? screen_num : '*' )
endif
let tabs += [tab]
endfor
" disambiguate same-basename files by adding trailing path segments
while len(filter(tabs_per_tail, 'v:val > 1'))
let [ambiguous, tabs_per_tail] = [tabs_per_tail, {}]
for tab in path_tabs
if -1 < tab.sep && has_key(ambiguous, tab.label)
let tab.sep = strridx(tab.path, s:dirsep, tab.sep - 1)
let tab.label = tab.path[tab.sep + 1:]
endif
let tabs_per_tail[tab.label] = get(tabs_per_tail, tab.label, 0) + 1
endfor
endwhile
" now keep the current buffer center-screen as much as possible:
" 1. setup
let lft = { 'lasttab': 0, 'cut': '.', 'indicator': '<', 'width': 0, 'half': &columns / 2 }
let rgt = { 'lasttab': -1, 'cut': '.$', 'indicator': '>', 'width': 0, 'half': &columns - lft.half }
" 2. sum the string lengths for the left and right halves
let currentside = lft
let lpad_width = strwidth(lpad)
for tab in tabs
let tab.width = lpad_width + strwidth(tab.pre) + strwidth(tab.label) + 1
let tab.label = lpad . tab.pre . substitute(strtrans(tab.label), '%', '%%', 'g') . ' '
if centerbuf == tab.num
let halfwidth = tab.width / 2
let lft.width += halfwidth
let rgt.width += tab.width - halfwidth
let currentside = rgt
continue
endif
let currentside.width += tab.width
endfor
if currentside is lft " centered buffer not seen?
" then blame any overflow on the right side, to protect the left
let [lft.width, rgt.width] = [0, lft.width]
endif
" 3. toss away tabs and pieces until all fits:
if ( lft.width + rgt.width ) > &columns
let oversized
\ = lft.width < lft.half ? [ [ rgt, &columns - lft.width ] ]
\ : rgt.width < rgt.half ? [ [ lft, &columns - rgt.width ] ]
\ : [ [ lft, lft.half ], [ rgt, rgt.half ] ]
for [side, budget] in oversized
let delta = side.width - budget
" toss entire tabs to close the distance
while delta >= tabs[side.lasttab].width
let delta -= remove(tabs, side.lasttab).width
endwhile
" then snip at the last one to make it fit
let endtab = tabs[side.lasttab]
while delta > ( endtab.width - strwidth(strtrans(endtab.label)) )
let endtab.label = substitute(endtab.label, side.cut, '', '')
endwhile
let endtab.label = substitute(endtab.label, side.cut, side.indicator, '')
endfor
endif
if len(tabs) | let tabs[0].label = substitute(tabs[0].label, lpad, ' ', '') | endif
let swallowclicks = '%'.(1 + tabpagenr('$')).'X'
return s:tablineat
\ ? join(map(tabs,'"%#BufTabLine".v:val.hilite."#" . "%".v:val.num."@'.s:sid.'switch_buffer@" . strtrans(v:val.label)'),'') . '%#BufTabLineFill#' . swallowclicks
\ : swallowclicks . join(map(tabs,'"%#BufTabLine".v:val.hilite."#" . strtrans(v:val.label)'),'') . '%#BufTabLineFill#'
endfunction
function! buftabline#update(zombie)
set tabline=
" silent! is used here because neovim lacks guioptions and v0.11.0 broke backcompat
" by making setting it an E519 unsupported error instead of the previous no-op
" N.B. :set processes options in order and will abort on error even under silent!
if tabpagenr('$') > 1 | silent! set showtabline=2 guioptions+=e | return | endif
silent! set guioptions-=e
if 0 == g:buftabline_show
set showtabline=1
return
elseif 1 == g:buftabline_show
" account for BufDelete triggering before buffer is actually deleted
let bufnums = filter(buftabline#user_buffers(), 'v:val != a:zombie')
let &g:showtabline = 1 + ( len(bufnums) > 1 )
elseif 2 == g:buftabline_show
set showtabline=2
endif
set tabline=%!buftabline#render()
endfunction
augroup BufTabLine
autocmd!
autocmd VimEnter * call buftabline#update(0)
autocmd TabEnter * call buftabline#update(0)
autocmd BufAdd * call buftabline#update(0)
autocmd FileType qf call buftabline#update(0)
autocmd BufDelete * call buftabline#update(str2nr(expand('<abuf>')))
augroup END
for s:n in range(1, g:buftabline_plug_max) + ( g:buftabline_plug_max > 0 ? [-1] : [] )
let s:b = s:n == -1 ? -1 : s:n - 1
execute printf("noremap <silent> <Plug>BufTabLine.Go(%d) :<C-U>exe 'b'.get(buftabline#user_buffers(),%d,'')<cr>", s:n, s:b)
endfor
unlet! s:n s:b
if v:version < 703
function s:transpile()
let [ savelist, &list ] = [ &list, 0 ]
redir => src
silent function buftabline#render
redir END
let &list = savelist
let src = substitute(src, '\n\zs[0-9 ]*', '', 'g')
let src = substitute(src, 'strwidth(strtrans(\([^)]\+\)))', 'strlen(substitute(\1, ''\p\|\(.\)'', ''x\1'', ''g''))', 'g')
return src
endfunction
exe "delfunction buftabline#render\n" . s:transpile()
delfunction s:transpile
endif

@ -0,0 +1 @@
Subproject commit 3cc1ff9fdffd8c5fc0038ebc4a30d8e496abf130

View File

@ -0,0 +1,2 @@
*.swp
*.un~

View File

@ -0,0 +1,81 @@
**me:** Hi everyone, my name is Franco and I'm addicted to colorschemes
**everyone else:** *Hi Franco*
Vim colorschemes
================
one stop shop for vim colorschemes.
this was [originally] harvested from vim.org. only colorschemes downloaded in a single `.vim`
file are included.
for hacking on vim.org harvesting see the branch [prep](https://github.com/flazz/vim-colorschemes/tree/prep).
Policy
------
- honor system is in effect!
- new schemes are welcome!
- upstream updates are accepted!
- non-upstream updates are accepted as derivitive schemes: pick a new filename; cite the original!
- housekeeping updates are accepted too!
Installation
------------
Basic install - very simple (*nix or cygwin install)
mkdir ~/.vim
git clone https://github.com/flazz/vim-colorschemes.git ~/.vim
if you [use vim + pathogen](http://vimcasts.org/episodes/synchronizing-plugins-with-git-submodules-and-pathogen/)
git submodule add https://github.com/flazz/vim-colorschemes.git ~/.vim/bundle/colorschemes
if you [use vim + vundle](https://github.com/gmarik/vundle)
" add to .vimrc
Plugin 'flazz/vim-colorschemes'
:PluginInstall
if you aren't so clever just get all the files in `colors/*.vim` into
`~/.vim/colors`
# after downloading; unpacking; cd'ing
cp colors/* ~/.vim/colors
Using
-----
To change the colorscheme of Vim, add to your `.vimrc`:
colorscheme nameofcolorscheme
For example, to change the color scheme to wombat:
colorscheme wombat
To change to Molokai:
colorscheme molokai
Inside Vim, you use:
:colorscheme molokai
Previewing colorschemes
-----------------------
There are quite a few colorschemes in this. To preview them on your live code inside of Vim, checkout [this page from the vim wikia](http://vim.wikia.com/wiki/Switch_color_schemes) and [this repo for easy installation](https://github.com/felixhummel/setcolors.vim).
Something missing? Fork!
------------------------
fork [this repo](http://github.com/flazz/vim-colorschemes); send a
pull request!; I'll take it!
- - -
I'm a slave to aesthetics. If you are too, I hope this helps.
[email](mailto:flazzarino@gmail.com)

View File

@ -0,0 +1,112 @@
" Vim color file
" cool help screens
" :he group-name
" :he highlight-groups
" :he cterm-colors
set background=dark
if version > 580
" no guarantees for version 5.8 and below, but this makes it stop
" complaining
hi clear
if exists("syntax_on")
syntax reset
endif
endif
let g:colors_name="0x7A69_dark"
hi Normal guifg=#aaaaaa guibg=#1f1f1f " цвет фона
" highlight groups
hi Cursor guifg=NONE guibg=grey40 gui=none
"hi Cursor guifg=NONE guibg=#f0e68c gui=none
"hi CursorIM
"hi Directory
"hi DiffAdd
"hi DiffChange
"hi DiffDelete
"hi DiffText
"hi ErrorMsg
hi VertSplit guibg=#c2bfa5 guifg=grey50 gui=none
hi Folded guibg=grey30 guifg=gold
hi FoldColumn guibg=grey30 guifg=tan
hi IncSearch guifg=slategrey guibg=khaki
"hi LineNr
hi ModeMsg guifg=goldenrod
hi MoreMsg guifg=SeaGreen
hi NonText guifg=LightBlue guibg=grey30
hi Question guifg=springgreen
hi Search guibg=peru guifg=wheat
hi SpecialKey guifg=yellowgreen
hi StatusLine guibg=grey0 guifg=grey60 gui=none
hi StatusLineNC guibg=grey0 guifg=grey60 gui=none
hi Title guifg=indianred
hi Visual gui=none guifg=khaki guibg=olivedrab
"hi VisualNOS
hi WarningMsg guifg=salmon
"hi WildMenu
"hi Menu
"hi Scrollbar
"hi Tooltip
" syntax highlighting groups
hi Comment guifg=#007f7f
hi Constant guifg=#ffa0a0
hi Identifier guifg=palegreen cterm=bold
hi Statement guifg=khaki
hi PreProc guifg=indianred
hi Type guifg=darkkhaki
hi Special guifg=navajowhite
"hi Underlined
hi Ignore guifg=grey40
"hi Error
hi Todo guifg=orangered guibg=yellow2
" color terminal definitions
hi SpecialKey ctermfg=darkgreen
hi NonText cterm=bold ctermfg=darkblue
hi Directory ctermfg=darkcyan
hi ErrorMsg cterm=bold ctermfg=7 ctermbg=1
hi IncSearch cterm=NONE ctermfg=yellow ctermbg=green
hi Search cterm=NONE ctermfg=grey ctermbg=blue
hi MoreMsg ctermfg=darkgreen
hi ModeMsg cterm=NONE ctermfg=brown
hi LineNr ctermfg=3
hi Question ctermfg=green
hi StatusLine cterm=bold,reverse
hi StatusLineNC cterm=reverse
hi VertSplit cterm=reverse
hi Title ctermfg=5
hi Visual cterm=reverse
hi VisualNOS cterm=bold,underline
hi WarningMsg ctermfg=1
hi WildMenu ctermfg=0 ctermbg=3
hi Folded ctermfg=darkgrey ctermbg=NONE
hi FoldColumn ctermfg=darkgrey ctermbg=NONE
hi DiffAdd ctermbg=4
hi DiffChange ctermbg=5
hi DiffDelete cterm=bold ctermfg=4 ctermbg=6
hi DiffText cterm=bold ctermbg=1
hi Comment ctermfg=darkcyan
hi Constant ctermfg=brown
hi Special ctermfg=5
hi Identifier ctermfg=6
hi Statement ctermfg=3
hi PreProc ctermfg=5
hi Type ctermfg=2
hi Underlined cterm=underline ctermfg=5
hi Ignore cterm=bold ctermfg=7
hi Ignore ctermfg=darkgrey
hi Error cterm=bold ctermfg=7 ctermbg=1
hi Pmenu guifg=#f6f3e8 guibg=#444444
hi PmenuSel guifg=#000000 guibg=#cae682
hi ColorColumn term=reverse ctermbg=4 guibg=grey18
hi MatchParen term=reverse ctermbg=3 guibg=red4
hi lCursor guifg=NONE guibg=Cyan
hi CursorLine term=underline cterm=underline guibg=grey14
"vim: sw=4

View File

@ -0,0 +1,186 @@
" Vim color file
set background=dark
highlight clear
if exists("syntax_on")
syntax reset
endif
let g:colors_name = "1989"
let s:dark_gray = [236, "#303030"]
let s:mid_gray = [102, "#878787"]
let s:default_white = [231, "#FFFFFF"]
let s:lavender = [183, "#dfafff"]
let s:light_purple = [225, "#ffdfff"]
let s:gray_purple = [146, "#afafd7"]
let s:pink = [218, "#ffafdf"]
let s:light_blue = [159, "#afffff"]
let s:mint = [158, "#afffd7"]
let s:light_yellow = [229, "#ffffaf"]
let s:dark_pink = [197, "#ff005f"]
let s:dark_green = [29, "#00875f"]
let s:dark_blue = [31, "#0087af"]
let s:none = ["NONE", ""]
function! <SID>set_hi(name, fg, bg, style)
execute "hi " . a:name . " ctermfg=" . a:fg[0] . " ctermbg=" . a:bg[0] " cterm=" . a:style
if a:fg[1] != ""
execute "hi " . a:name . " guifg=" . a:fg[1]
endif
if a:bg[1] != ""
execute "hi " . a:name . " guibg=" . a:bg[1]
endif
execute "hi " . a:name . " gui=" . a:style
endfun
call <SID>set_hi("Normal", s:default_white, s:dark_gray, "NONE")
call <SID>set_hi("Cursor", s:dark_gray, s:default_white, "NONE")
call <SID>set_hi("Visual", s:none, s:mid_gray, "NONE")
call <SID>set_hi("CursorLine", s:none, s:dark_gray, "NONE")
call <SID>set_hi("CursorColumn", s:none, s:dark_gray, "NONE")
call <SID>set_hi("ColorColumn", s:none, s:dark_gray, "NONE")
call <SID>set_hi("LineNr", s:mid_gray, s:dark_gray, "NONE")
call <SID>set_hi("VertSplit", s:mid_gray, s:mid_gray, "NONE")
call <SID>set_hi("MatchParen", s:pink, s:none, "underline")
call <SID>set_hi("StatusLine", s:default_white, s:mid_gray, "bold")
call <SID>set_hi("StatusLineNC", s:default_white, s:mid_gray, "NONE")
call <SID>set_hi("Pmenu", s:none, s:none, "NONE")
call <SID>set_hi("PmenuSel", s:none, s:dark_gray, "NONE")
call <SID>set_hi("IncSearch", s:dark_gray, s:light_yellow, "NONE")
call <SID>set_hi("Search", s:none, s:none, "underline")
call <SID>set_hi("Directory", s:lavender, s:none, "NONE")
call <SID>set_hi("Folded", s:light_yellow, s:dark_gray, "NONE")
call <SID>set_hi("TabLine", s:default_white, s:dark_gray, "NONE")
call <SID>set_hi("TabLineSel", s:light_purple, s:dark_gray, "NONE")
call <SID>set_hi("TabLineFill", s:default_white, s:dark_gray, "NONE")
call <SID>set_hi("Define", s:gray_purple, s:none, "NONE")
call <SID>set_hi("DiffAdd", s:default_white, s:dark_green, "bold")
call <SID>set_hi("DiffDelete", s:dark_pink, s:none, "NONE")
call <SID>set_hi("DiffChange", s:default_white, s:dark_gray, "NONE")
call <SID>set_hi("DiffText", s:default_white, s:dark_blue, "bold")
call <SID>set_hi("ErrorMsg", s:default_white, s:dark_pink, "NONE")
call <SID>set_hi("WarningMsg", s:default_white, s:dark_pink, "NONE")
call <SID>set_hi("Boolean", s:lavender, s:none, "NONE")
call <SID>set_hi("Character", s:lavender, s:none, "NONE")
call <SID>set_hi("Comment", s:gray_purple, s:none, "NONE")
call <SID>set_hi("Conditional", s:pink, s:none, "NONE")
call <SID>set_hi("Constant", s:mint, s:none, "NONE")
call <SID>set_hi("Float", s:lavender, s:none, "NONE")
call <SID>set_hi("Function", s:light_purple, s:none, "NONE")
call <SID>set_hi("Identifier", s:light_purple, s:none, "NONE")
call <SID>set_hi("Keyword", s:pink, s:none, "NONE")
call <SID>set_hi("Label", s:light_yellow, s:none, "NONE")
call <SID>set_hi("NonText", s:default_white, s:dark_gray, "NONE")
call <SID>set_hi("Number", s:mint, s:none, "NONE")
call <SID>set_hi("Operator", s:pink, s:none, "NONE")
call <SID>set_hi("PreProc", s:pink, s:none, "NONE")
call <SID>set_hi("Special", s:light_purple, s:none, "NONE")
call <SID>set_hi("SpecialKey", s:default_white, s:dark_gray, "NONE")
call <SID>set_hi("Statement", s:pink, s:none, "NONE")
call <SID>set_hi("SpellBad", s:pink, s:none, "underline")
call <SID>set_hi("SpellCap", s:light_blue, s:none, "underline")
call <SID>set_hi("StorageClass", s:mint, s:none, "NONE")
call <SID>set_hi("String", s:light_blue, s:none, "NONE")
call <SID>set_hi("Tag", s:pink, s:none, "NONE")
call <SID>set_hi("Title", s:default_white, s:none, "bold")
call <SID>set_hi("Todo", s:light_yellow, s:none, "inverse,bold")
call <SID>set_hi("Type", s:mint, s:none, "NONE")
call <SID>set_hi("Underlined", s:none, s:none, "underline")
call <SID>set_hi("rubyClass", s:pink, s:none, "NONE")
call <SID>set_hi("rubyFunction", s:light_purple, s:none, "NONE")
call <SID>set_hi("rubyInterpolationDelimiter", s:none, s:none, "NONE")
call <SID>set_hi("rubySymbol", s:light_purple, s:none, "NONE")
call <SID>set_hi("rubyConstant", s:mint, s:none, "NONE")
call <SID>set_hi("rubyStringDelimiter", s:light_blue, s:none, "NONE")
call <SID>set_hi("rubyBlockParameter", s:pink, s:none, "NONE")
call <SID>set_hi("rubyBlock", s:default_white, s:none, "NONE")
call <SID>set_hi("rubyInstanceVariable", s:pink, s:none, "NONE")
call <SID>set_hi("rubyInclude", s:pink, s:none, "NONE")
call <SID>set_hi("rubyGlobalVariable", s:light_yellow, s:none, "NONE")
call <SID>set_hi("rubyRegexp", s:light_yellow, s:none, "NONE")
call <SID>set_hi("rubyRegexpDelimiter", s:light_yellow, s:none, "NONE")
call <SID>set_hi("rubyEscape", s:lavender, s:none, "NONE")
call <SID>set_hi("rubyControl", s:lavender, s:none, "NONE")
call <SID>set_hi("rubyRepeat", s:lavender, s:none, "NONE")
call <SID>set_hi("rubyConditional", s:pink, s:none, "NONE")
call <SID>set_hi("rubyClassVariable", s:light_yellow, s:none, "NONE")
call <SID>set_hi("rubyOperator", s:pink, s:none, "NONE")
call <SID>set_hi("rubyException", s:mint, s:none, "NONE")
call <SID>set_hi("rubyPseudoVariable", s:mint, s:none, "NONE")
call <SID>set_hi("rubyRailsUserClass", s:mint, s:none, "NONE")
call <SID>set_hi("rubyRailsARAssociationMethod", s:mint, s:none, "NONE")
call <SID>set_hi("rubyRailsARMethod", s:mint, s:none, "NONE")
call <SID>set_hi("rubyRailsRenderMethod", s:mint, s:none, "NONE")
call <SID>set_hi("rubyRailsMethod", s:mint, s:none, "NONE")
call <SID>set_hi("rubyArrayDelimiter", s:pink, s:none, "NONE")
call <SID>set_hi("rubyInterpolation", s:light_purple, s:none, "NONE")
call <SID>set_hi("rubyInterpolationDelimiter", s:pink, s:none, "NONE")
call <SID>set_hi("erubyDelimiter", s:none, s:none, "NONE")
call <SID>set_hi("erubyRailsMethod", s:mint, s:none, "NONE")
call <SID>set_hi("htmlTag", s:none, s:none, "NONE")
call <SID>set_hi("htmlEndTag", s:none, s:none, "NONE")
call <SID>set_hi("htmlTagName", s:none, s:none, "NONE")
call <SID>set_hi("htmlArg", s:none, s:none, "NONE")
call <SID>set_hi("htmlSpecialChar", s:lavender, s:none, "NONE")
call <SID>set_hi("javaScriptFunction", s:mint, s:none, "NONE")
call <SID>set_hi("javaScriptRailsFunction", s:mint, s:none, "NONE")
call <SID>set_hi("javaScriptBraces", s:none, s:none, "NONE")
call <SID>set_hi("yamlKey", s:pink, s:none, "NONE")
call <SID>set_hi("yamlAnchor", s:none, s:none, "NONE")
call <SID>set_hi("yamlAlias", s:none, s:none, "NONE")
call <SID>set_hi("yamlDocumentHeader", s:light_yellow, s:none, "NONE")
call <SID>set_hi("yamlPlainScalar", s:light_blue, s:none, "NONE")
call <SID>set_hi("yamlBlockCollectionItemStart", s:pink, s:none, "NONE")
call <SID>set_hi("cssURL", s:dark_pink, s:none, "NONE")
call <SID>set_hi("cssFunctionName", s:mint, s:none, "NONE")
call <SID>set_hi("cssColor", s:lavender, s:none, "NONE")
call <SID>set_hi("cssPseudoClassId", s:light_yellow, s:none, "NONE")
call <SID>set_hi("cssClassName", s:light_yellow, s:none, "NONE")
call <SID>set_hi("cssValueLength", s:lavender, s:none, "NONE")
call <SID>set_hi("cssCommonAttr", s:mint, s:none, "NONE")
call <SID>set_hi("cssBraces", s:none, s:none, "NONE")
call <SID>set_hi("jsThis", s:pink, s:none, "NONE")
call <SID>set_hi("jsBraces", s:light_purple, s:none, "NONE")
call <SID>set_hi("jsGlobalObjects", s:mint, s:none, "NONE")
call <SID>set_hi("coffeeCurly", s:lavender, s:none, "NONE")
call <SID>set_hi("coffeeObjAssign", s:light_purple, s:none, "NONE")
call <SID>set_hi("cjsxAttribProperty", s:lavender, s:none, "NONE")
call <SID>set_hi("markdownH1", s:light_blue, s:none, "NONE")
call <SID>set_hi("markdownH2", s:light_blue, s:none, "NONE")
call <SID>set_hi("markdownH3", s:light_blue, s:none, "NONE")
call <SID>set_hi("markdownH4", s:light_blue, s:none, "NONE")
call <SID>set_hi("markdownH5", s:light_blue, s:none, "NONE")
call <SID>set_hi("markdownH6", s:light_blue, s:none, "NONE")
call <SID>set_hi("markdownHeadingDelimiter", s:light_blue, s:none, "NONE")
call <SID>set_hi("markdownRule", s:light_blue, s:none, "NONE")
call <SID>set_hi("SyntasticError", s:dark_gray, s:pink, "NONE")
call <SID>set_hi("SyntasticWarning", s:dark_gray, s:light_blue, "NONE")
" https://github.com/kien/rainbow_parentheses.vim
if !exists("g:rbpt_colorpairs")
let g:rbpt_colorpairs = [
\ s:mint, s:light_blue, s:lavender, s:pink,
\ s:mint, s:light_blue, s:lavender, s:pink,
\ s:mint, s:light_blue, s:lavender, s:pink,
\ s:mint, s:light_blue, s:lavender, s:pink,
\ ]
endif

View File

@ -0,0 +1,46 @@
" Vim color file
" Maintainer: Piotr Husiatyński <phusiatynski@gmail.com>
set background=dark
set t_Co=256
let g:colors_name="256-grayvim"
let python_highlight_all = 1
let c_gnu = 1
hi Normal ctermfg=253 ctermbg=235 cterm=None
hi Cursor ctermfg=Red ctermbg=None cterm=None
hi SpecialKey ctermfg=87 ctermbg=None cterm=Bold
hi Directory ctermfg=76 ctermbg=None cterm=None
hi ErrorMsg ctermfg=124 ctermbg=White cterm=None
hi PreProc ctermfg=246 ctermbg=None cterm=Bold
hi Search ctermfg=160 ctermbg=232 cterm=Bold
hi Type ctermfg=75 ctermbg=None cterm=Bold
hi Statement ctermfg=75 ctermbg=None cterm=None
hi Comment ctermfg=244 ctermbg=None cterm=None
hi Identifier ctermfg=111 ctermbg=None cterm=Bold
hi DiffText ctermfg=88 ctermbg=250 cterm=None
hi Constant ctermfg=208 ctermbg=None cterm=None
hi Todo ctermfg=233 ctermbg=118 cterm=Bold
hi Error ctermfg=233 ctermbg=124 cterm=Bold
hi Special ctermfg=160 ctermbg=None cterm=Bold
hi Ignore ctermfg=220 ctermbg=None cterm=Bold
hi Underline ctermfg=244 ctermbg=None cterm=None
hi FoldColumn ctermfg=247 ctermbg=None cterm=Bold
hi StatusLineNC ctermfg=247 ctermbg=234 cterm=None
hi StatusLine ctermfg=247 ctermbg=233 cterm=Bold
hi VertSplit ctermfg=247 ctermbg=234 cterm=Bold
hi LineNr ctermfg=238 ctermbg=244 cterm=Bold
hi LineNr ctermfg=247 ctermbg=235 cterm=Bold
hi NonText ctermfg=87 ctermbg=None cterm=Bold
hi Pmenu ctermfg=White ctermbg=DarkGray cterm=None
hi PmenuSel ctermfg=None ctermbg=Gray cterm=Bold
hi PmenuSbar ctermfg=DarkGray ctermbg=DarkGray cterm=None
hi PmenuThumb ctermfg=Gray ctermbg=Gray cterm=None
"vim: sw=4

View File

@ -0,0 +1,50 @@
" Vim color file
" Maintainer: Piotr Husiatyński <phusiatynski@gmail.com>
set background=dark
set t_Co=256
let g:colors_name="256-jungle"
let python_highlight_all = 1
let c_gnu = 1
hi Normal ctermfg=253 ctermbg=234 cterm=None
hi Cursor ctermfg=253 ctermbg=57 cterm=None
hi SpecialKey ctermfg=70 ctermbg=None cterm=None
hi Directory ctermfg=57 ctermbg=254 cterm=None
hi ErrorMsg ctermfg=160 ctermbg=245 cterm=None
hi PreProc ctermfg=243 ctermbg=None cterm=Bold
hi Search ctermfg=125 ctermbg=None cterm=Bold
hi Type ctermfg=166 ctermbg=None cterm=Bold
hi Statement ctermfg=172 ctermbg=None cterm=Bold
hi Comment ctermfg=240 ctermbg=None cterm=None
hi LineNr ctermfg=244 ctermbg=233 cterm=None
hi NonText ctermfg=105 ctermbg=None cterm=Bold
hi DiffText ctermfg=165 ctermbg=244 cterm=None
hi Constant ctermfg=76 ctermbg=None cterm=None
hi Todo ctermfg=162 ctermbg=None cterm=Bold
hi Identifier ctermfg=142 ctermbg=None cterm=Bold
hi Error ctermfg=None ctermbg=196 cterm=Bold
hi Special ctermfg=172 ctermbg=None cterm=Bold
hi Ignore ctermfg=221 ctermbg=None cterm=Bold
hi Underline ctermfg=147 ctermbg=None cterm=Italic
hi FoldColumn ctermfg=132 ctermbg=None cterm=None
hi Folded ctermfg=132 ctermbg=None cterm=Bold
hi Visual ctermfg=248 ctermbg=238 cterm=None
hi Pmenu ctermfg=62 ctermbg=233 cterm=None
hi PmenuSel ctermfg=69 ctermbg=232 cterm=Bold
hi PmenuSbar ctermfg=247 ctermbg=233 cterm=Bold
hi PmenuThumb ctermfg=248 ctermbg=233 cterm=None
hi StatusLineNC ctermfg=248 ctermbg=239 cterm=None
hi StatusLine ctermfg=39 ctermbg=239 cterm=None
hi VertSplit ctermfg=239 ctermbg=239 cterm=None
hi TabLine ctermfg=245 ctermbg=239 cterm=None
hi TabLineFill ctermfg=239 ctermbg=239
hi TabLineSel ctermfg=104 ctermbg=236 cterm=Bold
"vim: sw=4

View File

@ -0,0 +1,170 @@
" 256 noir. Basically: dark background, numerals & errors red,
" rest different shades of gray.
"
" colors 232--250 are shades of gray, from dark to light;
" 16=black, 255=white, 196=red, 88=darkred.
set background=dark
if version > 580
" no guarantees for version 5.8 and below, but this makes it stop
" complaining
highlight clear
if exists("syntax_on")
syntax reset
endif
endif
let g:colors_name = "256_noir"
if has("gui_running") || &t_Co == 256
hi Normal ctermfg=250 ctermbg=16 guifg=#bcbcbc guibg=#000000
hi SpellRare ctermfg=124 ctermbg=16 guifg=#af0000 guibg=#000000
hi Character ctermfg=196 ctermbg=16 guifg=#ff0000 guibg=#000000
hi Condtional ctermfg=196 ctermbg=16 guifg=#ff0000 guibg=#000000
hi Float ctermfg=196 ctermbg=16 guifg=#ff0000 guibg=#000000
hi Folded ctermfg=196 ctermbg=16 guifg=#ff0000 guibg=#000000
hi Number ctermfg=196 ctermbg=16 guifg=#ff0000 guibg=#000000
hi Tag ctermfg=196 ctermbg=16 guifg=#ff0000 guibg=#000000
hi WarningMsg ctermfg=196 ctermbg=16 guifg=#ff0000 guibg=#000000
hi Comment ctermfg=240 ctermbg=16 guifg=#585858 guibg=#000000
hi DiffDelete ctermfg=240 ctermbg=16 guifg=#585858 guibg=#000000
hi diffRemoved ctermfg=240 ctermbg=16 guifg=#585858 guibg=#000000
hi LineNr ctermfg=240 ctermbg=16 guifg=#585858 guibg=#000000
hi NonText ctermfg=240 ctermbg=16 guifg=#585858 guibg=#000000
hi StatusLineNC ctermfg=240 ctermbg=16 guifg=#585858 guibg=#000000
hi SpecialComment ctermfg=245 ctermbg=16 guifg=#8a8a8a guibg=#000000
hi String ctermfg=245 ctermbg=16 guifg=#8a8a8a guibg=#000000
hi Boolean ctermfg=250 ctermbg=16 guifg=#bcbcbc guibg=#000000
hi Debug ctermfg=250 ctermbg=16 guifg=#bcbcbc guibg=#000000
hi Delimiter ctermfg=250 ctermbg=16 guifg=#bcbcbc guibg=#000000
hi Exception ctermfg=250 ctermbg=16 guifg=#bcbcbc guibg=#000000
hi FoldColumn ctermfg=250 ctermbg=16 guifg=#bcbcbc guibg=#000000
hi Identifier ctermfg=250 ctermbg=16 guifg=#bcbcbc guibg=#000000
hi Macro ctermfg=250 ctermbg=16 guifg=#bcbcbc guibg=#000000
hi ModeMsg ctermfg=250 ctermbg=16 guifg=#bcbcbc guibg=#000000
hi MoreMsg ctermfg=250 ctermbg=16 guifg=#bcbcbc guibg=#000000
hi Question ctermfg=250 ctermbg=16 guifg=#bcbcbc guibg=#000000
hi Title ctermfg=250 ctermbg=16 guifg=#bcbcbc guibg=#000000
hi VertSplit ctermfg=250 ctermbg=16 guifg=#bcbcbc guibg=#000000
hi Constant ctermfg=252 ctermbg=16 guifg=#d0d0d0 guibg=#000000
hi Define ctermfg=255 ctermbg=16 guifg=#eeeeee guibg=#000000
hi DiffAdd ctermfg=255 ctermbg=16 guifg=#eeeeee guibg=#000000
hi diffAdded ctermfg=255 ctermbg=16 guifg=#eeeeee guibg=#000000
hi Directory ctermfg=255 ctermbg=16 guifg=#eeeeee guibg=#000000
hi Function ctermfg=255 ctermbg=16 guifg=#eeeeee guibg=#000000
hi Include ctermfg=255 ctermbg=16 guifg=#eeeeee guibg=#000000
hi Keyword ctermfg=255 ctermbg=16 guifg=#eeeeee guibg=#000000
hi Label ctermfg=255 ctermbg=16 guifg=#eeeeee guibg=#000000
hi Operator ctermfg=255 ctermbg=16 guifg=#eeeeee guibg=#000000
hi PreCondit ctermfg=255 ctermbg=16 guifg=#eeeeee guibg=#000000
hi PreProc ctermfg=255 ctermbg=16 guifg=#eeeeee guibg=#000000
hi Repeat ctermfg=255 ctermbg=16 guifg=#eeeeee guibg=#000000
hi Special ctermfg=255 ctermbg=16 guifg=#eeeeee guibg=#000000
hi SpecialChar ctermfg=255 ctermbg=16 guifg=#eeeeee guibg=#000000
hi Statement ctermfg=255 ctermbg=16 guifg=#eeeeee guibg=#000000
hi diffCommon ctermfg=255 ctermbg=16 guifg=#eeeeee guibg=#000000
hi StatusLine ctermfg=255 ctermbg=16 guifg=#eeeeee guibg=#000000
hi StorageClass ctermfg=255 ctermbg=16 guifg=#eeeeee guibg=#000000
hi Structure ctermfg=255 ctermbg=16 guifg=#eeeeee guibg=#000000
hi Todo ctermfg=255 ctermbg=16 guifg=#eeeeee guibg=#000000
hi Type ctermfg=255 ctermbg=16 guifg=#eeeeee guibg=#000000
hi Typedef ctermfg=255 ctermbg=16 guifg=#eeeeee guibg=#000000
hi SpellBad ctermfg=250 ctermbg=88 guifg=#bcbcbc guibg=#870000
hi Error ctermfg=255 ctermbg=88 guifg=#eeeeee guibg=#870000
hi ErrorMsg ctermfg=255 ctermbg=124 guifg=#eeeeee guibg=#af0000
hi SpellCap ctermfg=255 ctermbg=124 guifg=#eeeeee guibg=#af0000
hi SpellLocal ctermfg=255 ctermbg=124 guifg=#eeeeee guibg=#af0000
hi DiffText ctermfg=250 ctermbg=196 guifg=#bcbcbc guibg=#ff0000
hi Search ctermfg=245 ctermbg=236 guifg=#8a8a8a guibg=#303030
hi PmenuThumb ctermfg=232 ctermbg=240 guifg=#080808 guibg=#585858
hi Pmenu ctermfg=255 ctermbg=240 guifg=#eeeeee guibg=#585858
hi Cursor ctermfg=16 ctermbg=245 guifg=#000000 guibg=#8a8a8a
hi CursorColumn ctermfg=16 ctermbg=245 guifg=#000000 guibg=#8a8a8a
hi MatchParen ctermfg=16 ctermbg=245 guifg=#000000 guibg=#8a8a8a
hi IncSearch ctermfg=255 ctermbg=245 guifg=#eeeeee guibg=#8a8a8a
hi ColorColumn ctermfg=16 ctermbg=250 guifg=#000000 guibg=#bcbcbc
hi PmenuSbar ctermfg=16 ctermbg=250 guifg=#000000 guibg=#bcbcbc
hi PmenuSel ctermfg=16 ctermbg=250 guifg=#000000 guibg=#bcbcbc
hi Visual ctermfg=16 ctermbg=250 guifg=#000000 guibg=#bcbcbc
hi VisualNOS ctermfg=16 ctermbg=250 guifg=#000000 guibg=#bcbcbc
hi SpecialKey ctermfg=16 ctermbg=255 guifg=#000000 guibg=#eeeeee
hi iCursor ctermfg=16 ctermbg=255 guifg=#000000 guibg=#eeeeee
hi DiffChange ctermfg=160 ctermbg=255 guifg=#d70000 guibg=#eeeeee
hi diffChanged ctermfg=160 ctermbg=255 guifg=#d70000 guibg=#eeeeee
hi WildMenu ctermfg=240 ctermbg=255 guifg=#585858 guibg=#eeeeee
else
hi Normal ctermfg=LightGray ctermbg=Black
hi SpellRare ctermfg=Red ctermbg=Black
hi Character ctermfg=LightRed ctermbg=Black
hi Condtional ctermfg=LightRed ctermbg=Black
hi Float ctermfg=LightRed ctermbg=Black
hi Folded ctermfg=LightRed ctermbg=Black
hi Number ctermfg=LightRed ctermbg=Black
hi Tag ctermfg=LightRed ctermbg=Black
hi WarningMsg ctermfg=LightRed ctermbg=Black
hi Comment ctermfg=DarkGray ctermbg=Black
hi DiffDelete ctermfg=DarkGray ctermbg=Black
hi diffRemoved ctermfg=DarkGray ctermbg=Black
hi LineNr ctermfg=DarkGray ctermbg=Black
hi NonText ctermfg=DarkGray ctermbg=Black
hi StatusLineNC ctermfg=DarkGray ctermbg=Black
hi SpecialComment ctermfg=DarkGray ctermbg=Black
hi String ctermfg=DarkGray ctermbg=Black
hi Boolean ctermfg=LightGray ctermbg=Black
hi Debug ctermfg=LightGray ctermbg=Black
hi Delimiter ctermfg=LightGray ctermbg=Black
hi Exception ctermfg=LightGray ctermbg=Black
hi FoldColumn ctermfg=LightGray ctermbg=Black
hi Identifier ctermfg=LightGray ctermbg=Black
hi Macro ctermfg=LightGray ctermbg=Black
hi ModeMsg ctermfg=LightGray ctermbg=Black
hi MoreMsg ctermfg=LightGray ctermbg=Black
hi Question ctermfg=LightGray ctermbg=Black
hi Title ctermfg=LightGray ctermbg=Black
hi VertSplit ctermfg=LightGray ctermbg=Black
hi Constant ctermfg=LightGray ctermbg=Black
hi Define ctermfg=White ctermbg=Black
hi DiffAdd ctermfg=White ctermbg=Black
hi diffAdded ctermfg=White ctermbg=Black
hi Directory ctermfg=White ctermbg=Black
hi Function ctermfg=White ctermbg=Black
hi Include ctermfg=White ctermbg=Black
hi Keyword ctermfg=White ctermbg=Black
hi Label ctermfg=White ctermbg=Black
hi Operator ctermfg=White ctermbg=Black
hi PreCondit ctermfg=White ctermbg=Black
hi PreProc ctermfg=White ctermbg=Black
hi Repeat ctermfg=White ctermbg=Black
hi Special ctermfg=White ctermbg=Black
hi SpecialChar ctermfg=White ctermbg=Black
hi Statement ctermfg=White ctermbg=Black
hi diffCommon ctermfg=White ctermbg=Black
hi StatusLine ctermfg=White ctermbg=Black
hi StorageClass ctermfg=White ctermbg=Black
hi Structure ctermfg=White ctermbg=Black
hi Todo ctermfg=White ctermbg=Black
hi Type ctermfg=White ctermbg=Black
hi Typedef ctermfg=White ctermbg=Black
hi SpellBad ctermfg=LightGray ctermbg=DarkRed
hi Error ctermfg=White ctermbg=DarkRed
hi ErrorMsg ctermfg=White ctermbg=Red
hi SpellCap ctermfg=White ctermbg=Red
hi SpellLocal ctermfg=White ctermbg=Red
hi DiffText ctermfg=LightGray ctermbg=LightRed
hi Search ctermfg=DarkGray ctermbg=DarkGray
hi PmenuThumb ctermfg=Black ctermbg=DarkGray
hi Pmenu ctermfg=White ctermbg=DarkGray
hi Cursor ctermfg=Black ctermbg=DarkGray
hi CursorColumn ctermfg=Black ctermbg=DarkGray
hi MatchParen ctermfg=Black ctermbg=DarkGray
hi IncSearch ctermfg=White ctermbg=DarkGray
hi ColorColumn ctermfg=Black ctermbg=LightGray
hi PmenuSbar ctermfg=Black ctermbg=LightGray
hi PmenuSel ctermfg=Black ctermbg=LightGray
hi Visual ctermfg=Black ctermbg=LightGray
hi VisualNOS ctermfg=Black ctermbg=LightGray
hi SpecialKey ctermfg=Black ctermbg=White
hi iCursor ctermfg=Black ctermbg=White
hi DiffChange ctermfg=Red ctermbg=White
hi diffChanged ctermfg=Red ctermbg=White
hi WildMenu ctermfg=DarkGray ctermbg=White
endif

View File

@ -0,0 +1,110 @@
" Vim color file
" Name: 3dglasses
" Maintainer: Erik Falor <ewfalor@gmail.com>
" Version: 1.1.1
"
" Version 1.1.1: Modified MatchParen group so that Matching < > in XML
" files stand out better.
"
" Version 1.1: Added support for GetLatestVimScripts
"
" Version 1.0: Initial upload
" GetLatestVimScripts: 2019 1 :AutoInstall: 3dglasses.vim
set background=dark
if version < 700
finish
else
if exists("syntax_on")
hi clear
syntax reset
endif
endif
"map <F1> :echo synIDattr(synID(line("."), col("."), 1), "name")<CR>
let g:colors_name="3dglasses"
"3D Glasses palette
" {{{
let s:White = ['#ffffff', '#dddddd', '#bbbbbb']
let s:Black = ['#000000', '#001621', '#1B3641', '#00222B']
let s:DarkBlue = ['#00117B', '#0D4CAD', '#01BEF6']
let s:LightBlue = ['#004455', '#0088AA', '#00CCFF', '#55DDFF', '#80E5FF']
let s:Red = ['#2b0000', '#800000', '#AA0000', '#FF0000', '#FF2A2A', '#FF5555']
" }}}
hi Normal guibg=#00222B guifg=#00ffff
execute "hi Normal guibg=" . s:Black[3] . " guifg=" . s:LightBlue[4]
execute "hi NonText guibg=" . s:Black[3] . " guifg=" . s:Red[1]
" {{{ syntax
execute "hi Comment gui=italic guifg=" . s:LightBlue[2]
execute "hi Conditional gui=bold guifg=" . s:LightBlue[1]
execute "hi Constant gui=bold guifg=" . s:Red[2]
execute "hi Error guifg=" . s:Red[5] . " guibg=" . s:Red[0]
execute "hi Identifier gui=bold guifg=" . s:Red[3]
execute "hi Ignore guifg=" . s:Red[1]
execute "hi Operator gui=bold guifg=" . s:Red[5]
execute "hi PreProc gui=bold guifg=" . s:Red[3]
execute "hi Repeat gui=bold guifg=" . s:LightBlue[3]
execute "hi Special guifg=" . s:LightBlue[1]
execute "hi Statement gui=bold guifg=" . s:LightBlue[2]
execute "hi String guifg=" . s:DarkBlue[2]
execute "hi Title guifg=" . s:White[0]
execute "hi Todo gui=bold guisp=NONE guibg=NONE guifg=" . s:Red[4]
execute "hi Type guifg=" . s:LightBlue[4]
execute "hi Underlined gui=underline guifg=" . s:LightBlue[0]
" }}}
" {{{ groups
"execute "hi CursorIM TODO
"execute "hi DiffAdd
"execute "hi DiffChange
"execute "hi DiffDelete
"execute "hi DiffText
execute "hi Directory guifg=" . s:LightBlue[0]
"execute "hi Scrollbar TODO
"execute "hi SignColumn
"execute "hi SpecialKey guifg=" . s:Red[2]
"execute "hi SpellBad
"execute "hi SpellCap
"execute "hi SpellLocal
"execute "hi SpellRare
execute "hi Cursor guibg=" . s:DarkBlue[2] . " guifg=" . s:DarkBlue[0]
execute "hi CursorColumn guibg=" . s:Red[0]
execute "hi CursorLine guibg=" . s:Red[0]
execute "hi ErrorMsg guifg=" . s:White[0] . " guibg=" . s:Red[1]
execute "hi FoldColumn guibg=" . s:Red[0] . " guifg=" . s:Red[2]
execute "hi Folded guibg=" . s:Red[0] . " guifg=" . s:Red[2]
execute "hi IncSearch gui=none guibg=" . s:Red[2] . " guifg=" . s:Red[0]
execute "hi LineNr guibg=" . s:Black[3] . " guifg=" . s:Red[3]
execute "hi MatchParen guibg=" . s:Red[2]
execute "hi ModeMsg guibg=NONE guifg=" . s:LightBlue[2]
execute "hi MoreMsg guibg=NONE guifg=" . s:Red[2]
execute "hi Pmenu guibg=" . s:LightBlue[3] . " guifg=" . s:DarkBlue[0]
execute "hi PmenuSbar guibg=" . s:LightBlue[3] . " guifg=" . s:Red[0]
execute "hi PmenuSel gui=bold guibg=" . s:LightBlue[3] . " guifg=" . s:Red[4]
execute "hi PmenuThumb guibg=" . s:LightBlue[3] . " guifg=" . s:Red[4]
execute "hi Question guifg=" . s:Red[2]
execute "hi Search gui=bold guisp=NONE guibg=" . s:LightBlue[4]
execute "hi StatusLine gui=none guibg=" . s:LightBlue[2] . " guifg=" . s:LightBlue[0]
execute "hi StatusLineNC gui=none guibg=" . s:Red[1] . " guifg=" . s:Red[4]
execute "hi TabLine guibg=" . s:Red[1] . " guifg=" . s:Red[3]
execute "hi TabLineFill guifg=" . s:Red[1]
execute "hi TabLineSel guibg=" . s:LightBlue[3] . " guifg=" . s:DarkBlue[0]
execute "hi Title gui=bold guifg=" . s:Red[3]
execute "hi VertSplit gui=none guibg=" . s:Red[1] . " guifg=" . s:Red[4]
execute "hi Visual guibg=" . s:Red[4] . " guifg=" . s:Red[0]
execute "hi VisualNOS gui=underline guibg=NONE"
execute "hi WarningMsg guifg=" . s:Red[3]
execute "hi WildMenu guifg=" . s:Red[0] . " guibg=" . s:Red[4]
" }}}
" {{{ GUI
"hi Menu TODO
"hi Scrollbar TODO
execute "hi Tooltip gui=none guibg=" . s:LightBlue[0] . " guifg=" . s:White[1]
" }}}
"
" vim:foldmethod=marker:

View File

@ -0,0 +1,346 @@
" Base16 Vim original template by Chris Kempson (https://github.com/chriskempson/base16-vim)
" Scheme: Atelier_Cave by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/cave)
" This enables the coresponding base16-shell script to run so that
" :colorscheme works in terminals supported by base16-shell scripts
" User must set this variable in .vimrc
" let g:base16_shell_path=base16-builder/output/shell/
if !has('gui_running')
if exists("g:base16_shell_path")
execute "silent !/bin/sh ".g:base16_shell_path."/Atelier_CaveDark.".&background.".sh"
endif
endif
" GUI color definitions
let s:gui00 = "19171c"
let s:gui01 = "26232a"
let s:gui02 = "585260"
let s:gui03 = "655f6d"
let s:gui04 = "7e7887"
let s:gui05 = "8b8792"
let s:gui06 = "e2dfe7"
let s:gui07 = "efecf4"
let s:gui08 = "be4678"
let s:gui09 = "aa573c"
let s:gui0A = "a06e3b"
let s:gui0B = "2a9292"
let s:gui0C = "398bc6"
let s:gui0D = "576ddb"
let s:gui0E = "955ae7"
let s:gui0F = "bf40bf"
" Terminal color definitions
let s:cterm00 = "234 "
let s:cterm03 = "241 "
let s:cterm05 = "245 "
let s:cterm07 = "231 "
let s:cterm08 = "132 "
let s:cterm0A = "130 "
let s:cterm0B = "30 "
let s:cterm0C = "67 "
let s:cterm0D = "63 "
let s:cterm0E = "99 "
if exists('base16colorspace') && base16colorspace == "256"
let s:cterm01 = "235 "
let s:cterm02 = "240 "
let s:cterm04 = "243 "
let s:cterm06 = "254 "
let s:cterm09 = "131 "
let s:cterm0F = "164 "
else
let s:cterm01 = "235 "
let s:cterm02 = "240 "
let s:cterm04 = "243 "
let s:cterm06 = "254 "
let s:cterm09 = "131 "
let s:cterm0F = "164 "
endif
" Theme setup
hi clear
syntax reset
let g:colors_name = "Atelier_CaveDark"
" Highlighting function
fun <sid>hi(group, guifg, guibg, ctermfg, ctermbg, attr, guisp)
if a:guifg != ""
exec "hi " . a:group . " guifg=#" . s:gui(a:guifg)
endif
if a:guibg != ""
exec "hi " . a:group . " guibg=#" . s:gui(a:guibg)
endif
if a:ctermfg != ""
exec "hi " . a:group . " ctermfg=" . s:cterm(a:ctermfg)
endif
if a:ctermbg != ""
exec "hi " . a:group . " ctermbg=" . s:cterm(a:ctermbg)
endif
if a:attr != ""
exec "hi " . a:group . " gui=" . a:attr . " cterm=" . a:attr
endif
if a:guisp != ""
exec "hi " . a:group . " guisp=#" . a:guisp
endif
endfun
" Return GUI color for light/dark variants
fun s:gui(color)
if &background == "dark"
return a:color
endif
if a:color == s:gui00
return s:gui07
elseif a:color == s:gui01
return s:gui06
elseif a:color == s:gui02
return s:gui05
elseif a:color == s:gui03
return s:gui04
elseif a:color == s:gui04
return s:gui03
elseif a:color == s:gui05
return s:gui02
elseif a:color == s:gui06
return s:gui01
elseif a:color == s:gui07
return s:gui00
endif
return a:color
endfun
" Return terminal color for light/dark variants
fun s:cterm(color)
if &background == "dark"
return a:color
endif
" if a:color == s:cterm00
" return s:cterm07
" elseif a:color == s:cterm01
" return s:cterm06
" elseif a:color == s:cterm02
" return s:cterm05
" elseif a:color == s:cterm03
" return s:cterm04
" elseif a:color == s:cterm04
" return s:cterm03
" elseif a:color == s:cterm05
" return s:cterm02
" elseif a:color == s:cterm06
" return s:cterm01
" elseif a:color == s:cterm07
" return s:cterm00
" endif
return a:color
endfun
" Vim editor colors
call <sid>hi("Bold", "", "", "", "", "bold", "")
call <sid>hi("Debug", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("Directory", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("Error", s:gui00, s:gui08, s:cterm00, s:cterm08, "", "")
call <sid>hi("ErrorMsg", s:gui08, s:gui00, s:cterm08, s:cterm00, "", "")
call <sid>hi("Exception", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("FoldColumn", s:gui0C, s:gui01, s:cterm0C, s:cterm01, "", "")
call <sid>hi("Folded", s:gui03, s:gui01, s:cterm03, s:cterm01, "", "")
call <sid>hi("IncSearch", s:gui01, s:gui09, s:cterm01, s:cterm09, "none", "")
call <sid>hi("Italic", "", "", "", "", "none", "")
call <sid>hi("Macro", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("MatchParen", s:gui00, s:gui03, s:cterm00, s:cterm03, "", "")
call <sid>hi("ModeMsg", s:gui0B, "", s:cterm0B, "", "", "")
call <sid>hi("MoreMsg", s:gui0B, "", s:cterm0B, "", "", "")
call <sid>hi("Question", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("Search", s:gui06, s:gui0A, s:cterm06, s:cterm0A, "", "")
call <sid>hi("SpecialKey", s:gui03, "", s:cterm03, "", "", "")
call <sid>hi("TooLong", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("Underlined", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("Visual", "", s:gui02, "", s:cterm02, "", "")
call <sid>hi("VisualNOS", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("WarningMsg", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("WildMenu", s:gui08, s:gui0A, s:cterm08, "", "", "")
call <sid>hi("Title", s:gui0D, "", s:cterm0D, "", "none", "")
call <sid>hi("Conceal", s:gui0D, s:gui00, s:cterm0D, s:cterm00, "", "")
call <sid>hi("Cursor", s:gui00, s:gui05, s:cterm00, s:cterm05, "", "")
call <sid>hi("NonText", s:gui03, "", s:cterm03, "", "", "")
call <sid>hi("Normal", s:gui05, s:gui00, s:cterm05, s:cterm00, "", "")
call <sid>hi("LineNr", s:gui02, s:gui01, s:cterm02, s:cterm01, "", "")
call <sid>hi("SignColumn", s:gui03, s:gui01, s:cterm03, s:cterm01, "", "")
call <sid>hi("StatusLine", s:gui04, s:gui02, s:cterm04, s:cterm02, "none", "")
call <sid>hi("StatusLineNC", s:gui03, s:gui01, s:cterm03, s:cterm01, "none", "")
call <sid>hi("VertSplit", s:gui00, s:gui00, s:cterm00, s:cterm00, "none", "")
call <sid>hi("ColorColumn", "", s:gui01, "", s:cterm01, "none", "")
call <sid>hi("CursorColumn", "", s:gui01, "", s:cterm01, "none", "")
call <sid>hi("CursorLine", "", s:gui01, "", s:cterm01, "none", "")
call <sid>hi("CursorLineNr", s:gui03, s:gui01, s:cterm03, s:cterm01, "", "")
call <sid>hi("PMenu", s:gui04, s:gui01, s:cterm04, s:cterm01, "none", "")
call <sid>hi("PMenuSel", s:gui01, s:gui04, s:cterm01, s:cterm04, "", "")
call <sid>hi("TabLine", s:gui03, s:gui01, s:cterm03, s:cterm01, "none", "")
call <sid>hi("TabLineFill", s:gui03, s:gui01, s:cterm03, s:cterm01, "none", "")
call <sid>hi("TabLineSel", s:gui0B, s:gui01, s:cterm0B, s:cterm01, "none", "")
" Standard syntax highlighting
call <sid>hi("Boolean", s:gui09, "", s:cterm09, "", "", "")
call <sid>hi("Character", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("Comment", s:gui03, "", s:cterm03, "", "", "")
call <sid>hi("Conditional", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("Constant", s:gui09, "", s:cterm09, "", "", "")
call <sid>hi("Define", s:gui0E, "", s:cterm0E, "", "none", "")
call <sid>hi("Delimiter", s:gui0F, "", s:cterm0F, "", "", "")
call <sid>hi("Float", s:gui09, "", s:cterm09, "", "", "")
call <sid>hi("Function", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("Identifier", s:gui08, "", s:cterm08, "", "none", "")
call <sid>hi("Include", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("Keyword", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("Label", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("Number", s:gui09, "", s:cterm09, "", "", "")
call <sid>hi("Operator", s:gui05, "", s:cterm05, "", "none", "")
call <sid>hi("PreProc", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("Repeat", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("Special", s:gui0C, "", s:cterm0C, "", "", "")
call <sid>hi("SpecialChar", s:gui0F, "", s:cterm0F, "", "", "")
call <sid>hi("Statement", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("StorageClass", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("String", s:gui0B, "", s:cterm0B, "", "", "")
call <sid>hi("Structure", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("Tag", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("Todo", s:gui0A, s:gui01, s:cterm0A, s:cterm01, "", "")
call <sid>hi("Type", s:gui0A, "", s:cterm0A, "", "none", "")
call <sid>hi("Typedef", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("Noise", s:gui02, "", s:cterm02, "", "", "")
" C highlighting
call <sid>hi("cOperator", s:gui0C, "", s:cterm0C, "", "", "")
call <sid>hi("cPreCondit", s:gui0E, "", s:cterm0E, "", "", "")
" C# highlighting
call <sid>hi("csClass", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("csAttribute", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("csModifier", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("csType", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("csUnspecifiedStatement", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("csContextualStatement", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("csNewDecleration", s:gui08, "", s:cterm08, "", "", "")
" CSS highlighting
call <sid>hi("cssBraces", s:gui02, "", s:cterm02, "", "", "")
call <sid>hi("cssClassName", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("cssColor", s:gui0C, "", s:cterm0C, "", "", "")
" Diff highlighting
call <sid>hi("DiffAdd", s:gui0B, s:gui01, s:cterm0B, s:cterm01, "", "")
call <sid>hi("DiffChange", s:gui03, s:gui01, s:cterm03, s:cterm01, "", "")
call <sid>hi("DiffDelete", s:gui08, s:gui01, s:cterm08, s:cterm01, "", "")
call <sid>hi("DiffText", s:gui0D, s:gui01, s:cterm0D, s:cterm01, "", "")
call <sid>hi("DiffAdded", s:gui0B, s:gui00, s:cterm0B, s:cterm00, "", "")
call <sid>hi("DiffFile", s:gui08, s:gui00, s:cterm08, s:cterm00, "", "")
call <sid>hi("DiffNewFile", s:gui0B, s:gui00, s:cterm0B, s:cterm00, "", "")
call <sid>hi("DiffLine", s:gui0D, s:gui00, s:cterm0D, s:cterm00, "", "")
call <sid>hi("DiffRemoved", s:gui08, s:gui00, s:cterm08, s:cterm00, "", "")
" Git highlighting
call <sid>hi("gitCommitOverflow", s:gui08, "", s:cterm08, "", "", "")
" call <sid>hi("gitCommitSummary", s:gui0B, "", s:cterm0B, "", "", "")
call <sid>hi("gitCommitSummary", s:gui05, "", s:cterm05, "none", "none", "")
" GitGutter highlighting
call <sid>hi("GitGutterAdd", s:gui0B, s:gui01, s:cterm0B, s:cterm01, "", "")
call <sid>hi("GitGutterChange", s:gui0D, s:gui01, s:cterm0D, s:cterm01, "", "")
call <sid>hi("GitGutterDelete", s:gui08, s:gui01, s:cterm08, s:cterm01, "", "")
call <sid>hi("GitGutterChangeDelete", s:gui0E, s:gui01, s:cterm0E, s:cterm01, "", "")
" HTML highlighting
call <sid>hi("htmlBold", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("htmlItalic", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("htmlEndTag", s:gui02, "", s:cterm02, "", "", "")
call <sid>hi("htmlTag", s:gui02, "", s:cterm02, "", "", "")
" JavaScript highlighting
call <sid>hi("javaScript", s:gui05, "", s:cterm05, "", "", "")
call <sid>hi("javaScriptBraces", s:gui05, "", s:cterm05, "", "", "")
call <sid>hi("javaScriptNumber", s:gui09, "", s:cterm09, "", "", "")
" pangloss/vim-javascript highlighting
call <sid>hi("jsOperator", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("jsStatement", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("jsReturn", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("jsThis", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("jsClassDefinition", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("jsFunction", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("jsFuncName", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("jsFuncCall", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("jsClassFuncName", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("jsClassMethodType", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("jsRegexpString", s:gui0C, "", s:cterm0C, "", "", "")
call <sid>hi("jsGlobalObjects", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("jsGlobalNodeObjects", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("jsExceptions", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("jsBuiltins", s:gui0A, "", s:cterm0A, "", "", "")
" Mail highlighting
call <sid>hi("mailQuoted1", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("mailQuoted2", s:gui0B, "", s:cterm0B, "", "", "")
call <sid>hi("mailQuoted3", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("mailQuoted4", s:gui0C, "", s:cterm0C, "", "", "")
call <sid>hi("mailQuoted5", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("mailQuoted6", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("mailURL", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("mailEmail", s:gui0D, "", s:cterm0D, "", "", "")
" Markdown highlighting
call <sid>hi("markdownCode", s:gui0B, "", s:cterm0B, "", "", "")
call <sid>hi("markdownError", s:gui05, s:gui00, s:cterm05, s:cterm00, "", "")
call <sid>hi("markdownCodeBlock", s:gui0B, "", s:cterm0B, "", "", "")
call <sid>hi("markdownHeadingDelimiter", s:gui0D, "", s:cterm0D, "", "", "")
" NERDTree highlighting
call <sid>hi("NERDTreeDirSlash", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("NERDTreeExecFile", s:gui05, "", s:cterm05, "", "", "")
" PHP highlighting
call <sid>hi("phpMemberSelector", s:gui05, "", s:cterm05, "", "", "")
call <sid>hi("phpComparison", s:gui05, "", s:cterm05, "", "", "")
call <sid>hi("phpParent", s:gui05, "", s:cterm05, "", "", "")
" Python highlighting
call <sid>hi("pythonOperator", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("pythonRepeat", s:gui0E, "", s:cterm0E, "", "", "")
" Ruby highlighting
call <sid>hi("rubyAttribute", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("rubyConstant", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("rubyInterpolation", s:gui0B, "", s:cterm0B, "", "", "")
call <sid>hi("rubyInterpolationDelimiter", s:gui0F, "", s:cterm0F, "", "", "")
call <sid>hi("rubyRegexp", s:gui0C, "", s:cterm0C, "", "", "")
call <sid>hi("rubySymbol", s:gui0B, "", s:cterm0B, "", "", "")
call <sid>hi("rubyStringDelimiter", s:gui0B, "", s:cterm0B, "", "", "")
" SASS highlighting
call <sid>hi("sassidChar", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("sassClassChar", s:gui09, "", s:cterm09, "", "", "")
call <sid>hi("sassInclude", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("sassMixing", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("sassMixinName", s:gui0D, "", s:cterm0D, "", "", "")
" Signify highlighting
call <sid>hi("SignifySignAdd", s:gui0B, s:gui01, s:cterm0B, s:cterm01, "", "")
call <sid>hi("SignifySignChange", s:gui0D, s:gui01, s:cterm0D, s:cterm01, "", "")
call <sid>hi("SignifySignDelete", s:gui08, s:gui01, s:cterm08, s:cterm01, "", "")
" Spelling highlighting
call <sid>hi("SpellBad", "", s:gui00, "", s:cterm00, "undercurl", s:gui08)
call <sid>hi("SpellLocal", "", s:gui00, "", s:cterm00, "undercurl", s:gui0C)
call <sid>hi("SpellCap", "", s:gui00, "", s:cterm00, "undercurl", s:gui0D)
call <sid>hi("SpellRare", "", s:gui00, "", s:cterm00, "undercurl", s:gui0E)
" Remove functions
delf <sid>hi
delf <sid>gui
delf <sid>cterm
" Remove color variables
unlet s:gui00 s:gui01 s:gui02 s:gui03 s:gui04 s:gui05 s:gui06 s:gui07 s:gui08 s:gui09 s:gui0A s:gui0B s:gui0C s:gui0D s:gui0E s:gui0F
unlet s:cterm00 s:cterm01 s:cterm02 s:cterm03 s:cterm04 s:cterm05 s:cterm06 s:cterm07 s:cterm08 s:cterm09 s:cterm0A s:cterm0B s:cterm0C s:cterm0D s:cterm0E s:cterm0F

View File

@ -0,0 +1,346 @@
" Base16 Vim original template by Chris Kempson (https://github.com/chriskempson/base16-vim)
" Scheme: Atelier_Cave by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/cave)
" This enables the coresponding base16-shell script to run so that
" :colorscheme works in terminals supported by base16-shell scripts
" User must set this variable in .vimrc
" let g:base16_shell_path=base16-builder/output/shell/
if !has('gui_running')
if exists("g:base16_shell_path")
execute "silent !/bin/sh ".g:base16_shell_path."/Atelier_CaveLight.".&background.".sh"
endif
endif
" GUI color definitions
let s:gui00 = "19171c"
let s:gui01 = "26232a"
let s:gui02 = "585260"
let s:gui03 = "655f6d"
let s:gui04 = "7e7887"
let s:gui05 = "8b8792"
let s:gui06 = "e2dfe7"
let s:gui07 = "efecf4"
let s:gui08 = "be4678"
let s:gui09 = "aa573c"
let s:gui0A = "a06e3b"
let s:gui0B = "2a9292"
let s:gui0C = "398bc6"
let s:gui0D = "576ddb"
let s:gui0E = "955ae7"
let s:gui0F = "bf40bf"
" Terminal color definitions
let s:cterm00 = "234 "
let s:cterm03 = "241 "
let s:cterm05 = "245 "
let s:cterm07 = "231 "
let s:cterm08 = "132 "
let s:cterm0A = "130 "
let s:cterm0B = "30 "
let s:cterm0C = "67 "
let s:cterm0D = "63 "
let s:cterm0E = "99 "
if exists('base16colorspace') && base16colorspace == "256"
let s:cterm01 = "235 "
let s:cterm02 = "240 "
let s:cterm04 = "243 "
let s:cterm06 = "254 "
let s:cterm09 = "131 "
let s:cterm0F = "164 "
else
let s:cterm01 = "235 "
let s:cterm02 = "240 "
let s:cterm04 = "243 "
let s:cterm06 = "254 "
let s:cterm09 = "131 "
let s:cterm0F = "164 "
endif
" Theme setup
hi clear
syntax reset
let g:colors_name = "Atelier_CaveLight"
" Highlighting function
fun <sid>hi(group, guifg, guibg, ctermfg, ctermbg, attr, guisp)
if a:guifg != ""
exec "hi " . a:group . " guifg=#" . s:gui(a:guifg)
endif
if a:guibg != ""
exec "hi " . a:group . " guibg=#" . s:gui(a:guibg)
endif
if a:ctermfg != ""
exec "hi " . a:group . " ctermfg=" . s:cterm(a:ctermfg)
endif
if a:ctermbg != ""
exec "hi " . a:group . " ctermbg=" . s:cterm(a:ctermbg)
endif
if a:attr != ""
exec "hi " . a:group . " gui=" . a:attr . " cterm=" . a:attr
endif
if a:guisp != ""
exec "hi " . a:group . " guisp=#" . a:guisp
endif
endfun
" Return GUI color for light/dark variants
fun s:gui(color)
if &background == "dark"
return a:color
endif
if a:color == s:gui00
return s:gui07
elseif a:color == s:gui01
return s:gui06
elseif a:color == s:gui02
return s:gui05
elseif a:color == s:gui03
return s:gui04
elseif a:color == s:gui04
return s:gui03
elseif a:color == s:gui05
return s:gui02
elseif a:color == s:gui06
return s:gui01
elseif a:color == s:gui07
return s:gui00
endif
return a:color
endfun
" Return terminal color for light/dark variants
fun s:cterm(color)
if &background == "dark"
return a:color
endif
if a:color == s:cterm00
return s:cterm07
elseif a:color == s:cterm01
return s:cterm06
elseif a:color == s:cterm02
return s:cterm05
elseif a:color == s:cterm03
return s:cterm04
elseif a:color == s:cterm04
return s:cterm03
elseif a:color == s:cterm05
return s:cterm02
elseif a:color == s:cterm06
return s:cterm01
elseif a:color == s:cterm07
return s:cterm00
endif
return a:color
endfun
" Vim editor colors
call <sid>hi("Bold", "", "", "", "", "bold", "")
call <sid>hi("Debug", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("Directory", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("Error", s:gui00, s:gui08, s:cterm00, s:cterm08, "", "")
call <sid>hi("ErrorMsg", s:gui08, s:gui00, s:cterm08, s:cterm00, "", "")
call <sid>hi("Exception", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("FoldColumn", s:gui0C, s:gui01, s:cterm0C, s:cterm01, "", "")
call <sid>hi("Folded", s:gui03, s:gui01, s:cterm03, s:cterm01, "", "")
call <sid>hi("IncSearch", s:gui01, s:gui09, s:cterm01, s:cterm09, "none", "")
call <sid>hi("Italic", "", "", "", "", "none", "")
call <sid>hi("Macro", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("MatchParen", s:gui00, s:gui03, s:cterm00, s:cterm03, "", "")
call <sid>hi("ModeMsg", s:gui0B, "", s:cterm0B, "", "", "")
call <sid>hi("MoreMsg", s:gui0B, "", s:cterm0B, "", "", "")
call <sid>hi("Question", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("Search", s:gui06, s:gui0A, s:cterm06, s:cterm0A, "", "")
call <sid>hi("SpecialKey", s:gui03, "", s:cterm03, "", "", "")
call <sid>hi("TooLong", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("Underlined", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("Visual", "", s:gui02, "", s:cterm02, "", "")
call <sid>hi("VisualNOS", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("WarningMsg", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("WildMenu", s:gui08, s:gui0A, s:cterm08, "", "", "")
call <sid>hi("Title", s:gui0D, "", s:cterm0D, "", "none", "")
call <sid>hi("Conceal", s:gui0D, s:gui00, s:cterm0D, s:cterm00, "", "")
call <sid>hi("Cursor", s:gui00, s:gui05, s:cterm00, s:cterm05, "", "")
call <sid>hi("NonText", s:gui03, "", s:cterm03, "", "", "")
call <sid>hi("Normal", s:gui05, s:gui00, s:cterm05, s:cterm00, "", "")
call <sid>hi("LineNr", s:gui02, s:gui01, s:cterm02, s:cterm01, "", "")
call <sid>hi("SignColumn", s:gui03, s:gui01, s:cterm03, s:cterm01, "", "")
call <sid>hi("StatusLine", s:gui04, s:gui02, s:cterm04, s:cterm02, "none", "")
call <sid>hi("StatusLineNC", s:gui03, s:gui01, s:cterm03, s:cterm01, "none", "")
call <sid>hi("VertSplit", s:gui00, s:gui00, s:cterm00, s:cterm00, "none", "")
call <sid>hi("ColorColumn", "", s:gui01, "", s:cterm01, "none", "")
call <sid>hi("CursorColumn", "", s:gui01, "", s:cterm01, "none", "")
call <sid>hi("CursorLine", "", s:gui01, "", s:cterm01, "none", "")
call <sid>hi("CursorLineNr", s:gui03, s:gui01, s:cterm03, s:cterm01, "", "")
call <sid>hi("PMenu", s:gui04, s:gui01, s:cterm04, s:cterm01, "none", "")
call <sid>hi("PMenuSel", s:gui01, s:gui04, s:cterm01, s:cterm04, "", "")
call <sid>hi("TabLine", s:gui03, s:gui01, s:cterm03, s:cterm01, "none", "")
call <sid>hi("TabLineFill", s:gui03, s:gui01, s:cterm03, s:cterm01, "none", "")
call <sid>hi("TabLineSel", s:gui0B, s:gui01, s:cterm0B, s:cterm01, "none", "")
" Standard syntax highlighting
call <sid>hi("Boolean", s:gui09, "", s:cterm09, "", "", "")
call <sid>hi("Character", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("Comment", s:gui03, "", s:cterm03, "", "", "")
call <sid>hi("Conditional", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("Constant", s:gui09, "", s:cterm09, "", "", "")
call <sid>hi("Define", s:gui0E, "", s:cterm0E, "", "none", "")
call <sid>hi("Delimiter", s:gui0F, "", s:cterm0F, "", "", "")
call <sid>hi("Float", s:gui09, "", s:cterm09, "", "", "")
call <sid>hi("Function", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("Identifier", s:gui08, "", s:cterm08, "", "none", "")
call <sid>hi("Include", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("Keyword", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("Label", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("Number", s:gui09, "", s:cterm09, "", "", "")
call <sid>hi("Operator", s:gui05, "", s:cterm05, "", "none", "")
call <sid>hi("PreProc", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("Repeat", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("Special", s:gui0C, "", s:cterm0C, "", "", "")
call <sid>hi("SpecialChar", s:gui0F, "", s:cterm0F, "", "", "")
call <sid>hi("Statement", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("StorageClass", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("String", s:gui0B, "", s:cterm0B, "", "", "")
call <sid>hi("Structure", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("Tag", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("Todo", s:gui0A, s:gui01, s:cterm0A, s:cterm01, "", "")
call <sid>hi("Type", s:gui0A, "", s:cterm0A, "", "none", "")
call <sid>hi("Typedef", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("Noise", s:gui01, "", s:cterm01, "", "", "")
" C highlighting
call <sid>hi("cOperator", s:gui0C, "", s:cterm0C, "", "", "")
call <sid>hi("cPreCondit", s:gui0E, "", s:cterm0E, "", "", "")
" C# highlighting
call <sid>hi("csClass", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("csAttribute", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("csModifier", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("csType", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("csUnspecifiedStatement", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("csContextualStatement", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("csNewDecleration", s:gui08, "", s:cterm08, "", "", "")
" CSS highlighting
call <sid>hi("cssBraces", s:gui01, "", s:cterm01, "", "", "")
call <sid>hi("cssClassName", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("cssColor", s:gui0C, "", s:cterm0C, "", "", "")
" Diff highlighting
call <sid>hi("DiffAdd", s:gui0B, s:gui01, s:cterm0B, s:cterm01, "", "")
call <sid>hi("DiffChange", s:gui03, s:gui01, s:cterm03, s:cterm01, "", "")
call <sid>hi("DiffDelete", s:gui08, s:gui01, s:cterm08, s:cterm01, "", "")
call <sid>hi("DiffText", s:gui0D, s:gui01, s:cterm0D, s:cterm01, "", "")
call <sid>hi("DiffAdded", s:gui0B, s:gui00, s:cterm0B, s:cterm00, "", "")
call <sid>hi("DiffFile", s:gui08, s:gui00, s:cterm08, s:cterm00, "", "")
call <sid>hi("DiffNewFile", s:gui0B, s:gui00, s:cterm0B, s:cterm00, "", "")
call <sid>hi("DiffLine", s:gui0D, s:gui00, s:cterm0D, s:cterm00, "", "")
call <sid>hi("DiffRemoved", s:gui08, s:gui00, s:cterm08, s:cterm00, "", "")
" Git highlighting
call <sid>hi("gitCommitOverflow", s:gui08, "", s:cterm08, "", "", "")
" call <sid>hi("gitCommitSummary", s:gui0B, "", s:cterm0B, "", "", "")
call <sid>hi("gitCommitSummary", s:gui05, "", s:cterm05, "none", "none", "")
" GitGutter highlighting
call <sid>hi("GitGutterAdd", s:gui0B, s:gui01, s:cterm0B, s:cterm01, "", "")
call <sid>hi("GitGutterChange", s:gui0D, s:gui01, s:cterm0D, s:cterm01, "", "")
call <sid>hi("GitGutterDelete", s:gui08, s:gui01, s:cterm08, s:cterm01, "", "")
call <sid>hi("GitGutterChangeDelete", s:gui0E, s:gui01, s:cterm0E, s:cterm01, "", "")
" HTML highlighting
call <sid>hi("htmlBold", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("htmlItalic", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("htmlEndTag", s:gui01, "", s:cterm01, "", "", "")
call <sid>hi("htmlTag", s:gui01, "", s:cterm01, "", "", "")
" JavaScript highlighting
call <sid>hi("javaScript", s:gui05, "", s:cterm05, "", "", "")
call <sid>hi("javaScriptBraces", s:gui05, "", s:cterm05, "", "", "")
call <sid>hi("javaScriptNumber", s:gui09, "", s:cterm09, "", "", "")
" pangloss/vim-javascript highlighting
call <sid>hi("jsOperator", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("jsStatement", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("jsReturn", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("jsThis", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("jsClassDefinition", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("jsFunction", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("jsFuncName", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("jsFuncCall", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("jsClassFuncName", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("jsClassMethodType", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("jsRegexpString", s:gui0C, "", s:cterm0C, "", "", "")
call <sid>hi("jsGlobalObjects", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("jsGlobalNodeObjects", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("jsExceptions", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("jsBuiltins", s:gui0A, "", s:cterm0A, "", "", "")
" Mail highlighting
call <sid>hi("mailQuoted1", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("mailQuoted2", s:gui0B, "", s:cterm0B, "", "", "")
call <sid>hi("mailQuoted3", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("mailQuoted4", s:gui0C, "", s:cterm0C, "", "", "")
call <sid>hi("mailQuoted5", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("mailQuoted6", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("mailURL", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("mailEmail", s:gui0D, "", s:cterm0D, "", "", "")
" Markdown highlighting
call <sid>hi("markdownCode", s:gui0B, "", s:cterm0B, "", "", "")
call <sid>hi("markdownError", s:gui05, s:gui00, s:cterm05, s:cterm00, "", "")
call <sid>hi("markdownCodeBlock", s:gui0B, "", s:cterm0B, "", "", "")
call <sid>hi("markdownHeadingDelimiter", s:gui0D, "", s:cterm0D, "", "", "")
" NERDTree highlighting
call <sid>hi("NERDTreeDirSlash", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("NERDTreeExecFile", s:gui05, "", s:cterm05, "", "", "")
" PHP highlighting
call <sid>hi("phpMemberSelector", s:gui05, "", s:cterm05, "", "", "")
call <sid>hi("phpComparison", s:gui05, "", s:cterm05, "", "", "")
call <sid>hi("phpParent", s:gui05, "", s:cterm05, "", "", "")
" Python highlighting
call <sid>hi("pythonOperator", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("pythonRepeat", s:gui0E, "", s:cterm0E, "", "", "")
" Ruby highlighting
call <sid>hi("rubyAttribute", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("rubyConstant", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("rubyInterpolation", s:gui0B, "", s:cterm0B, "", "", "")
call <sid>hi("rubyInterpolationDelimiter", s:gui0F, "", s:cterm0F, "", "", "")
call <sid>hi("rubyRegexp", s:gui0C, "", s:cterm0C, "", "", "")
call <sid>hi("rubySymbol", s:gui0B, "", s:cterm0B, "", "", "")
call <sid>hi("rubyStringDelimiter", s:gui0B, "", s:cterm0B, "", "", "")
" SASS highlighting
call <sid>hi("sassidChar", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("sassClassChar", s:gui09, "", s:cterm09, "", "", "")
call <sid>hi("sassInclude", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("sassMixing", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("sassMixinName", s:gui0D, "", s:cterm0D, "", "", "")
" Signify highlighting
call <sid>hi("SignifySignAdd", s:gui0B, s:gui01, s:cterm0B, s:cterm01, "", "")
call <sid>hi("SignifySignChange", s:gui0D, s:gui01, s:cterm0D, s:cterm01, "", "")
call <sid>hi("SignifySignDelete", s:gui08, s:gui01, s:cterm08, s:cterm01, "", "")
" Spelling highlighting
call <sid>hi("SpellBad", "", s:gui00, "", s:cterm00, "undercurl", s:gui08)
call <sid>hi("SpellLocal", "", s:gui00, "", s:cterm00, "undercurl", s:gui0C)
call <sid>hi("SpellCap", "", s:gui00, "", s:cterm00, "undercurl", s:gui0D)
call <sid>hi("SpellRare", "", s:gui00, "", s:cterm00, "undercurl", s:gui0E)
" Remove functions
delf <sid>hi
delf <sid>gui
delf <sid>cterm
" Remove color variables
unlet s:gui00 s:gui01 s:gui02 s:gui03 s:gui04 s:gui05 s:gui06 s:gui07 s:gui08 s:gui09 s:gui0A s:gui0B s:gui0C s:gui0D s:gui0E s:gui0F
unlet s:cterm00 s:cterm01 s:cterm02 s:cterm03 s:cterm04 s:cterm05 s:cterm06 s:cterm07 s:cterm08 s:cterm09 s:cterm0A s:cterm0B s:cterm0C s:cterm0D s:cterm0E s:cterm0F

View File

@ -0,0 +1,346 @@
" Base16 Vim original template by Chris Kempson (https://github.com/chriskempson/base16-vim)
" Scheme: Atelier_Dune by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/dune)
" This enables the coresponding base16-shell script to run so that
" :colorscheme works in terminals supported by base16-shell scripts
" User must set this variable in .vimrc
" let g:base16_shell_path=base16-builder/output/shell/
if !has('gui_running')
if exists("g:base16_shell_path")
execute "silent !/bin/sh ".g:base16_shell_path."/Atelier_DuneDark.".&background.".sh"
endif
endif
" GUI color definitions
let s:gui00 = "20201d"
let s:gui01 = "292824"
let s:gui02 = "6e6b5e"
let s:gui03 = "7d7a68"
let s:gui04 = "999580"
let s:gui05 = "a6a28c"
let s:gui06 = "e8e4cf"
let s:gui07 = "fefbec"
let s:gui08 = "d73737"
let s:gui09 = "b65611"
let s:gui0A = "ae9513"
let s:gui0B = "60ac39"
let s:gui0C = "1fad83"
let s:gui0D = "6684e1"
let s:gui0E = "b854d4"
let s:gui0F = "d43552"
" Terminal color definitions
let s:cterm00 = "234 "
let s:cterm03 = "244 "
let s:cterm05 = "248 "
let s:cterm07 = "231 "
let s:cterm08 = "160 "
let s:cterm0A = "136 "
let s:cterm0B = "70 "
let s:cterm0C = "36 "
let s:cterm0D = "69 "
let s:cterm0E = "135 "
if exists('base16colorspace') && base16colorspace == "256"
let s:cterm01 = "235 "
let s:cterm02 = "242 "
let s:cterm04 = "246 "
let s:cterm06 = "254 "
let s:cterm09 = "130 "
let s:cterm0F = "161 "
else
let s:cterm01 = "235 "
let s:cterm02 = "242 "
let s:cterm04 = "246 "
let s:cterm06 = "254 "
let s:cterm09 = "130 "
let s:cterm0F = "161 "
endif
" Theme setup
hi clear
syntax reset
let g:colors_name = "Atelier_DuneDark"
" Highlighting function
fun <sid>hi(group, guifg, guibg, ctermfg, ctermbg, attr, guisp)
if a:guifg != ""
exec "hi " . a:group . " guifg=#" . s:gui(a:guifg)
endif
if a:guibg != ""
exec "hi " . a:group . " guibg=#" . s:gui(a:guibg)
endif
if a:ctermfg != ""
exec "hi " . a:group . " ctermfg=" . s:cterm(a:ctermfg)
endif
if a:ctermbg != ""
exec "hi " . a:group . " ctermbg=" . s:cterm(a:ctermbg)
endif
if a:attr != ""
exec "hi " . a:group . " gui=" . a:attr . " cterm=" . a:attr
endif
if a:guisp != ""
exec "hi " . a:group . " guisp=#" . a:guisp
endif
endfun
" Return GUI color for light/dark variants
fun s:gui(color)
if &background == "dark"
return a:color
endif
if a:color == s:gui00
return s:gui07
elseif a:color == s:gui01
return s:gui06
elseif a:color == s:gui02
return s:gui05
elseif a:color == s:gui03
return s:gui04
elseif a:color == s:gui04
return s:gui03
elseif a:color == s:gui05
return s:gui02
elseif a:color == s:gui06
return s:gui01
elseif a:color == s:gui07
return s:gui00
endif
return a:color
endfun
" Return terminal color for light/dark variants
fun s:cterm(color)
if &background == "dark"
return a:color
endif
" if a:color == s:cterm00
" return s:cterm07
" elseif a:color == s:cterm01
" return s:cterm06
" elseif a:color == s:cterm02
" return s:cterm05
" elseif a:color == s:cterm03
" return s:cterm04
" elseif a:color == s:cterm04
" return s:cterm03
" elseif a:color == s:cterm05
" return s:cterm02
" elseif a:color == s:cterm06
" return s:cterm01
" elseif a:color == s:cterm07
" return s:cterm00
" endif
return a:color
endfun
" Vim editor colors
call <sid>hi("Bold", "", "", "", "", "bold", "")
call <sid>hi("Debug", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("Directory", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("Error", s:gui00, s:gui08, s:cterm00, s:cterm08, "", "")
call <sid>hi("ErrorMsg", s:gui08, s:gui00, s:cterm08, s:cterm00, "", "")
call <sid>hi("Exception", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("FoldColumn", s:gui0C, s:gui01, s:cterm0C, s:cterm01, "", "")
call <sid>hi("Folded", s:gui03, s:gui01, s:cterm03, s:cterm01, "", "")
call <sid>hi("IncSearch", s:gui01, s:gui09, s:cterm01, s:cterm09, "none", "")
call <sid>hi("Italic", "", "", "", "", "none", "")
call <sid>hi("Macro", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("MatchParen", s:gui00, s:gui03, s:cterm00, s:cterm03, "", "")
call <sid>hi("ModeMsg", s:gui0B, "", s:cterm0B, "", "", "")
call <sid>hi("MoreMsg", s:gui0B, "", s:cterm0B, "", "", "")
call <sid>hi("Question", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("Search", s:gui06, s:gui0A, s:cterm06, s:cterm0A, "", "")
call <sid>hi("SpecialKey", s:gui03, "", s:cterm03, "", "", "")
call <sid>hi("TooLong", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("Underlined", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("Visual", "", s:gui02, "", s:cterm02, "", "")
call <sid>hi("VisualNOS", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("WarningMsg", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("WildMenu", s:gui08, s:gui0A, s:cterm08, "", "", "")
call <sid>hi("Title", s:gui0D, "", s:cterm0D, "", "none", "")
call <sid>hi("Conceal", s:gui0D, s:gui00, s:cterm0D, s:cterm00, "", "")
call <sid>hi("Cursor", s:gui00, s:gui05, s:cterm00, s:cterm05, "", "")
call <sid>hi("NonText", s:gui03, "", s:cterm03, "", "", "")
call <sid>hi("Normal", s:gui05, s:gui00, s:cterm05, s:cterm00, "", "")
call <sid>hi("LineNr", s:gui02, s:gui01, s:cterm02, s:cterm01, "", "")
call <sid>hi("SignColumn", s:gui03, s:gui01, s:cterm03, s:cterm01, "", "")
call <sid>hi("StatusLine", s:gui04, s:gui02, s:cterm04, s:cterm02, "none", "")
call <sid>hi("StatusLineNC", s:gui03, s:gui01, s:cterm03, s:cterm01, "none", "")
call <sid>hi("VertSplit", s:gui00, s:gui00, s:cterm00, s:cterm00, "none", "")
call <sid>hi("ColorColumn", "", s:gui01, "", s:cterm01, "none", "")
call <sid>hi("CursorColumn", "", s:gui01, "", s:cterm01, "none", "")
call <sid>hi("CursorLine", "", s:gui01, "", s:cterm01, "none", "")
call <sid>hi("CursorLineNr", s:gui03, s:gui01, s:cterm03, s:cterm01, "", "")
call <sid>hi("PMenu", s:gui04, s:gui01, s:cterm04, s:cterm01, "none", "")
call <sid>hi("PMenuSel", s:gui01, s:gui04, s:cterm01, s:cterm04, "", "")
call <sid>hi("TabLine", s:gui03, s:gui01, s:cterm03, s:cterm01, "none", "")
call <sid>hi("TabLineFill", s:gui03, s:gui01, s:cterm03, s:cterm01, "none", "")
call <sid>hi("TabLineSel", s:gui0B, s:gui01, s:cterm0B, s:cterm01, "none", "")
" Standard syntax highlighting
call <sid>hi("Boolean", s:gui09, "", s:cterm09, "", "", "")
call <sid>hi("Character", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("Comment", s:gui03, "", s:cterm03, "", "", "")
call <sid>hi("Conditional", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("Constant", s:gui09, "", s:cterm09, "", "", "")
call <sid>hi("Define", s:gui0E, "", s:cterm0E, "", "none", "")
call <sid>hi("Delimiter", s:gui0F, "", s:cterm0F, "", "", "")
call <sid>hi("Float", s:gui09, "", s:cterm09, "", "", "")
call <sid>hi("Function", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("Identifier", s:gui08, "", s:cterm08, "", "none", "")
call <sid>hi("Include", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("Keyword", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("Label", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("Number", s:gui09, "", s:cterm09, "", "", "")
call <sid>hi("Operator", s:gui05, "", s:cterm05, "", "none", "")
call <sid>hi("PreProc", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("Repeat", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("Special", s:gui0C, "", s:cterm0C, "", "", "")
call <sid>hi("SpecialChar", s:gui0F, "", s:cterm0F, "", "", "")
call <sid>hi("Statement", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("StorageClass", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("String", s:gui0B, "", s:cterm0B, "", "", "")
call <sid>hi("Structure", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("Tag", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("Todo", s:gui0A, s:gui01, s:cterm0A, s:cterm01, "", "")
call <sid>hi("Type", s:gui0A, "", s:cterm0A, "", "none", "")
call <sid>hi("Typedef", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("Noise", s:gui02, "", s:cterm02, "", "", "")
" C highlighting
call <sid>hi("cOperator", s:gui0C, "", s:cterm0C, "", "", "")
call <sid>hi("cPreCondit", s:gui0E, "", s:cterm0E, "", "", "")
" C# highlighting
call <sid>hi("csClass", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("csAttribute", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("csModifier", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("csType", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("csUnspecifiedStatement", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("csContextualStatement", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("csNewDecleration", s:gui08, "", s:cterm08, "", "", "")
" CSS highlighting
call <sid>hi("cssBraces", s:gui02, "", s:cterm02, "", "", "")
call <sid>hi("cssClassName", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("cssColor", s:gui0C, "", s:cterm0C, "", "", "")
" Diff highlighting
call <sid>hi("DiffAdd", s:gui0B, s:gui01, s:cterm0B, s:cterm01, "", "")
call <sid>hi("DiffChange", s:gui03, s:gui01, s:cterm03, s:cterm01, "", "")
call <sid>hi("DiffDelete", s:gui08, s:gui01, s:cterm08, s:cterm01, "", "")
call <sid>hi("DiffText", s:gui0D, s:gui01, s:cterm0D, s:cterm01, "", "")
call <sid>hi("DiffAdded", s:gui0B, s:gui00, s:cterm0B, s:cterm00, "", "")
call <sid>hi("DiffFile", s:gui08, s:gui00, s:cterm08, s:cterm00, "", "")
call <sid>hi("DiffNewFile", s:gui0B, s:gui00, s:cterm0B, s:cterm00, "", "")
call <sid>hi("DiffLine", s:gui0D, s:gui00, s:cterm0D, s:cterm00, "", "")
call <sid>hi("DiffRemoved", s:gui08, s:gui00, s:cterm08, s:cterm00, "", "")
" Git highlighting
call <sid>hi("gitCommitOverflow", s:gui08, "", s:cterm08, "", "", "")
" call <sid>hi("gitCommitSummary", s:gui0B, "", s:cterm0B, "", "", "")
call <sid>hi("gitCommitSummary", s:gui05, "", s:cterm05, "none", "none", "")
" GitGutter highlighting
call <sid>hi("GitGutterAdd", s:gui0B, s:gui01, s:cterm0B, s:cterm01, "", "")
call <sid>hi("GitGutterChange", s:gui0D, s:gui01, s:cterm0D, s:cterm01, "", "")
call <sid>hi("GitGutterDelete", s:gui08, s:gui01, s:cterm08, s:cterm01, "", "")
call <sid>hi("GitGutterChangeDelete", s:gui0E, s:gui01, s:cterm0E, s:cterm01, "", "")
" HTML highlighting
call <sid>hi("htmlBold", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("htmlItalic", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("htmlEndTag", s:gui02, "", s:cterm02, "", "", "")
call <sid>hi("htmlTag", s:gui02, "", s:cterm02, "", "", "")
" JavaScript highlighting
call <sid>hi("javaScript", s:gui05, "", s:cterm05, "", "", "")
call <sid>hi("javaScriptBraces", s:gui05, "", s:cterm05, "", "", "")
call <sid>hi("javaScriptNumber", s:gui09, "", s:cterm09, "", "", "")
" pangloss/vim-javascript highlighting
call <sid>hi("jsOperator", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("jsStatement", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("jsReturn", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("jsThis", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("jsClassDefinition", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("jsFunction", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("jsFuncName", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("jsFuncCall", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("jsClassFuncName", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("jsClassMethodType", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("jsRegexpString", s:gui0C, "", s:cterm0C, "", "", "")
call <sid>hi("jsGlobalObjects", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("jsGlobalNodeObjects", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("jsExceptions", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("jsBuiltins", s:gui0A, "", s:cterm0A, "", "", "")
" Mail highlighting
call <sid>hi("mailQuoted1", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("mailQuoted2", s:gui0B, "", s:cterm0B, "", "", "")
call <sid>hi("mailQuoted3", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("mailQuoted4", s:gui0C, "", s:cterm0C, "", "", "")
call <sid>hi("mailQuoted5", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("mailQuoted6", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("mailURL", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("mailEmail", s:gui0D, "", s:cterm0D, "", "", "")
" Markdown highlighting
call <sid>hi("markdownCode", s:gui0B, "", s:cterm0B, "", "", "")
call <sid>hi("markdownError", s:gui05, s:gui00, s:cterm05, s:cterm00, "", "")
call <sid>hi("markdownCodeBlock", s:gui0B, "", s:cterm0B, "", "", "")
call <sid>hi("markdownHeadingDelimiter", s:gui0D, "", s:cterm0D, "", "", "")
" NERDTree highlighting
call <sid>hi("NERDTreeDirSlash", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("NERDTreeExecFile", s:gui05, "", s:cterm05, "", "", "")
" PHP highlighting
call <sid>hi("phpMemberSelector", s:gui05, "", s:cterm05, "", "", "")
call <sid>hi("phpComparison", s:gui05, "", s:cterm05, "", "", "")
call <sid>hi("phpParent", s:gui05, "", s:cterm05, "", "", "")
" Python highlighting
call <sid>hi("pythonOperator", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("pythonRepeat", s:gui0E, "", s:cterm0E, "", "", "")
" Ruby highlighting
call <sid>hi("rubyAttribute", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("rubyConstant", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("rubyInterpolation", s:gui0B, "", s:cterm0B, "", "", "")
call <sid>hi("rubyInterpolationDelimiter", s:gui0F, "", s:cterm0F, "", "", "")
call <sid>hi("rubyRegexp", s:gui0C, "", s:cterm0C, "", "", "")
call <sid>hi("rubySymbol", s:gui0B, "", s:cterm0B, "", "", "")
call <sid>hi("rubyStringDelimiter", s:gui0B, "", s:cterm0B, "", "", "")
" SASS highlighting
call <sid>hi("sassidChar", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("sassClassChar", s:gui09, "", s:cterm09, "", "", "")
call <sid>hi("sassInclude", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("sassMixing", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("sassMixinName", s:gui0D, "", s:cterm0D, "", "", "")
" Signify highlighting
call <sid>hi("SignifySignAdd", s:gui0B, s:gui01, s:cterm0B, s:cterm01, "", "")
call <sid>hi("SignifySignChange", s:gui0D, s:gui01, s:cterm0D, s:cterm01, "", "")
call <sid>hi("SignifySignDelete", s:gui08, s:gui01, s:cterm08, s:cterm01, "", "")
" Spelling highlighting
call <sid>hi("SpellBad", "", s:gui00, "", s:cterm00, "undercurl", s:gui08)
call <sid>hi("SpellLocal", "", s:gui00, "", s:cterm00, "undercurl", s:gui0C)
call <sid>hi("SpellCap", "", s:gui00, "", s:cterm00, "undercurl", s:gui0D)
call <sid>hi("SpellRare", "", s:gui00, "", s:cterm00, "undercurl", s:gui0E)
" Remove functions
delf <sid>hi
delf <sid>gui
delf <sid>cterm
" Remove color variables
unlet s:gui00 s:gui01 s:gui02 s:gui03 s:gui04 s:gui05 s:gui06 s:gui07 s:gui08 s:gui09 s:gui0A s:gui0B s:gui0C s:gui0D s:gui0E s:gui0F
unlet s:cterm00 s:cterm01 s:cterm02 s:cterm03 s:cterm04 s:cterm05 s:cterm06 s:cterm07 s:cterm08 s:cterm09 s:cterm0A s:cterm0B s:cterm0C s:cterm0D s:cterm0E s:cterm0F

View File

@ -0,0 +1,346 @@
" Base16 Vim original template by Chris Kempson (https://github.com/chriskempson/base16-vim)
" Scheme: Atelier_Dune by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/dune)
" This enables the coresponding base16-shell script to run so that
" :colorscheme works in terminals supported by base16-shell scripts
" User must set this variable in .vimrc
" let g:base16_shell_path=base16-builder/output/shell/
if !has('gui_running')
if exists("g:base16_shell_path")
execute "silent !/bin/sh ".g:base16_shell_path."/Atelier_DuneLight.".&background.".sh"
endif
endif
" GUI color definitions
let s:gui00 = "20201d"
let s:gui01 = "292824"
let s:gui02 = "6e6b5e"
let s:gui03 = "7d7a68"
let s:gui04 = "999580"
let s:gui05 = "a6a28c"
let s:gui06 = "e8e4cf"
let s:gui07 = "fefbec"
let s:gui08 = "d73737"
let s:gui09 = "b65611"
let s:gui0A = "ae9513"
let s:gui0B = "60ac39"
let s:gui0C = "1fad83"
let s:gui0D = "6684e1"
let s:gui0E = "b854d4"
let s:gui0F = "d43552"
" Terminal color definitions
let s:cterm00 = "234 "
let s:cterm03 = "244 "
let s:cterm05 = "248 "
let s:cterm07 = "231 "
let s:cterm08 = "160 "
let s:cterm0A = "136 "
let s:cterm0B = "70 "
let s:cterm0C = "36 "
let s:cterm0D = "69 "
let s:cterm0E = "135 "
if exists('base16colorspace') && base16colorspace == "256"
let s:cterm01 = "235 "
let s:cterm02 = "242 "
let s:cterm04 = "246 "
let s:cterm06 = "254 "
let s:cterm09 = "130 "
let s:cterm0F = "161 "
else
let s:cterm01 = "235 "
let s:cterm02 = "242 "
let s:cterm04 = "246 "
let s:cterm06 = "254 "
let s:cterm09 = "130 "
let s:cterm0F = "161 "
endif
" Theme setup
hi clear
syntax reset
let g:colors_name = "Atelier_DuneLight"
" Highlighting function
fun <sid>hi(group, guifg, guibg, ctermfg, ctermbg, attr, guisp)
if a:guifg != ""
exec "hi " . a:group . " guifg=#" . s:gui(a:guifg)
endif
if a:guibg != ""
exec "hi " . a:group . " guibg=#" . s:gui(a:guibg)
endif
if a:ctermfg != ""
exec "hi " . a:group . " ctermfg=" . s:cterm(a:ctermfg)
endif
if a:ctermbg != ""
exec "hi " . a:group . " ctermbg=" . s:cterm(a:ctermbg)
endif
if a:attr != ""
exec "hi " . a:group . " gui=" . a:attr . " cterm=" . a:attr
endif
if a:guisp != ""
exec "hi " . a:group . " guisp=#" . a:guisp
endif
endfun
" Return GUI color for light/dark variants
fun s:gui(color)
if &background == "dark"
return a:color
endif
if a:color == s:gui00
return s:gui07
elseif a:color == s:gui01
return s:gui06
elseif a:color == s:gui02
return s:gui05
elseif a:color == s:gui03
return s:gui04
elseif a:color == s:gui04
return s:gui03
elseif a:color == s:gui05
return s:gui02
elseif a:color == s:gui06
return s:gui01
elseif a:color == s:gui07
return s:gui00
endif
return a:color
endfun
" Return terminal color for light/dark variants
fun s:cterm(color)
if &background == "dark"
return a:color
endif
if a:color == s:cterm00
return s:cterm07
elseif a:color == s:cterm01
return s:cterm06
elseif a:color == s:cterm02
return s:cterm05
elseif a:color == s:cterm03
return s:cterm04
elseif a:color == s:cterm04
return s:cterm03
elseif a:color == s:cterm05
return s:cterm02
elseif a:color == s:cterm06
return s:cterm01
elseif a:color == s:cterm07
return s:cterm00
endif
return a:color
endfun
" Vim editor colors
call <sid>hi("Bold", "", "", "", "", "bold", "")
call <sid>hi("Debug", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("Directory", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("Error", s:gui00, s:gui08, s:cterm00, s:cterm08, "", "")
call <sid>hi("ErrorMsg", s:gui08, s:gui00, s:cterm08, s:cterm00, "", "")
call <sid>hi("Exception", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("FoldColumn", s:gui0C, s:gui01, s:cterm0C, s:cterm01, "", "")
call <sid>hi("Folded", s:gui03, s:gui01, s:cterm03, s:cterm01, "", "")
call <sid>hi("IncSearch", s:gui01, s:gui09, s:cterm01, s:cterm09, "none", "")
call <sid>hi("Italic", "", "", "", "", "none", "")
call <sid>hi("Macro", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("MatchParen", s:gui00, s:gui03, s:cterm00, s:cterm03, "", "")
call <sid>hi("ModeMsg", s:gui0B, "", s:cterm0B, "", "", "")
call <sid>hi("MoreMsg", s:gui0B, "", s:cterm0B, "", "", "")
call <sid>hi("Question", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("Search", s:gui06, s:gui0A, s:cterm06, s:cterm0A, "", "")
call <sid>hi("SpecialKey", s:gui03, "", s:cterm03, "", "", "")
call <sid>hi("TooLong", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("Underlined", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("Visual", "", s:gui02, "", s:cterm02, "", "")
call <sid>hi("VisualNOS", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("WarningMsg", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("WildMenu", s:gui08, s:gui0A, s:cterm08, "", "", "")
call <sid>hi("Title", s:gui0D, "", s:cterm0D, "", "none", "")
call <sid>hi("Conceal", s:gui0D, s:gui00, s:cterm0D, s:cterm00, "", "")
call <sid>hi("Cursor", s:gui00, s:gui05, s:cterm00, s:cterm05, "", "")
call <sid>hi("NonText", s:gui03, "", s:cterm03, "", "", "")
call <sid>hi("Normal", s:gui05, s:gui00, s:cterm05, s:cterm00, "", "")
call <sid>hi("LineNr", s:gui02, s:gui01, s:cterm02, s:cterm01, "", "")
call <sid>hi("SignColumn", s:gui03, s:gui01, s:cterm03, s:cterm01, "", "")
call <sid>hi("StatusLine", s:gui04, s:gui02, s:cterm04, s:cterm02, "none", "")
call <sid>hi("StatusLineNC", s:gui03, s:gui01, s:cterm03, s:cterm01, "none", "")
call <sid>hi("VertSplit", s:gui00, s:gui00, s:cterm00, s:cterm00, "none", "")
call <sid>hi("ColorColumn", "", s:gui01, "", s:cterm01, "none", "")
call <sid>hi("CursorColumn", "", s:gui01, "", s:cterm01, "none", "")
call <sid>hi("CursorLine", "", s:gui01, "", s:cterm01, "none", "")
call <sid>hi("CursorLineNr", s:gui03, s:gui01, s:cterm03, s:cterm01, "", "")
call <sid>hi("PMenu", s:gui04, s:gui01, s:cterm04, s:cterm01, "none", "")
call <sid>hi("PMenuSel", s:gui01, s:gui04, s:cterm01, s:cterm04, "", "")
call <sid>hi("TabLine", s:gui03, s:gui01, s:cterm03, s:cterm01, "none", "")
call <sid>hi("TabLineFill", s:gui03, s:gui01, s:cterm03, s:cterm01, "none", "")
call <sid>hi("TabLineSel", s:gui0B, s:gui01, s:cterm0B, s:cterm01, "none", "")
" Standard syntax highlighting
call <sid>hi("Boolean", s:gui09, "", s:cterm09, "", "", "")
call <sid>hi("Character", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("Comment", s:gui03, "", s:cterm03, "", "", "")
call <sid>hi("Conditional", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("Constant", s:gui09, "", s:cterm09, "", "", "")
call <sid>hi("Define", s:gui0E, "", s:cterm0E, "", "none", "")
call <sid>hi("Delimiter", s:gui0F, "", s:cterm0F, "", "", "")
call <sid>hi("Float", s:gui09, "", s:cterm09, "", "", "")
call <sid>hi("Function", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("Identifier", s:gui08, "", s:cterm08, "", "none", "")
call <sid>hi("Include", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("Keyword", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("Label", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("Number", s:gui09, "", s:cterm09, "", "", "")
call <sid>hi("Operator", s:gui05, "", s:cterm05, "", "none", "")
call <sid>hi("PreProc", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("Repeat", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("Special", s:gui0C, "", s:cterm0C, "", "", "")
call <sid>hi("SpecialChar", s:gui0F, "", s:cterm0F, "", "", "")
call <sid>hi("Statement", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("StorageClass", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("String", s:gui0B, "", s:cterm0B, "", "", "")
call <sid>hi("Structure", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("Tag", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("Todo", s:gui0A, s:gui01, s:cterm0A, s:cterm01, "", "")
call <sid>hi("Type", s:gui0A, "", s:cterm0A, "", "none", "")
call <sid>hi("Typedef", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("Noise", s:gui01, "", s:cterm01, "", "", "")
" C highlighting
call <sid>hi("cOperator", s:gui0C, "", s:cterm0C, "", "", "")
call <sid>hi("cPreCondit", s:gui0E, "", s:cterm0E, "", "", "")
" C# highlighting
call <sid>hi("csClass", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("csAttribute", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("csModifier", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("csType", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("csUnspecifiedStatement", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("csContextualStatement", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("csNewDecleration", s:gui08, "", s:cterm08, "", "", "")
" CSS highlighting
call <sid>hi("cssBraces", s:gui01, "", s:cterm01, "", "", "")
call <sid>hi("cssClassName", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("cssColor", s:gui0C, "", s:cterm0C, "", "", "")
" Diff highlighting
call <sid>hi("DiffAdd", s:gui0B, s:gui01, s:cterm0B, s:cterm01, "", "")
call <sid>hi("DiffChange", s:gui03, s:gui01, s:cterm03, s:cterm01, "", "")
call <sid>hi("DiffDelete", s:gui08, s:gui01, s:cterm08, s:cterm01, "", "")
call <sid>hi("DiffText", s:gui0D, s:gui01, s:cterm0D, s:cterm01, "", "")
call <sid>hi("DiffAdded", s:gui0B, s:gui00, s:cterm0B, s:cterm00, "", "")
call <sid>hi("DiffFile", s:gui08, s:gui00, s:cterm08, s:cterm00, "", "")
call <sid>hi("DiffNewFile", s:gui0B, s:gui00, s:cterm0B, s:cterm00, "", "")
call <sid>hi("DiffLine", s:gui0D, s:gui00, s:cterm0D, s:cterm00, "", "")
call <sid>hi("DiffRemoved", s:gui08, s:gui00, s:cterm08, s:cterm00, "", "")
" Git highlighting
call <sid>hi("gitCommitOverflow", s:gui08, "", s:cterm08, "", "", "")
" call <sid>hi("gitCommitSummary", s:gui0B, "", s:cterm0B, "", "", "")
call <sid>hi("gitCommitSummary", s:gui05, "", s:cterm05, "none", "none", "")
" GitGutter highlighting
call <sid>hi("GitGutterAdd", s:gui0B, s:gui01, s:cterm0B, s:cterm01, "", "")
call <sid>hi("GitGutterChange", s:gui0D, s:gui01, s:cterm0D, s:cterm01, "", "")
call <sid>hi("GitGutterDelete", s:gui08, s:gui01, s:cterm08, s:cterm01, "", "")
call <sid>hi("GitGutterChangeDelete", s:gui0E, s:gui01, s:cterm0E, s:cterm01, "", "")
" HTML highlighting
call <sid>hi("htmlBold", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("htmlItalic", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("htmlEndTag", s:gui01, "", s:cterm01, "", "", "")
call <sid>hi("htmlTag", s:gui01, "", s:cterm01, "", "", "")
" JavaScript highlighting
call <sid>hi("javaScript", s:gui05, "", s:cterm05, "", "", "")
call <sid>hi("javaScriptBraces", s:gui05, "", s:cterm05, "", "", "")
call <sid>hi("javaScriptNumber", s:gui09, "", s:cterm09, "", "", "")
" pangloss/vim-javascript highlighting
call <sid>hi("jsOperator", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("jsStatement", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("jsReturn", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("jsThis", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("jsClassDefinition", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("jsFunction", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("jsFuncName", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("jsFuncCall", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("jsClassFuncName", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("jsClassMethodType", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("jsRegexpString", s:gui0C, "", s:cterm0C, "", "", "")
call <sid>hi("jsGlobalObjects", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("jsGlobalNodeObjects", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("jsExceptions", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("jsBuiltins", s:gui0A, "", s:cterm0A, "", "", "")
" Mail highlighting
call <sid>hi("mailQuoted1", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("mailQuoted2", s:gui0B, "", s:cterm0B, "", "", "")
call <sid>hi("mailQuoted3", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("mailQuoted4", s:gui0C, "", s:cterm0C, "", "", "")
call <sid>hi("mailQuoted5", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("mailQuoted6", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("mailURL", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("mailEmail", s:gui0D, "", s:cterm0D, "", "", "")
" Markdown highlighting
call <sid>hi("markdownCode", s:gui0B, "", s:cterm0B, "", "", "")
call <sid>hi("markdownError", s:gui05, s:gui00, s:cterm05, s:cterm00, "", "")
call <sid>hi("markdownCodeBlock", s:gui0B, "", s:cterm0B, "", "", "")
call <sid>hi("markdownHeadingDelimiter", s:gui0D, "", s:cterm0D, "", "", "")
" NERDTree highlighting
call <sid>hi("NERDTreeDirSlash", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("NERDTreeExecFile", s:gui05, "", s:cterm05, "", "", "")
" PHP highlighting
call <sid>hi("phpMemberSelector", s:gui05, "", s:cterm05, "", "", "")
call <sid>hi("phpComparison", s:gui05, "", s:cterm05, "", "", "")
call <sid>hi("phpParent", s:gui05, "", s:cterm05, "", "", "")
" Python highlighting
call <sid>hi("pythonOperator", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("pythonRepeat", s:gui0E, "", s:cterm0E, "", "", "")
" Ruby highlighting
call <sid>hi("rubyAttribute", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("rubyConstant", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("rubyInterpolation", s:gui0B, "", s:cterm0B, "", "", "")
call <sid>hi("rubyInterpolationDelimiter", s:gui0F, "", s:cterm0F, "", "", "")
call <sid>hi("rubyRegexp", s:gui0C, "", s:cterm0C, "", "", "")
call <sid>hi("rubySymbol", s:gui0B, "", s:cterm0B, "", "", "")
call <sid>hi("rubyStringDelimiter", s:gui0B, "", s:cterm0B, "", "", "")
" SASS highlighting
call <sid>hi("sassidChar", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("sassClassChar", s:gui09, "", s:cterm09, "", "", "")
call <sid>hi("sassInclude", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("sassMixing", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("sassMixinName", s:gui0D, "", s:cterm0D, "", "", "")
" Signify highlighting
call <sid>hi("SignifySignAdd", s:gui0B, s:gui01, s:cterm0B, s:cterm01, "", "")
call <sid>hi("SignifySignChange", s:gui0D, s:gui01, s:cterm0D, s:cterm01, "", "")
call <sid>hi("SignifySignDelete", s:gui08, s:gui01, s:cterm08, s:cterm01, "", "")
" Spelling highlighting
call <sid>hi("SpellBad", "", s:gui00, "", s:cterm00, "undercurl", s:gui08)
call <sid>hi("SpellLocal", "", s:gui00, "", s:cterm00, "undercurl", s:gui0C)
call <sid>hi("SpellCap", "", s:gui00, "", s:cterm00, "undercurl", s:gui0D)
call <sid>hi("SpellRare", "", s:gui00, "", s:cterm00, "undercurl", s:gui0E)
" Remove functions
delf <sid>hi
delf <sid>gui
delf <sid>cterm
" Remove color variables
unlet s:gui00 s:gui01 s:gui02 s:gui03 s:gui04 s:gui05 s:gui06 s:gui07 s:gui08 s:gui09 s:gui0A s:gui0B s:gui0C s:gui0D s:gui0E s:gui0F
unlet s:cterm00 s:cterm01 s:cterm02 s:cterm03 s:cterm04 s:cterm05 s:cterm06 s:cterm07 s:cterm08 s:cterm09 s:cterm0A s:cterm0B s:cterm0C s:cterm0D s:cterm0E s:cterm0F

View File

@ -0,0 +1,346 @@
" Base16 Vim original template by Chris Kempson (https://github.com/chriskempson/base16-vim)
" Scheme: Atelier_Estuary by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/estuary)
" This enables the coresponding base16-shell script to run so that
" :colorscheme works in terminals supported by base16-shell scripts
" User must set this variable in .vimrc
" let g:base16_shell_path=base16-builder/output/shell/
if !has('gui_running')
if exists("g:base16_shell_path")
execute "silent !/bin/sh ".g:base16_shell_path."/Atelier_EstuaryDark.".&background.".sh"
endif
endif
" GUI color definitions
let s:gui00 = "22221b"
let s:gui01 = "302f27"
let s:gui02 = "5f5e4e"
let s:gui03 = "6c6b5a"
let s:gui04 = "878573"
let s:gui05 = "929181"
let s:gui06 = "e7e6df"
let s:gui07 = "f4f3ec"
let s:gui08 = "ba6236"
let s:gui09 = "ae7313"
let s:gui0A = "a5980d"
let s:gui0B = "7d9726"
let s:gui0C = "5b9d48"
let s:gui0D = "36a166"
let s:gui0E = "5f9182"
let s:gui0F = "9d6c7c"
" Terminal color definitions
let s:cterm00 = "235 "
let s:cterm03 = "242 "
let s:cterm05 = "246 "
let s:cterm07 = "231 "
let s:cterm08 = "166 "
let s:cterm0A = "142 "
let s:cterm0B = "100 "
let s:cterm0C = "71 "
let s:cterm0D = "36 "
let s:cterm0E = "66 "
if exists('base16colorspace') && base16colorspace == "256"
let s:cterm01 = "236 "
let s:cterm02 = "240 "
let s:cterm04 = "245 "
let s:cterm06 = "254 "
let s:cterm09 = "137 "
let s:cterm0F = "132 "
else
let s:cterm01 = "236 "
let s:cterm02 = "240 "
let s:cterm04 = "245 "
let s:cterm06 = "254 "
let s:cterm09 = "137 "
let s:cterm0F = "132 "
endif
" Theme setup
hi clear
syntax reset
let g:colors_name = "Atelier_EstuaryDark"
" Highlighting function
fun <sid>hi(group, guifg, guibg, ctermfg, ctermbg, attr, guisp)
if a:guifg != ""
exec "hi " . a:group . " guifg=#" . s:gui(a:guifg)
endif
if a:guibg != ""
exec "hi " . a:group . " guibg=#" . s:gui(a:guibg)
endif
if a:ctermfg != ""
exec "hi " . a:group . " ctermfg=" . s:cterm(a:ctermfg)
endif
if a:ctermbg != ""
exec "hi " . a:group . " ctermbg=" . s:cterm(a:ctermbg)
endif
if a:attr != ""
exec "hi " . a:group . " gui=" . a:attr . " cterm=" . a:attr
endif
if a:guisp != ""
exec "hi " . a:group . " guisp=#" . a:guisp
endif
endfun
" Return GUI color for light/dark variants
fun s:gui(color)
if &background == "dark"
return a:color
endif
if a:color == s:gui00
return s:gui07
elseif a:color == s:gui01
return s:gui06
elseif a:color == s:gui02
return s:gui05
elseif a:color == s:gui03
return s:gui04
elseif a:color == s:gui04
return s:gui03
elseif a:color == s:gui05
return s:gui02
elseif a:color == s:gui06
return s:gui01
elseif a:color == s:gui07
return s:gui00
endif
return a:color
endfun
" Return terminal color for light/dark variants
fun s:cterm(color)
if &background == "dark"
return a:color
endif
" if a:color == s:cterm00
" return s:cterm07
" elseif a:color == s:cterm01
" return s:cterm06
" elseif a:color == s:cterm02
" return s:cterm05
" elseif a:color == s:cterm03
" return s:cterm04
" elseif a:color == s:cterm04
" return s:cterm03
" elseif a:color == s:cterm05
" return s:cterm02
" elseif a:color == s:cterm06
" return s:cterm01
" elseif a:color == s:cterm07
" return s:cterm00
" endif
return a:color
endfun
" Vim editor colors
call <sid>hi("Bold", "", "", "", "", "bold", "")
call <sid>hi("Debug", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("Directory", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("Error", s:gui00, s:gui08, s:cterm00, s:cterm08, "", "")
call <sid>hi("ErrorMsg", s:gui08, s:gui00, s:cterm08, s:cterm00, "", "")
call <sid>hi("Exception", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("FoldColumn", s:gui0C, s:gui01, s:cterm0C, s:cterm01, "", "")
call <sid>hi("Folded", s:gui03, s:gui01, s:cterm03, s:cterm01, "", "")
call <sid>hi("IncSearch", s:gui01, s:gui09, s:cterm01, s:cterm09, "none", "")
call <sid>hi("Italic", "", "", "", "", "none", "")
call <sid>hi("Macro", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("MatchParen", s:gui00, s:gui03, s:cterm00, s:cterm03, "", "")
call <sid>hi("ModeMsg", s:gui0B, "", s:cterm0B, "", "", "")
call <sid>hi("MoreMsg", s:gui0B, "", s:cterm0B, "", "", "")
call <sid>hi("Question", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("Search", s:gui06, s:gui0A, s:cterm06, s:cterm0A, "", "")
call <sid>hi("SpecialKey", s:gui03, "", s:cterm03, "", "", "")
call <sid>hi("TooLong", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("Underlined", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("Visual", "", s:gui02, "", s:cterm02, "", "")
call <sid>hi("VisualNOS", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("WarningMsg", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("WildMenu", s:gui08, s:gui0A, s:cterm08, "", "", "")
call <sid>hi("Title", s:gui0D, "", s:cterm0D, "", "none", "")
call <sid>hi("Conceal", s:gui0D, s:gui00, s:cterm0D, s:cterm00, "", "")
call <sid>hi("Cursor", s:gui00, s:gui05, s:cterm00, s:cterm05, "", "")
call <sid>hi("NonText", s:gui03, "", s:cterm03, "", "", "")
call <sid>hi("Normal", s:gui05, s:gui00, s:cterm05, s:cterm00, "", "")
call <sid>hi("LineNr", s:gui02, s:gui01, s:cterm02, s:cterm01, "", "")
call <sid>hi("SignColumn", s:gui03, s:gui01, s:cterm03, s:cterm01, "", "")
call <sid>hi("StatusLine", s:gui04, s:gui02, s:cterm04, s:cterm02, "none", "")
call <sid>hi("StatusLineNC", s:gui03, s:gui01, s:cterm03, s:cterm01, "none", "")
call <sid>hi("VertSplit", s:gui00, s:gui00, s:cterm00, s:cterm00, "none", "")
call <sid>hi("ColorColumn", "", s:gui01, "", s:cterm01, "none", "")
call <sid>hi("CursorColumn", "", s:gui01, "", s:cterm01, "none", "")
call <sid>hi("CursorLine", "", s:gui01, "", s:cterm01, "none", "")
call <sid>hi("CursorLineNr", s:gui03, s:gui01, s:cterm03, s:cterm01, "", "")
call <sid>hi("PMenu", s:gui04, s:gui01, s:cterm04, s:cterm01, "none", "")
call <sid>hi("PMenuSel", s:gui01, s:gui04, s:cterm01, s:cterm04, "", "")
call <sid>hi("TabLine", s:gui03, s:gui01, s:cterm03, s:cterm01, "none", "")
call <sid>hi("TabLineFill", s:gui03, s:gui01, s:cterm03, s:cterm01, "none", "")
call <sid>hi("TabLineSel", s:gui0B, s:gui01, s:cterm0B, s:cterm01, "none", "")
" Standard syntax highlighting
call <sid>hi("Boolean", s:gui09, "", s:cterm09, "", "", "")
call <sid>hi("Character", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("Comment", s:gui03, "", s:cterm03, "", "", "")
call <sid>hi("Conditional", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("Constant", s:gui09, "", s:cterm09, "", "", "")
call <sid>hi("Define", s:gui0E, "", s:cterm0E, "", "none", "")
call <sid>hi("Delimiter", s:gui0F, "", s:cterm0F, "", "", "")
call <sid>hi("Float", s:gui09, "", s:cterm09, "", "", "")
call <sid>hi("Function", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("Identifier", s:gui08, "", s:cterm08, "", "none", "")
call <sid>hi("Include", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("Keyword", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("Label", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("Number", s:gui09, "", s:cterm09, "", "", "")
call <sid>hi("Operator", s:gui05, "", s:cterm05, "", "none", "")
call <sid>hi("PreProc", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("Repeat", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("Special", s:gui0C, "", s:cterm0C, "", "", "")
call <sid>hi("SpecialChar", s:gui0F, "", s:cterm0F, "", "", "")
call <sid>hi("Statement", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("StorageClass", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("String", s:gui0B, "", s:cterm0B, "", "", "")
call <sid>hi("Structure", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("Tag", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("Todo", s:gui0A, s:gui01, s:cterm0A, s:cterm01, "", "")
call <sid>hi("Type", s:gui0A, "", s:cterm0A, "", "none", "")
call <sid>hi("Typedef", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("Noise", s:gui02, "", s:cterm02, "", "", "")
" C highlighting
call <sid>hi("cOperator", s:gui0C, "", s:cterm0C, "", "", "")
call <sid>hi("cPreCondit", s:gui0E, "", s:cterm0E, "", "", "")
" C# highlighting
call <sid>hi("csClass", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("csAttribute", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("csModifier", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("csType", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("csUnspecifiedStatement", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("csContextualStatement", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("csNewDecleration", s:gui08, "", s:cterm08, "", "", "")
" CSS highlighting
call <sid>hi("cssBraces", s:gui02, "", s:cterm02, "", "", "")
call <sid>hi("cssClassName", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("cssColor", s:gui0C, "", s:cterm0C, "", "", "")
" Diff highlighting
call <sid>hi("DiffAdd", s:gui0B, s:gui01, s:cterm0B, s:cterm01, "", "")
call <sid>hi("DiffChange", s:gui03, s:gui01, s:cterm03, s:cterm01, "", "")
call <sid>hi("DiffDelete", s:gui08, s:gui01, s:cterm08, s:cterm01, "", "")
call <sid>hi("DiffText", s:gui0D, s:gui01, s:cterm0D, s:cterm01, "", "")
call <sid>hi("DiffAdded", s:gui0B, s:gui00, s:cterm0B, s:cterm00, "", "")
call <sid>hi("DiffFile", s:gui08, s:gui00, s:cterm08, s:cterm00, "", "")
call <sid>hi("DiffNewFile", s:gui0B, s:gui00, s:cterm0B, s:cterm00, "", "")
call <sid>hi("DiffLine", s:gui0D, s:gui00, s:cterm0D, s:cterm00, "", "")
call <sid>hi("DiffRemoved", s:gui08, s:gui00, s:cterm08, s:cterm00, "", "")
" Git highlighting
call <sid>hi("gitCommitOverflow", s:gui08, "", s:cterm08, "", "", "")
" call <sid>hi("gitCommitSummary", s:gui0B, "", s:cterm0B, "", "", "")
call <sid>hi("gitCommitSummary", s:gui05, "", s:cterm05, "none", "none", "")
" GitGutter highlighting
call <sid>hi("GitGutterAdd", s:gui0B, s:gui01, s:cterm0B, s:cterm01, "", "")
call <sid>hi("GitGutterChange", s:gui0D, s:gui01, s:cterm0D, s:cterm01, "", "")
call <sid>hi("GitGutterDelete", s:gui08, s:gui01, s:cterm08, s:cterm01, "", "")
call <sid>hi("GitGutterChangeDelete", s:gui0E, s:gui01, s:cterm0E, s:cterm01, "", "")
" HTML highlighting
call <sid>hi("htmlBold", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("htmlItalic", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("htmlEndTag", s:gui02, "", s:cterm02, "", "", "")
call <sid>hi("htmlTag", s:gui02, "", s:cterm02, "", "", "")
" JavaScript highlighting
call <sid>hi("javaScript", s:gui05, "", s:cterm05, "", "", "")
call <sid>hi("javaScriptBraces", s:gui05, "", s:cterm05, "", "", "")
call <sid>hi("javaScriptNumber", s:gui09, "", s:cterm09, "", "", "")
" pangloss/vim-javascript highlighting
call <sid>hi("jsOperator", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("jsStatement", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("jsReturn", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("jsThis", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("jsClassDefinition", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("jsFunction", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("jsFuncName", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("jsFuncCall", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("jsClassFuncName", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("jsClassMethodType", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("jsRegexpString", s:gui0C, "", s:cterm0C, "", "", "")
call <sid>hi("jsGlobalObjects", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("jsGlobalNodeObjects", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("jsExceptions", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("jsBuiltins", s:gui0A, "", s:cterm0A, "", "", "")
" Mail highlighting
call <sid>hi("mailQuoted1", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("mailQuoted2", s:gui0B, "", s:cterm0B, "", "", "")
call <sid>hi("mailQuoted3", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("mailQuoted4", s:gui0C, "", s:cterm0C, "", "", "")
call <sid>hi("mailQuoted5", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("mailQuoted6", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("mailURL", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("mailEmail", s:gui0D, "", s:cterm0D, "", "", "")
" Markdown highlighting
call <sid>hi("markdownCode", s:gui0B, "", s:cterm0B, "", "", "")
call <sid>hi("markdownError", s:gui05, s:gui00, s:cterm05, s:cterm00, "", "")
call <sid>hi("markdownCodeBlock", s:gui0B, "", s:cterm0B, "", "", "")
call <sid>hi("markdownHeadingDelimiter", s:gui0D, "", s:cterm0D, "", "", "")
" NERDTree highlighting
call <sid>hi("NERDTreeDirSlash", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("NERDTreeExecFile", s:gui05, "", s:cterm05, "", "", "")
" PHP highlighting
call <sid>hi("phpMemberSelector", s:gui05, "", s:cterm05, "", "", "")
call <sid>hi("phpComparison", s:gui05, "", s:cterm05, "", "", "")
call <sid>hi("phpParent", s:gui05, "", s:cterm05, "", "", "")
" Python highlighting
call <sid>hi("pythonOperator", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("pythonRepeat", s:gui0E, "", s:cterm0E, "", "", "")
" Ruby highlighting
call <sid>hi("rubyAttribute", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("rubyConstant", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("rubyInterpolation", s:gui0B, "", s:cterm0B, "", "", "")
call <sid>hi("rubyInterpolationDelimiter", s:gui0F, "", s:cterm0F, "", "", "")
call <sid>hi("rubyRegexp", s:gui0C, "", s:cterm0C, "", "", "")
call <sid>hi("rubySymbol", s:gui0B, "", s:cterm0B, "", "", "")
call <sid>hi("rubyStringDelimiter", s:gui0B, "", s:cterm0B, "", "", "")
" SASS highlighting
call <sid>hi("sassidChar", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("sassClassChar", s:gui09, "", s:cterm09, "", "", "")
call <sid>hi("sassInclude", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("sassMixing", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("sassMixinName", s:gui0D, "", s:cterm0D, "", "", "")
" Signify highlighting
call <sid>hi("SignifySignAdd", s:gui0B, s:gui01, s:cterm0B, s:cterm01, "", "")
call <sid>hi("SignifySignChange", s:gui0D, s:gui01, s:cterm0D, s:cterm01, "", "")
call <sid>hi("SignifySignDelete", s:gui08, s:gui01, s:cterm08, s:cterm01, "", "")
" Spelling highlighting
call <sid>hi("SpellBad", "", s:gui00, "", s:cterm00, "undercurl", s:gui08)
call <sid>hi("SpellLocal", "", s:gui00, "", s:cterm00, "undercurl", s:gui0C)
call <sid>hi("SpellCap", "", s:gui00, "", s:cterm00, "undercurl", s:gui0D)
call <sid>hi("SpellRare", "", s:gui00, "", s:cterm00, "undercurl", s:gui0E)
" Remove functions
delf <sid>hi
delf <sid>gui
delf <sid>cterm
" Remove color variables
unlet s:gui00 s:gui01 s:gui02 s:gui03 s:gui04 s:gui05 s:gui06 s:gui07 s:gui08 s:gui09 s:gui0A s:gui0B s:gui0C s:gui0D s:gui0E s:gui0F
unlet s:cterm00 s:cterm01 s:cterm02 s:cterm03 s:cterm04 s:cterm05 s:cterm06 s:cterm07 s:cterm08 s:cterm09 s:cterm0A s:cterm0B s:cterm0C s:cterm0D s:cterm0E s:cterm0F

View File

@ -0,0 +1,346 @@
" Base16 Vim original template by Chris Kempson (https://github.com/chriskempson/base16-vim)
" Scheme: Atelier_Estuary by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/estuary)
" This enables the coresponding base16-shell script to run so that
" :colorscheme works in terminals supported by base16-shell scripts
" User must set this variable in .vimrc
" let g:base16_shell_path=base16-builder/output/shell/
if !has('gui_running')
if exists("g:base16_shell_path")
execute "silent !/bin/sh ".g:base16_shell_path."/Atelier_EstuaryLight.".&background.".sh"
endif
endif
" GUI color definitions
let s:gui00 = "22221b"
let s:gui01 = "302f27"
let s:gui02 = "5f5e4e"
let s:gui03 = "6c6b5a"
let s:gui04 = "878573"
let s:gui05 = "929181"
let s:gui06 = "e7e6df"
let s:gui07 = "f4f3ec"
let s:gui08 = "ba6236"
let s:gui09 = "ae7313"
let s:gui0A = "a5980d"
let s:gui0B = "7d9726"
let s:gui0C = "5b9d48"
let s:gui0D = "36a166"
let s:gui0E = "5f9182"
let s:gui0F = "9d6c7c"
" Terminal color definitions
let s:cterm00 = "235 "
let s:cterm03 = "242 "
let s:cterm05 = "246 "
let s:cterm07 = "231 "
let s:cterm08 = "166 "
let s:cterm0A = "142 "
let s:cterm0B = "100 "
let s:cterm0C = "71 "
let s:cterm0D = "36 "
let s:cterm0E = "66 "
if exists('base16colorspace') && base16colorspace == "256"
let s:cterm01 = "236 "
let s:cterm02 = "240 "
let s:cterm04 = "245 "
let s:cterm06 = "254 "
let s:cterm09 = "137 "
let s:cterm0F = "132 "
else
let s:cterm01 = "236 "
let s:cterm02 = "240 "
let s:cterm04 = "245 "
let s:cterm06 = "254 "
let s:cterm09 = "137 "
let s:cterm0F = "132 "
endif
" Theme setup
hi clear
syntax reset
let g:colors_name = "Atelier_EstuaryLight"
" Highlighting function
fun <sid>hi(group, guifg, guibg, ctermfg, ctermbg, attr, guisp)
if a:guifg != ""
exec "hi " . a:group . " guifg=#" . s:gui(a:guifg)
endif
if a:guibg != ""
exec "hi " . a:group . " guibg=#" . s:gui(a:guibg)
endif
if a:ctermfg != ""
exec "hi " . a:group . " ctermfg=" . s:cterm(a:ctermfg)
endif
if a:ctermbg != ""
exec "hi " . a:group . " ctermbg=" . s:cterm(a:ctermbg)
endif
if a:attr != ""
exec "hi " . a:group . " gui=" . a:attr . " cterm=" . a:attr
endif
if a:guisp != ""
exec "hi " . a:group . " guisp=#" . a:guisp
endif
endfun
" Return GUI color for light/dark variants
fun s:gui(color)
if &background == "dark"
return a:color
endif
if a:color == s:gui00
return s:gui07
elseif a:color == s:gui01
return s:gui06
elseif a:color == s:gui02
return s:gui05
elseif a:color == s:gui03
return s:gui04
elseif a:color == s:gui04
return s:gui03
elseif a:color == s:gui05
return s:gui02
elseif a:color == s:gui06
return s:gui01
elseif a:color == s:gui07
return s:gui00
endif
return a:color
endfun
" Return terminal color for light/dark variants
fun s:cterm(color)
if &background == "dark"
return a:color
endif
if a:color == s:cterm00
return s:cterm07
elseif a:color == s:cterm01
return s:cterm06
elseif a:color == s:cterm02
return s:cterm05
elseif a:color == s:cterm03
return s:cterm04
elseif a:color == s:cterm04
return s:cterm03
elseif a:color == s:cterm05
return s:cterm02
elseif a:color == s:cterm06
return s:cterm01
elseif a:color == s:cterm07
return s:cterm00
endif
return a:color
endfun
" Vim editor colors
call <sid>hi("Bold", "", "", "", "", "bold", "")
call <sid>hi("Debug", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("Directory", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("Error", s:gui00, s:gui08, s:cterm00, s:cterm08, "", "")
call <sid>hi("ErrorMsg", s:gui08, s:gui00, s:cterm08, s:cterm00, "", "")
call <sid>hi("Exception", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("FoldColumn", s:gui0C, s:gui01, s:cterm0C, s:cterm01, "", "")
call <sid>hi("Folded", s:gui03, s:gui01, s:cterm03, s:cterm01, "", "")
call <sid>hi("IncSearch", s:gui01, s:gui09, s:cterm01, s:cterm09, "none", "")
call <sid>hi("Italic", "", "", "", "", "none", "")
call <sid>hi("Macro", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("MatchParen", s:gui00, s:gui03, s:cterm00, s:cterm03, "", "")
call <sid>hi("ModeMsg", s:gui0B, "", s:cterm0B, "", "", "")
call <sid>hi("MoreMsg", s:gui0B, "", s:cterm0B, "", "", "")
call <sid>hi("Question", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("Search", s:gui06, s:gui0A, s:cterm06, s:cterm0A, "", "")
call <sid>hi("SpecialKey", s:gui03, "", s:cterm03, "", "", "")
call <sid>hi("TooLong", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("Underlined", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("Visual", "", s:gui02, "", s:cterm02, "", "")
call <sid>hi("VisualNOS", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("WarningMsg", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("WildMenu", s:gui08, s:gui0A, s:cterm08, "", "", "")
call <sid>hi("Title", s:gui0D, "", s:cterm0D, "", "none", "")
call <sid>hi("Conceal", s:gui0D, s:gui00, s:cterm0D, s:cterm00, "", "")
call <sid>hi("Cursor", s:gui00, s:gui05, s:cterm00, s:cterm05, "", "")
call <sid>hi("NonText", s:gui03, "", s:cterm03, "", "", "")
call <sid>hi("Normal", s:gui05, s:gui00, s:cterm05, s:cterm00, "", "")
call <sid>hi("LineNr", s:gui02, s:gui01, s:cterm02, s:cterm01, "", "")
call <sid>hi("SignColumn", s:gui03, s:gui01, s:cterm03, s:cterm01, "", "")
call <sid>hi("StatusLine", s:gui04, s:gui02, s:cterm04, s:cterm02, "none", "")
call <sid>hi("StatusLineNC", s:gui03, s:gui01, s:cterm03, s:cterm01, "none", "")
call <sid>hi("VertSplit", s:gui00, s:gui00, s:cterm00, s:cterm00, "none", "")
call <sid>hi("ColorColumn", "", s:gui01, "", s:cterm01, "none", "")
call <sid>hi("CursorColumn", "", s:gui01, "", s:cterm01, "none", "")
call <sid>hi("CursorLine", "", s:gui01, "", s:cterm01, "none", "")
call <sid>hi("CursorLineNr", s:gui03, s:gui01, s:cterm03, s:cterm01, "", "")
call <sid>hi("PMenu", s:gui04, s:gui01, s:cterm04, s:cterm01, "none", "")
call <sid>hi("PMenuSel", s:gui01, s:gui04, s:cterm01, s:cterm04, "", "")
call <sid>hi("TabLine", s:gui03, s:gui01, s:cterm03, s:cterm01, "none", "")
call <sid>hi("TabLineFill", s:gui03, s:gui01, s:cterm03, s:cterm01, "none", "")
call <sid>hi("TabLineSel", s:gui0B, s:gui01, s:cterm0B, s:cterm01, "none", "")
" Standard syntax highlighting
call <sid>hi("Boolean", s:gui09, "", s:cterm09, "", "", "")
call <sid>hi("Character", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("Comment", s:gui03, "", s:cterm03, "", "", "")
call <sid>hi("Conditional", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("Constant", s:gui09, "", s:cterm09, "", "", "")
call <sid>hi("Define", s:gui0E, "", s:cterm0E, "", "none", "")
call <sid>hi("Delimiter", s:gui0F, "", s:cterm0F, "", "", "")
call <sid>hi("Float", s:gui09, "", s:cterm09, "", "", "")
call <sid>hi("Function", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("Identifier", s:gui08, "", s:cterm08, "", "none", "")
call <sid>hi("Include", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("Keyword", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("Label", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("Number", s:gui09, "", s:cterm09, "", "", "")
call <sid>hi("Operator", s:gui05, "", s:cterm05, "", "none", "")
call <sid>hi("PreProc", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("Repeat", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("Special", s:gui0C, "", s:cterm0C, "", "", "")
call <sid>hi("SpecialChar", s:gui0F, "", s:cterm0F, "", "", "")
call <sid>hi("Statement", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("StorageClass", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("String", s:gui0B, "", s:cterm0B, "", "", "")
call <sid>hi("Structure", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("Tag", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("Todo", s:gui0A, s:gui01, s:cterm0A, s:cterm01, "", "")
call <sid>hi("Type", s:gui0A, "", s:cterm0A, "", "none", "")
call <sid>hi("Typedef", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("Noise", s:gui01, "", s:cterm01, "", "", "")
" C highlighting
call <sid>hi("cOperator", s:gui0C, "", s:cterm0C, "", "", "")
call <sid>hi("cPreCondit", s:gui0E, "", s:cterm0E, "", "", "")
" C# highlighting
call <sid>hi("csClass", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("csAttribute", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("csModifier", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("csType", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("csUnspecifiedStatement", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("csContextualStatement", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("csNewDecleration", s:gui08, "", s:cterm08, "", "", "")
" CSS highlighting
call <sid>hi("cssBraces", s:gui01, "", s:cterm01, "", "", "")
call <sid>hi("cssClassName", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("cssColor", s:gui0C, "", s:cterm0C, "", "", "")
" Diff highlighting
call <sid>hi("DiffAdd", s:gui0B, s:gui01, s:cterm0B, s:cterm01, "", "")
call <sid>hi("DiffChange", s:gui03, s:gui01, s:cterm03, s:cterm01, "", "")
call <sid>hi("DiffDelete", s:gui08, s:gui01, s:cterm08, s:cterm01, "", "")
call <sid>hi("DiffText", s:gui0D, s:gui01, s:cterm0D, s:cterm01, "", "")
call <sid>hi("DiffAdded", s:gui0B, s:gui00, s:cterm0B, s:cterm00, "", "")
call <sid>hi("DiffFile", s:gui08, s:gui00, s:cterm08, s:cterm00, "", "")
call <sid>hi("DiffNewFile", s:gui0B, s:gui00, s:cterm0B, s:cterm00, "", "")
call <sid>hi("DiffLine", s:gui0D, s:gui00, s:cterm0D, s:cterm00, "", "")
call <sid>hi("DiffRemoved", s:gui08, s:gui00, s:cterm08, s:cterm00, "", "")
" Git highlighting
call <sid>hi("gitCommitOverflow", s:gui08, "", s:cterm08, "", "", "")
" call <sid>hi("gitCommitSummary", s:gui0B, "", s:cterm0B, "", "", "")
call <sid>hi("gitCommitSummary", s:gui05, "", s:cterm05, "none", "none", "")
" GitGutter highlighting
call <sid>hi("GitGutterAdd", s:gui0B, s:gui01, s:cterm0B, s:cterm01, "", "")
call <sid>hi("GitGutterChange", s:gui0D, s:gui01, s:cterm0D, s:cterm01, "", "")
call <sid>hi("GitGutterDelete", s:gui08, s:gui01, s:cterm08, s:cterm01, "", "")
call <sid>hi("GitGutterChangeDelete", s:gui0E, s:gui01, s:cterm0E, s:cterm01, "", "")
" HTML highlighting
call <sid>hi("htmlBold", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("htmlItalic", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("htmlEndTag", s:gui01, "", s:cterm01, "", "", "")
call <sid>hi("htmlTag", s:gui01, "", s:cterm01, "", "", "")
" JavaScript highlighting
call <sid>hi("javaScript", s:gui05, "", s:cterm05, "", "", "")
call <sid>hi("javaScriptBraces", s:gui05, "", s:cterm05, "", "", "")
call <sid>hi("javaScriptNumber", s:gui09, "", s:cterm09, "", "", "")
" pangloss/vim-javascript highlighting
call <sid>hi("jsOperator", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("jsStatement", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("jsReturn", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("jsThis", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("jsClassDefinition", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("jsFunction", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("jsFuncName", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("jsFuncCall", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("jsClassFuncName", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("jsClassMethodType", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("jsRegexpString", s:gui0C, "", s:cterm0C, "", "", "")
call <sid>hi("jsGlobalObjects", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("jsGlobalNodeObjects", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("jsExceptions", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("jsBuiltins", s:gui0A, "", s:cterm0A, "", "", "")
" Mail highlighting
call <sid>hi("mailQuoted1", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("mailQuoted2", s:gui0B, "", s:cterm0B, "", "", "")
call <sid>hi("mailQuoted3", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("mailQuoted4", s:gui0C, "", s:cterm0C, "", "", "")
call <sid>hi("mailQuoted5", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("mailQuoted6", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("mailURL", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("mailEmail", s:gui0D, "", s:cterm0D, "", "", "")
" Markdown highlighting
call <sid>hi("markdownCode", s:gui0B, "", s:cterm0B, "", "", "")
call <sid>hi("markdownError", s:gui05, s:gui00, s:cterm05, s:cterm00, "", "")
call <sid>hi("markdownCodeBlock", s:gui0B, "", s:cterm0B, "", "", "")
call <sid>hi("markdownHeadingDelimiter", s:gui0D, "", s:cterm0D, "", "", "")
" NERDTree highlighting
call <sid>hi("NERDTreeDirSlash", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("NERDTreeExecFile", s:gui05, "", s:cterm05, "", "", "")
" PHP highlighting
call <sid>hi("phpMemberSelector", s:gui05, "", s:cterm05, "", "", "")
call <sid>hi("phpComparison", s:gui05, "", s:cterm05, "", "", "")
call <sid>hi("phpParent", s:gui05, "", s:cterm05, "", "", "")
" Python highlighting
call <sid>hi("pythonOperator", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("pythonRepeat", s:gui0E, "", s:cterm0E, "", "", "")
" Ruby highlighting
call <sid>hi("rubyAttribute", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("rubyConstant", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("rubyInterpolation", s:gui0B, "", s:cterm0B, "", "", "")
call <sid>hi("rubyInterpolationDelimiter", s:gui0F, "", s:cterm0F, "", "", "")
call <sid>hi("rubyRegexp", s:gui0C, "", s:cterm0C, "", "", "")
call <sid>hi("rubySymbol", s:gui0B, "", s:cterm0B, "", "", "")
call <sid>hi("rubyStringDelimiter", s:gui0B, "", s:cterm0B, "", "", "")
" SASS highlighting
call <sid>hi("sassidChar", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("sassClassChar", s:gui09, "", s:cterm09, "", "", "")
call <sid>hi("sassInclude", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("sassMixing", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("sassMixinName", s:gui0D, "", s:cterm0D, "", "", "")
" Signify highlighting
call <sid>hi("SignifySignAdd", s:gui0B, s:gui01, s:cterm0B, s:cterm01, "", "")
call <sid>hi("SignifySignChange", s:gui0D, s:gui01, s:cterm0D, s:cterm01, "", "")
call <sid>hi("SignifySignDelete", s:gui08, s:gui01, s:cterm08, s:cterm01, "", "")
" Spelling highlighting
call <sid>hi("SpellBad", "", s:gui00, "", s:cterm00, "undercurl", s:gui08)
call <sid>hi("SpellLocal", "", s:gui00, "", s:cterm00, "undercurl", s:gui0C)
call <sid>hi("SpellCap", "", s:gui00, "", s:cterm00, "undercurl", s:gui0D)
call <sid>hi("SpellRare", "", s:gui00, "", s:cterm00, "undercurl", s:gui0E)
" Remove functions
delf <sid>hi
delf <sid>gui
delf <sid>cterm
" Remove color variables
unlet s:gui00 s:gui01 s:gui02 s:gui03 s:gui04 s:gui05 s:gui06 s:gui07 s:gui08 s:gui09 s:gui0A s:gui0B s:gui0C s:gui0D s:gui0E s:gui0F
unlet s:cterm00 s:cterm01 s:cterm02 s:cterm03 s:cterm04 s:cterm05 s:cterm06 s:cterm07 s:cterm08 s:cterm09 s:cterm0A s:cterm0B s:cterm0C s:cterm0D s:cterm0E s:cterm0F

View File

@ -0,0 +1,346 @@
" Base16 Vim original template by Chris Kempson (https://github.com/chriskempson/base16-vim)
" Scheme: Atelier_Forest by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/forest)
" This enables the coresponding base16-shell script to run so that
" :colorscheme works in terminals supported by base16-shell scripts
" User must set this variable in .vimrc
" let g:base16_shell_path=base16-builder/output/shell/
if !has('gui_running')
if exists("g:base16_shell_path")
execute "silent !/bin/sh ".g:base16_shell_path."/Atelier_ForestDark.".&background.".sh"
endif
endif
" GUI color definitions
let s:gui00 = "1b1918"
let s:gui01 = "2c2421"
let s:gui02 = "68615e"
let s:gui03 = "766e6b"
let s:gui04 = "9c9491"
let s:gui05 = "a8a19f"
let s:gui06 = "e6e2e0"
let s:gui07 = "f1efee"
let s:gui08 = "f22c40"
let s:gui09 = "df5320"
let s:gui0A = "c38418"
let s:gui0B = "7b9726"
let s:gui0C = "3d97b8"
let s:gui0D = "407ee7"
let s:gui0E = "6666ea"
let s:gui0F = "c33ff3"
" Terminal color definitions
let s:cterm00 = "234 "
let s:cterm03 = "242 "
let s:cterm05 = "247 "
let s:cterm07 = "231 "
let s:cterm08 = "196 "
let s:cterm0A = "137 "
let s:cterm0B = "100 "
let s:cterm0C = "67 "
let s:cterm0D = "69 "
let s:cterm0E = "99 "
if exists('base16colorspace') && base16colorspace == "256"
let s:cterm01 = "235 "
let s:cterm02 = "241 "
let s:cterm04 = "246 "
let s:cterm06 = "254 "
let s:cterm09 = "166 "
let s:cterm0F = "63 "
else
let s:cterm01 = "235 "
let s:cterm02 = "241 "
let s:cterm04 = "246 "
let s:cterm06 = "254 "
let s:cterm09 = "166 "
let s:cterm0F = "63 "
endif
" Theme setup
hi clear
syntax reset
let g:colors_name = "Atelier_ForestDark"
" Highlighting function
fun <sid>hi(group, guifg, guibg, ctermfg, ctermbg, attr, guisp)
if a:guifg != ""
exec "hi " . a:group . " guifg=#" . s:gui(a:guifg)
endif
if a:guibg != ""
exec "hi " . a:group . " guibg=#" . s:gui(a:guibg)
endif
if a:ctermfg != ""
exec "hi " . a:group . " ctermfg=" . s:cterm(a:ctermfg)
endif
if a:ctermbg != ""
exec "hi " . a:group . " ctermbg=" . s:cterm(a:ctermbg)
endif
if a:attr != ""
exec "hi " . a:group . " gui=" . a:attr . " cterm=" . a:attr
endif
if a:guisp != ""
exec "hi " . a:group . " guisp=#" . a:guisp
endif
endfun
" Return GUI color for light/dark variants
fun s:gui(color)
if &background == "dark"
return a:color
endif
if a:color == s:gui00
return s:gui07
elseif a:color == s:gui01
return s:gui06
elseif a:color == s:gui02
return s:gui05
elseif a:color == s:gui03
return s:gui04
elseif a:color == s:gui04
return s:gui03
elseif a:color == s:gui05
return s:gui02
elseif a:color == s:gui06
return s:gui01
elseif a:color == s:gui07
return s:gui00
endif
return a:color
endfun
" Return terminal color for light/dark variants
fun s:cterm(color)
if &background == "dark"
return a:color
endif
" if a:color == s:cterm00
" return s:cterm07
" elseif a:color == s:cterm01
" return s:cterm06
" elseif a:color == s:cterm02
" return s:cterm05
" elseif a:color == s:cterm03
" return s:cterm04
" elseif a:color == s:cterm04
" return s:cterm03
" elseif a:color == s:cterm05
" return s:cterm02
" elseif a:color == s:cterm06
" return s:cterm01
" elseif a:color == s:cterm07
" return s:cterm00
" endif
return a:color
endfun
" Vim editor colors
call <sid>hi("Bold", "", "", "", "", "bold", "")
call <sid>hi("Debug", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("Directory", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("Error", s:gui00, s:gui08, s:cterm00, s:cterm08, "", "")
call <sid>hi("ErrorMsg", s:gui08, s:gui00, s:cterm08, s:cterm00, "", "")
call <sid>hi("Exception", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("FoldColumn", s:gui0C, s:gui01, s:cterm0C, s:cterm01, "", "")
call <sid>hi("Folded", s:gui03, s:gui01, s:cterm03, s:cterm01, "", "")
call <sid>hi("IncSearch", s:gui01, s:gui09, s:cterm01, s:cterm09, "none", "")
call <sid>hi("Italic", "", "", "", "", "none", "")
call <sid>hi("Macro", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("MatchParen", s:gui00, s:gui03, s:cterm00, s:cterm03, "", "")
call <sid>hi("ModeMsg", s:gui0B, "", s:cterm0B, "", "", "")
call <sid>hi("MoreMsg", s:gui0B, "", s:cterm0B, "", "", "")
call <sid>hi("Question", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("Search", s:gui06, s:gui0A, s:cterm06, s:cterm0A, "", "")
call <sid>hi("SpecialKey", s:gui03, "", s:cterm03, "", "", "")
call <sid>hi("TooLong", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("Underlined", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("Visual", "", s:gui02, "", s:cterm02, "", "")
call <sid>hi("VisualNOS", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("WarningMsg", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("WildMenu", s:gui08, s:gui0A, s:cterm08, "", "", "")
call <sid>hi("Title", s:gui0D, "", s:cterm0D, "", "none", "")
call <sid>hi("Conceal", s:gui0D, s:gui00, s:cterm0D, s:cterm00, "", "")
call <sid>hi("Cursor", s:gui00, s:gui05, s:cterm00, s:cterm05, "", "")
call <sid>hi("NonText", s:gui03, "", s:cterm03, "", "", "")
call <sid>hi("Normal", s:gui05, s:gui00, s:cterm05, s:cterm00, "", "")
call <sid>hi("LineNr", s:gui02, s:gui01, s:cterm02, s:cterm01, "", "")
call <sid>hi("SignColumn", s:gui03, s:gui01, s:cterm03, s:cterm01, "", "")
call <sid>hi("StatusLine", s:gui04, s:gui02, s:cterm04, s:cterm02, "none", "")
call <sid>hi("StatusLineNC", s:gui03, s:gui01, s:cterm03, s:cterm01, "none", "")
call <sid>hi("VertSplit", s:gui00, s:gui00, s:cterm00, s:cterm00, "none", "")
call <sid>hi("ColorColumn", "", s:gui01, "", s:cterm01, "none", "")
call <sid>hi("CursorColumn", "", s:gui01, "", s:cterm01, "none", "")
call <sid>hi("CursorLine", "", s:gui01, "", s:cterm01, "none", "")
call <sid>hi("CursorLineNr", s:gui03, s:gui01, s:cterm03, s:cterm01, "", "")
call <sid>hi("PMenu", s:gui04, s:gui01, s:cterm04, s:cterm01, "none", "")
call <sid>hi("PMenuSel", s:gui01, s:gui04, s:cterm01, s:cterm04, "", "")
call <sid>hi("TabLine", s:gui03, s:gui01, s:cterm03, s:cterm01, "none", "")
call <sid>hi("TabLineFill", s:gui03, s:gui01, s:cterm03, s:cterm01, "none", "")
call <sid>hi("TabLineSel", s:gui0B, s:gui01, s:cterm0B, s:cterm01, "none", "")
" Standard syntax highlighting
call <sid>hi("Boolean", s:gui09, "", s:cterm09, "", "", "")
call <sid>hi("Character", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("Comment", s:gui03, "", s:cterm03, "", "", "")
call <sid>hi("Conditional", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("Constant", s:gui09, "", s:cterm09, "", "", "")
call <sid>hi("Define", s:gui0E, "", s:cterm0E, "", "none", "")
call <sid>hi("Delimiter", s:gui0F, "", s:cterm0F, "", "", "")
call <sid>hi("Float", s:gui09, "", s:cterm09, "", "", "")
call <sid>hi("Function", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("Identifier", s:gui08, "", s:cterm08, "", "none", "")
call <sid>hi("Include", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("Keyword", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("Label", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("Number", s:gui09, "", s:cterm09, "", "", "")
call <sid>hi("Operator", s:gui05, "", s:cterm05, "", "none", "")
call <sid>hi("PreProc", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("Repeat", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("Special", s:gui0C, "", s:cterm0C, "", "", "")
call <sid>hi("SpecialChar", s:gui0F, "", s:cterm0F, "", "", "")
call <sid>hi("Statement", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("StorageClass", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("String", s:gui0B, "", s:cterm0B, "", "", "")
call <sid>hi("Structure", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("Tag", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("Todo", s:gui0A, s:gui01, s:cterm0A, s:cterm01, "", "")
call <sid>hi("Type", s:gui0A, "", s:cterm0A, "", "none", "")
call <sid>hi("Typedef", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("Noise", s:gui02, "", s:cterm02, "", "", "")
" C highlighting
call <sid>hi("cOperator", s:gui0C, "", s:cterm0C, "", "", "")
call <sid>hi("cPreCondit", s:gui0E, "", s:cterm0E, "", "", "")
" C# highlighting
call <sid>hi("csClass", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("csAttribute", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("csModifier", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("csType", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("csUnspecifiedStatement", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("csContextualStatement", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("csNewDecleration", s:gui08, "", s:cterm08, "", "", "")
" CSS highlighting
call <sid>hi("cssBraces", s:gui02, "", s:cterm02, "", "", "")
call <sid>hi("cssClassName", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("cssColor", s:gui0C, "", s:cterm0C, "", "", "")
" Diff highlighting
call <sid>hi("DiffAdd", s:gui0B, s:gui01, s:cterm0B, s:cterm01, "", "")
call <sid>hi("DiffChange", s:gui03, s:gui01, s:cterm03, s:cterm01, "", "")
call <sid>hi("DiffDelete", s:gui08, s:gui01, s:cterm08, s:cterm01, "", "")
call <sid>hi("DiffText", s:gui0D, s:gui01, s:cterm0D, s:cterm01, "", "")
call <sid>hi("DiffAdded", s:gui0B, s:gui00, s:cterm0B, s:cterm00, "", "")
call <sid>hi("DiffFile", s:gui08, s:gui00, s:cterm08, s:cterm00, "", "")
call <sid>hi("DiffNewFile", s:gui0B, s:gui00, s:cterm0B, s:cterm00, "", "")
call <sid>hi("DiffLine", s:gui0D, s:gui00, s:cterm0D, s:cterm00, "", "")
call <sid>hi("DiffRemoved", s:gui08, s:gui00, s:cterm08, s:cterm00, "", "")
" Git highlighting
call <sid>hi("gitCommitOverflow", s:gui08, "", s:cterm08, "", "", "")
" call <sid>hi("gitCommitSummary", s:gui0B, "", s:cterm0B, "", "", "")
call <sid>hi("gitCommitSummary", s:gui05, "", s:cterm05, "none", "none", "")
" GitGutter highlighting
call <sid>hi("GitGutterAdd", s:gui0B, s:gui01, s:cterm0B, s:cterm01, "", "")
call <sid>hi("GitGutterChange", s:gui0D, s:gui01, s:cterm0D, s:cterm01, "", "")
call <sid>hi("GitGutterDelete", s:gui08, s:gui01, s:cterm08, s:cterm01, "", "")
call <sid>hi("GitGutterChangeDelete", s:gui0E, s:gui01, s:cterm0E, s:cterm01, "", "")
" HTML highlighting
call <sid>hi("htmlBold", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("htmlItalic", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("htmlEndTag", s:gui02, "", s:cterm02, "", "", "")
call <sid>hi("htmlTag", s:gui02, "", s:cterm02, "", "", "")
" JavaScript highlighting
call <sid>hi("javaScript", s:gui05, "", s:cterm05, "", "", "")
call <sid>hi("javaScriptBraces", s:gui05, "", s:cterm05, "", "", "")
call <sid>hi("javaScriptNumber", s:gui09, "", s:cterm09, "", "", "")
" pangloss/vim-javascript highlighting
call <sid>hi("jsOperator", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("jsStatement", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("jsReturn", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("jsThis", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("jsClassDefinition", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("jsFunction", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("jsFuncName", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("jsFuncCall", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("jsClassFuncName", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("jsClassMethodType", s:gui0E, "", s:cterm0E, "", "", "")