diff --git a/.config/alacritty/themes b/.config/alacritty/themes new file mode 160000 index 0000000..86c5784 --- /dev/null +++ b/.config/alacritty/themes @@ -0,0 +1 @@ +Subproject commit 86c578469e2bf784faf6f916883bf48349ff4f6d diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..4545970 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,6 @@ +[submodule "scripts/z.lua"] + path = scripts/z.lua + url = https://github.com/skywind3000/z.lua.git +[submodule ".config/alacritty/themes"] + path = .config/alacritty/themes + url = https://github.com/alacritty/alacritty-theme.git diff --git a/Brewfile b/Brewfile new file mode 100644 index 0000000..7d2a3ad --- /dev/null +++ b/Brewfile @@ -0,0 +1,70 @@ +brew "autossh" +brew "fish" +brew "fzf" +brew "go" +brew "htop" +brew "lua" +brew "mackup" +brew "mas" +brew "neofetch" +brew "neovim" +brew "node" +brew "ocrmypdf" +brew "pnpm" +brew "repo" +brew "rust" +brew "stow" +brew "stylua" +brew "tmux" +brew "trash" +brew "tree" +brew "wget" +cask "agent-tars" +cask "alacritty" +cask "bettertouchtool" +cask "capacities" +cask "cherry-studio" +cask "clash-verge-rev" +cask "coteditor" +cask "cursor" +cask "dockdoor" +cask "flutter" +cask "font-jetbrains-mono" +cask "font-jetbrains-mono-nerd-font" +cask "font-maple-mono-nf-cn" +cask "ghostty" +cask "hammerspoon" +cask "kando" +cask "keka" +cask "kitty" +cask "lm-studio" +cask "lookaway" +cask "lunarbar" +cask "maccy" +cask "miniconda" +cask "obsidian" +cask "only-switch" +cask "orbstack" +cask "picgo" +cask "snipaste" +cask "spacelauncher" +cask "tailscale" +cask "thor" +cask "trae" +cask "trae-cn" +cask "visual-studio-code" +cask "warp" +cask "wezterm" +vscode "github.copilot" +vscode "github.copilot-chat" +vscode "kevinrose.vsc-python-indent" +vscode "ms-azuretools.vscode-docker" +vscode "ms-python.debugpy" +vscode "ms-python.python" +vscode "ms-python.vscode-pylance" +vscode "ms-vscode-remote.remote-containers" +vscode "ms-vscode-remote.remote-ssh" +vscode "ms-vscode-remote.remote-ssh-edit" +vscode "ms-vscode.remote-explorer" +vscode "parallelsdesktop.parallels-desktop" +vscode "subframe7536.theme-maple" diff --git a/Brewfile.txt b/Brewfile.txt new file mode 100644 index 0000000..d8e35a5 --- /dev/null +++ b/Brewfile.txt @@ -0,0 +1,106 @@ +# vim:ft=ruby +tap "aws/tap" +tap "clementtsang/bottom" +tap "federico-terzi/espanso" +tap "homebrew/bundle" +tap "homebrew/cask" +tap "homebrew/core" +tap "homebrew/services" +tap "jesseduffield/lazygit" +tap "khanhas/tap" +tap "koekeishiya/formulae" +tap "lucassabreu/tap" +tap "stripe/stripe-cli" +tap "xorpse/formulae" +tap "xwmx/taps" +brew "amazon-ecs-cli" +brew "python@3.9" +brew "awscli" +brew "bat" +brew "glib" +brew "pkg-config" +brew "dash" +brew "exa" +brew "fd" +brew "fish" +brew "fzf" +brew "gh" +brew "git" +brew "git-delta" +brew "libusb" +brew "gnupg" +brew "go" +brew "hasura-cli" +brew "hyperfine" +brew "jq" +brew "lazydocker" +brew "lf" +brew "lsd" +brew "luajit", args: ["HEAD"] +brew "mackup" +brew "mosh" +brew "ncdu" +brew "neofetch" +brew "neovim", args: ["HEAD"] +brew "node" +brew "node@14" +brew "nvm" +brew "tmux" +brew "overmind" +brew "pgcli" +brew "postgresql" +brew "ripgrep" +brew "spotify-tui" +brew "starship" +brew "switchaudio-osx" +brew "tealdeer" +brew "terminal-notifier" +brew "trash-cli" +brew "wallpaper" +brew "wget" +brew "yarn" +brew "zlib" +brew "zoxide" +brew "aws/tap/aws-sam-cli" +brew "clementtsang/bottom/bottom" +brew "federico-terzi/espanso/espanso" +brew "jesseduffield/lazygit/lazygit" +brew "koekeishiya/formulae/skhd" +brew "stripe/stripe-cli/stripe" +brew "xorpse/formulae/yabai", args: ["HEAD"] +brew "tree" +brew "repo" +cask "1password" +cask "alacritty" +cask "alfred" +cask "appcleaner" +cask "balenaetcher" +cask "daisydisk" +cask "discord" +cask "evernote" +cask "fantastical" +cask "figma" +cask "ganache" +cask "home-assistant" +cask "hyper" +cask "imageoptim" +cask "ipfs" +cask "keycastr" +cask "obs" +cask "obsidian" +cask "plover" +cask "postgres" +cask "postman" +cask "raycast" +cask "rocket" +cask "sequel-pro" +cask "signal" +cask "skitch" +cask "slack" +cask "spacelauncher" +cask "spotify" +cask "twitch" +cask "visual-studio-code" +cask "vivaldi" +cask "whatsapp" +cask "capacities" diff --git a/README.md b/README.md index 18660e3..662a4a1 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,2 @@ -git clone https://git.marsway.red/liwei/shellconfig.git ~/.vvconfig -echo "source ~/.vvconfig/zshrc" >> ~/.zshrc +git clone https://git.marsway.red/liwei/shellconfig.git ~/.vvconfig --recurisve +source ~/.vvconfig/init.sh diff --git a/install/crontab/crb b/install/crontab/crb new file mode 100755 index 0000000..d09e7a4 --- /dev/null +++ b/install/crontab/crb @@ -0,0 +1,4 @@ +SHELL=/bin/bash +PATH=/sbin:/bin:/usr/sbin:/usr/bin + +0 1 * * * bash /Users/$USER/.vvconfig/scripts/backup_forgejo.sh diff --git a/install/crontab/cronitor b/install/crontab/cronitor new file mode 100755 index 0000000..621acb7 Binary files /dev/null and b/install/crontab/cronitor differ diff --git a/install/crontab/mackup b/install/crontab/mackup new file mode 100644 index 0000000..f0b2b13 --- /dev/null +++ b/install/crontab/mackup @@ -0,0 +1 @@ +40 15 * * * "mackup backup" diff --git a/install/fish/init.fish b/install/fish/init.fish new file mode 100644 index 0000000..a8089d0 --- /dev/null +++ b/install/fish/init.fish @@ -0,0 +1,15 @@ +export all_proxy=localhost:7897 +# 安装 oh-my-fish +curl -L https://get.oh-my.fish | fish +# 保存全局路径 +#set -Ux +## 使 fish 能读取 brew + if ! contains -- /opt/homebrew/bin $fish_user_paths + fish_add_path /opt/homebrew/bin + end +# 快速跳转工具z +omf install z +# 主题 +omf install pure +# 兼容 bash 命令 +omf install bass diff --git a/install/init.sh b/install/init.sh new file mode 100644 index 0000000..9a74b76 --- /dev/null +++ b/install/init.sh @@ -0,0 +1,27 @@ +set -x +if ! command -v fish &>/dev/null; then + echo "Installing fish..." + brew install fish + echo "/opt/homebrew/bin/fish" | sudo tee -a /etc/shell + chsh -s /opt/homebrew/bin/fish +fi +# Install cronmonitor +if ! command -v cronitor &>/dev/null; then + echo "Installing cronitor..." + curl https://cronitor.io/install-linux?sudo=1 -H "API-KEY: 66888414133740d8b3f0d1325e61484e" | sh + cronitor discover +fi + +# For shell configs +if ! command -v starship &>/dev/null; then + echo "Installing starship..." + brew install starship + echo eval "$(starship init zsh)" >>~/.zshrc +fi + +# Tmux +if ! command -v tmux &>/dev/null; then + echo "Installing tmux..." + brew install tmux +fi +brew install stow diff --git a/install/macapps.fish b/install/macapps.fish new file mode 100644 index 0000000..a073565 --- /dev/null +++ b/install/macapps.fish @@ -0,0 +1,8 @@ +mas install 1295203466 # Windows +mas install 497799835 # Xcode +mas install 1444383602 # Goodnotes +mas install 640199958 # Developer +mas install 899247664 # TestFlight +mas install 1473785373 # 钱迹 +mas install 1665341561 # Flomo +mas install 571213070 # Davinci Resolve diff --git a/install/vim/vimcolor/airline.vim b/install/vim/vimcolor/airline.vim new file mode 100755 index 0000000..1313cb9 --- /dev/null +++ b/install/vim/vimcolor/airline.vim @@ -0,0 +1,28 @@ +set t_Co=256 +set laststatus=2 +" let g:airline_theme='default' + +let g:airline#extensions#tabline#enabled = 1 +let g:airline#extensions#tabline#right_sep= '▎' +let g:airline#extensions#tabline#left_sep = '▎' +let g:airline#extensions#tabline#left_alt_sep = '▎' +let g:airline#extensions#tabline#right_alt_sep= '▎' +" let g:airline#extensions#tabline#formatter = 'default' + +let g:airline_stl_path_style = 'short' + +if !exists('g:airline_symbols') + let g:airline_symbols = {} +endif +let g:airline_symbols.branch = '⚡' +let g:airline_symbols.readonly = '⚡' +let g:airline_symbols.linenr = '⚡' +let g:airline_symbols.maxlinenr = '⚡' +let g:airline_symbols.dirty= '⚡' + +let g:airline_left_sep = '▶' +let g:airline_left_alt_sep = '❯' +let g:airline_right_sep = '◀' +let g:airline_right_alt_sep = '❮' +let g:airline_symbols.linenr = '¶' +let g:airline_symbols.branch = '⎇' diff --git a/install/vim/vimcolor/molokai.vim b/install/vim/vimcolor/molokai.vim new file mode 100755 index 0000000..6d97053 --- /dev/null +++ b/install/vim/vimcolor/molokai.vim @@ -0,0 +1,276 @@ +" Vim color file +" +" Author: Tomas Restrepo +" https://github.com/tomasr/molokai +" +" Note: Based on the Monokai theme for TextMate +" by Wimer Hazenberg and its darker variant +" by Hamish Stuart Macpherson +" + +hi clear + +if version > 580 + " no guarantees for version 5.8 and below, but this makes it stop + " complaining + hi clear + if exists("syntax_on") + syntax reset + endif +endif +let g:colors_name="molokai" + +if exists("g:molokai_original") + let s:molokai_original = g:molokai_original +else + let s:molokai_original = 0 +endif + + +hi Boolean guifg=#AE81FF +hi Character guifg=#E6DB74 +hi Number guifg=#AE81FF +hi String guifg=#E6DB74 +hi Conditional guifg=#F92672 gui=bold +hi Constant guifg=#AE81FF gui=bold +hi Cursor guifg=#000000 guibg=#F8F8F0 +hi iCursor guifg=#000000 guibg=#F8F8F0 +hi Debug guifg=#BCA3A3 gui=bold +hi Define guifg=#66D9EF +hi Delimiter guifg=#8F8F8F +hi DiffAdd guibg=#13354A +hi DiffChange guifg=#89807D guibg=#4C4745 +hi DiffDelete guifg=#960050 guibg=#1E0010 +hi DiffText guibg=#4C4745 gui=italic,bold + +hi Directory guifg=#A6E22E gui=bold +hi Error guifg=#E6DB74 guibg=#1E0010 +hi ErrorMsg guifg=#F92672 guibg=#232526 gui=bold +hi Exception guifg=#A6E22E gui=bold +hi Float guifg=#AE81FF +hi FoldColumn guifg=#465457 guibg=#000000 +hi Folded guifg=#465457 guibg=#000000 +hi Function guifg=#A6E22E +hi Identifier guifg=#FD971F +hi Ignore guifg=#808080 guibg=bg +hi IncSearch guifg=#C4BE89 guibg=#000000 + +hi Keyword guifg=#F92672 gui=bold +hi Label guifg=#E6DB74 gui=none +hi Macro guifg=#C4BE89 gui=italic +hi SpecialKey guifg=#66D9EF gui=italic + +hi MatchParen guifg=#000000 guibg=#FD971F gui=bold +hi ModeMsg guifg=#E6DB74 +hi MoreMsg guifg=#E6DB74 +hi Operator guifg=#F92672 + +" complete menu +hi Pmenu guifg=#66D9EF guibg=#000000 +hi PmenuSel guibg=#808080 +hi PmenuSbar guibg=#080808 +hi PmenuThumb guifg=#66D9EF + +hi PreCondit guifg=#A6E22E gui=bold +hi PreProc guifg=#A6E22E +hi Question guifg=#66D9EF +hi Repeat guifg=#F92672 gui=bold +hi Search guifg=#000000 guibg=#FFE792 +" marks +hi SignColumn guifg=#A6E22E guibg=#232526 +hi SpecialChar guifg=#F92672 gui=bold +hi SpecialComment guifg=#7E8E91 gui=bold +hi Special guifg=#66D9EF guibg=bg gui=italic +if has("spell") + hi SpellBad guisp=#FF0000 gui=undercurl + hi SpellCap guisp=#7070F0 gui=undercurl + hi SpellLocal guisp=#70F0F0 gui=undercurl + hi SpellRare guisp=#FFFFFF gui=undercurl +endif +hi Statement guifg=#F92672 gui=bold +hi StatusLine guifg=#455354 guibg=fg +hi StatusLineNC guifg=#808080 guibg=#080808 +hi StorageClass guifg=#FD971F gui=italic +hi Structure guifg=#66D9EF +hi Tag guifg=#F92672 gui=italic +hi Title guifg=#ef5939 +hi Todo guifg=#FFFFFF guibg=bg gui=bold + +hi Typedef guifg=#66D9EF +hi Type guifg=#66D9EF gui=none +hi Underlined guifg=#808080 gui=underline + +hi VertSplit guifg=#808080 guibg=#080808 gui=bold +hi VisualNOS guibg=#403D3D +hi Visual guibg=#403D3D +hi WarningMsg guifg=#FFFFFF guibg=#333333 gui=bold +hi WildMenu guifg=#66D9EF guibg=#000000 + +hi TabLineFill guifg=#1B1D1E guibg=#1B1D1E +hi TabLine guibg=#1B1D1E guifg=#808080 gui=none + +if s:molokai_original == 1 + hi Normal guifg=#F8F8F2 guibg=#272822 + hi Comment guifg=#75715E + hi CursorLine guibg=#3E3D32 + hi CursorLineNr guifg=#FD971F gui=none + hi CursorColumn guibg=#3E3D32 + hi ColorColumn guibg=#3B3A32 + hi LineNr guifg=#BCBCBC guibg=#3B3A32 + hi NonText guifg=#75715E + hi SpecialKey guifg=#75715E +else + hi Normal guifg=#F8F8F2 guibg=#1B1D1E + hi Comment guifg=#7E8E91 + hi CursorLine guibg=#293739 + hi CursorLineNr guifg=#FD971F gui=none + hi CursorColumn guibg=#293739 + hi ColorColumn guibg=#232526 + hi LineNr guifg=#465457 guibg=#232526 + hi NonText guifg=#465457 + hi SpecialKey guifg=#465457 +end + +" +" Support for 256-color terminal +" +if &t_Co > 255 + if s:molokai_original == 1 + hi Normal ctermbg=234 + hi CursorLine ctermbg=235 cterm=none + hi CursorLineNr ctermfg=208 cterm=none + else + hi Normal ctermfg=252 ctermbg=233 + hi CursorLine ctermbg=234 cterm=none + hi CursorLineNr ctermfg=208 cterm=none + endif + hi Boolean ctermfg=135 + hi Character ctermfg=144 + hi Number ctermfg=135 + hi String ctermfg=144 + hi Conditional ctermfg=161 cterm=bold + hi Constant ctermfg=135 cterm=bold + hi Cursor ctermfg=16 ctermbg=253 + hi Debug ctermfg=225 cterm=bold + hi Define ctermfg=81 + hi Delimiter ctermfg=241 + + hi DiffAdd ctermbg=24 + hi DiffChange ctermfg=181 ctermbg=239 + hi DiffDelete ctermfg=162 ctermbg=53 + hi DiffText ctermbg=102 cterm=bold + + hi Directory ctermfg=118 cterm=bold + hi Error ctermfg=219 ctermbg=89 + hi ErrorMsg ctermfg=199 ctermbg=16 cterm=bold + hi Exception ctermfg=118 cterm=bold + hi Float ctermfg=135 + hi FoldColumn ctermfg=67 ctermbg=16 + hi Folded ctermfg=67 ctermbg=16 + hi Function ctermfg=118 + hi Identifier ctermfg=208 cterm=none + hi Ignore ctermfg=244 ctermbg=232 + hi IncSearch ctermfg=193 ctermbg=16 + + hi keyword ctermfg=161 cterm=bold + hi Label ctermfg=229 cterm=none + hi Macro ctermfg=193 + hi SpecialKey ctermfg=81 + + hi MatchParen ctermfg=233 ctermbg=208 cterm=bold + hi ModeMsg ctermfg=229 + hi MoreMsg ctermfg=229 + hi Operator ctermfg=161 + + " complete menu + hi Pmenu ctermfg=81 ctermbg=16 + hi PmenuSel ctermfg=255 ctermbg=242 + hi PmenuSbar ctermbg=232 + hi PmenuThumb ctermfg=81 + + hi PreCondit ctermfg=118 cterm=bold + hi PreProc ctermfg=118 + hi Question ctermfg=81 + hi Repeat ctermfg=161 cterm=bold + hi Search ctermfg=0 ctermbg=222 cterm=NONE + + " marks column + hi SignColumn ctermfg=118 ctermbg=235 + hi SpecialChar ctermfg=161 cterm=bold + hi SpecialComment ctermfg=245 cterm=bold + hi Special ctermfg=81 + if has("spell") + hi SpellBad ctermbg=52 + hi SpellCap ctermbg=17 + hi SpellLocal ctermbg=17 + hi SpellRare ctermfg=none ctermbg=none cterm=reverse + endif + hi Statement ctermfg=161 cterm=bold + hi StatusLine ctermfg=238 ctermbg=253 + hi StatusLineNC ctermfg=244 ctermbg=232 + hi StorageClass ctermfg=208 + hi Structure ctermfg=81 + hi Tag ctermfg=161 + hi Title ctermfg=166 + hi Todo ctermfg=231 ctermbg=232 cterm=bold + + hi Typedef ctermfg=81 + hi Type ctermfg=81 cterm=none + hi Underlined ctermfg=244 cterm=underline + + hi VertSplit ctermfg=244 ctermbg=232 cterm=bold + hi VisualNOS ctermbg=238 + hi Visual ctermbg=235 + hi WarningMsg ctermfg=231 ctermbg=238 cterm=bold + hi WildMenu ctermfg=81 ctermbg=16 + + hi Comment ctermfg=59 + hi CursorColumn ctermbg=236 + hi ColorColumn ctermbg=236 + hi LineNr ctermfg=250 ctermbg=236 + hi NonText ctermfg=59 + + hi SpecialKey ctermfg=59 + + if exists("g:rehash256") && g:rehash256 == 1 + hi Normal ctermfg=252 ctermbg=234 + hi CursorLine ctermbg=236 cterm=none + hi CursorLineNr ctermfg=208 cterm=none + + hi Boolean ctermfg=141 + hi Character ctermfg=222 + hi Number ctermfg=141 + hi String ctermfg=222 + hi Conditional ctermfg=197 cterm=bold + hi Constant ctermfg=141 cterm=bold + + hi DiffDelete ctermfg=125 ctermbg=233 + + hi Directory ctermfg=154 cterm=bold + hi Error ctermfg=222 ctermbg=233 + hi Exception ctermfg=154 cterm=bold + hi Float ctermfg=141 + hi Function ctermfg=154 + hi Identifier ctermfg=208 + + hi Keyword ctermfg=197 cterm=bold + hi Operator ctermfg=197 + hi PreCondit ctermfg=154 cterm=bold + hi PreProc ctermfg=154 + hi Repeat ctermfg=197 cterm=bold + + hi Statement ctermfg=197 cterm=bold + hi Tag ctermfg=197 + hi Title ctermfg=203 + hi Visual ctermbg=238 + + hi Comment ctermfg=244 + hi LineNr ctermfg=239 ctermbg=235 + hi NonText ctermfg=239 + hi SpecialKey ctermfg=239 + endif +end + +" Must be at the end, because of ctermbg=234 bug. +" https://groups.google.com/forum/#!msg/vim_dev/afPqwAFNdrU/nqh6tOM87QUJ +set background=dark diff --git a/install/vim/vimcolor/onedark.vim b/install/vim/vimcolor/onedark.vim new file mode 100755 index 0000000..161b99c --- /dev/null +++ b/install/vim/vimcolor/onedark.vim @@ -0,0 +1,5 @@ +let g:onedark_config = { + \ 'style': 'deep', + \ 'TSKeyword': {'fg': '$green'}, + \ } +colorscheme onedark diff --git a/install/vim/vimcolor/onehalfdark.vim b/install/vim/vimcolor/onehalfdark.vim new file mode 100755 index 0000000..abbd67f --- /dev/null +++ b/install/vim/vimcolor/onehalfdark.vim @@ -0,0 +1,224 @@ +" ============================================================================== +" Name: One Half Dark +" Author: Son A. Pham +" Url: https://github.com/sonph/onehalf +" License: The MIT License (MIT) +" +" A dark vim color scheme based on Atom's One. See github.com/sonph/onehalf +" for installation instructions, a light color scheme, versions for other +" editors/terminals, and a matching theme for vim-airline. +" ============================================================================== + +set background=dark +highlight clear +syntax reset + +let g:colors_name="onehalfdark" +let colors_name="onehalfdark" + + +let s:black = { "gui": "#282c34", "cterm": "236" } +let s:red = { "gui": "#e06c75", "cterm": "168" } +let s:green = { "gui": "#98c379", "cterm": "114" } +let s:yellow = { "gui": "#e5c07b", "cterm": "180" } +let s:blue = { "gui": "#61afef", "cterm": "75" } +let s:purple = { "gui": "#c678dd", "cterm": "176" } +let s:cyan = { "gui": "#56b6c2", "cterm": "73" } +let s:white = { "gui": "#dcdfe4", "cterm": "188" } + +let s:fg = s:white +let s:bg = s:black + +let s:comment_fg = { "gui": "#5c6370", "cterm": "241" } +let s:gutter_bg = { "gui": "#282c34", "cterm": "236" } +let s:gutter_fg = { "gui": "#919baa", "cterm": "247" } +let s:non_text = { "gui": "#373C45", "cterm": "239" } + +let s:cursor_line = { "gui": "#313640", "cterm": "237" } +let s:color_col = { "gui": "#313640", "cterm": "237" } + +let s:selection = { "gui": "#474e5d", "cterm": "239" } +let s:vertsplit = { "gui": "#313640", "cterm": "237" } + + +function! s:h(group, fg, bg, attr) + if type(a:fg) == type({}) + exec "hi " . a:group . " guifg=" . a:fg.gui . " ctermfg=" . a:fg.cterm + else + exec "hi " . a:group . " guifg=NONE cterm=NONE" + endif + if type(a:bg) == type({}) + exec "hi " . a:group . " guibg=" . a:bg.gui . " ctermbg=" . a:bg.cterm + else + exec "hi " . a:group . " guibg=NONE ctermbg=NONE" + endif + if a:attr != "" + exec "hi " . a:group . " gui=" . a:attr . " cterm=" . a:attr + else + exec "hi " . a:group . " gui=NONE cterm=NONE" + endif +endfun + + +" User interface colors { +call s:h("Normal", s:fg, s:bg, "") + +call s:h("Cursor", s:bg, s:blue, "") +call s:h("CursorColumn", "", s:cursor_line, "") +call s:h("CursorLine", "", s:cursor_line, "") + +call s:h("LineNr", s:gutter_fg, s:gutter_bg, "") +call s:h("CursorLineNr", s:fg, "", "") + +call s:h("DiffAdd", s:green, "", "") +call s:h("DiffChange", s:yellow, "", "") +call s:h("DiffDelete", s:red, "", "") +call s:h("DiffText", s:blue, "", "") + +call s:h("IncSearch", s:bg, s:yellow, "") +call s:h("Search", s:bg, s:yellow, "") + +call s:h("ErrorMsg", s:fg, "", "") +call s:h("ModeMsg", s:fg, "", "") +call s:h("MoreMsg", s:fg, "", "") +call s:h("WarningMsg", s:red, "", "") +call s:h("Question", s:purple, "", "") + +call s:h("Pmenu", s:bg, s:fg, "") +call s:h("PmenuSel", s:fg, s:blue, "") +call s:h("PmenuSbar", "", s:selection, "") +call s:h("PmenuThumb", "", s:fg, "") + +call s:h("SpellBad", s:red, "", "") +call s:h("SpellCap", s:yellow, "", "") +call s:h("SpellLocal", s:yellow, "", "") +call s:h("SpellRare", s:yellow, "", "") + +call s:h("StatusLine", s:blue, s:cursor_line, "") +call s:h("StatusLineNC", s:comment_fg, s:cursor_line, "") +call s:h("TabLine", s:comment_fg, s:cursor_line, "") +call s:h("TabLineFill", s:comment_fg, s:cursor_line, "") +call s:h("TabLineSel", s:fg, s:bg, "") + +call s:h("Visual", "", s:selection, "") +call s:h("VisualNOS", "", s:selection, "") + +call s:h("ColorColumn", "", s:color_col, "") +call s:h("Conceal", s:fg, "", "") +call s:h("Directory", s:blue, "", "") +call s:h("VertSplit", s:vertsplit, s:vertsplit, "") +call s:h("Folded", s:fg, "", "") +call s:h("FoldColumn", s:fg, "", "") +call s:h("SignColumn", s:fg, "", "") + +call s:h("MatchParen", s:blue, "", "underline") +call s:h("SpecialKey", s:fg, "", "") +call s:h("Title", s:green, "", "") +call s:h("WildMenu", s:fg, "", "") +" } + + +" Syntax colors { +" Whitespace is defined in Neovim, not Vim. +" See :help hl-Whitespace and :help hl-SpecialKey +call s:h("Whitespace", s:non_text, "", "") +call s:h("NonText", s:non_text, "", "") +call s:h("Comment", s:comment_fg, "", "italic") +call s:h("Constant", s:cyan, "", "") +call s:h("String", s:green, "", "") +call s:h("Character", s:green, "", "") +call s:h("Number", s:yellow, "", "") +call s:h("Boolean", s:yellow, "", "") +call s:h("Float", s:yellow, "", "") + +call s:h("Identifier", s:red, "", "") +call s:h("Function", s:blue, "", "") +call s:h("Statement", s:purple, "", "") + +call s:h("Conditional", s:purple, "", "") +call s:h("Repeat", s:purple, "", "") +call s:h("Label", s:purple, "", "") +call s:h("Operator", s:fg, "", "") +call s:h("Keyword", s:red, "", "") +call s:h("Exception", s:purple, "", "") + +call s:h("PreProc", s:yellow, "", "") +call s:h("Include", s:purple, "", "") +call s:h("Define", s:purple, "", "") +call s:h("Macro", s:purple, "", "") +call s:h("PreCondit", s:yellow, "", "") + +call s:h("Type", s:yellow, "", "") +call s:h("StorageClass", s:yellow, "", "") +call s:h("Structure", s:yellow, "", "") +call s:h("Typedef", s:yellow, "", "") + +call s:h("Special", s:blue, "", "") +call s:h("SpecialChar", s:fg, "", "") +call s:h("Tag", s:fg, "", "") +call s:h("Delimiter", s:fg, "", "") +call s:h("SpecialComment", s:fg, "", "") +call s:h("Debug", s:fg, "", "") +call s:h("Underlined", s:fg, "", "") +call s:h("Ignore", s:fg, "", "") +call s:h("Error", s:red, s:gutter_bg, "") +call s:h("Todo", s:purple, "", "") +" } + + +" Plugins { +" GitGutter +call s:h("GitGutterAdd", s:green, s:gutter_bg, "") +call s:h("GitGutterDelete", s:red, s:gutter_bg, "") +call s:h("GitGutterChange", s:yellow, s:gutter_bg, "") +call s:h("GitGutterChangeDelete", s:red, s:gutter_bg, "") +" Fugitive +call s:h("diffAdded", s:green, "", "") +call s:h("diffRemoved", s:red, "", "") +" } + + +" Git { +call s:h("gitcommitComment", s:comment_fg, "", "") +call s:h("gitcommitUnmerged", s:red, "", "") +call s:h("gitcommitOnBranch", s:fg, "", "") +call s:h("gitcommitBranch", s:purple, "", "") +call s:h("gitcommitDiscardedType", s:red, "", "") +call s:h("gitcommitSelectedType", s:green, "", "") +call s:h("gitcommitHeader", s:fg, "", "") +call s:h("gitcommitUntrackedFile", s:cyan, "", "") +call s:h("gitcommitDiscardedFile", s:red, "", "") +call s:h("gitcommitSelectedFile", s:green, "", "") +call s:h("gitcommitUnmergedFile", s:yellow, "", "") +call s:h("gitcommitFile", s:fg, "", "") +hi link gitcommitNoBranch gitcommitBranch +hi link gitcommitUntracked gitcommitComment +hi link gitcommitDiscarded gitcommitComment +hi link gitcommitSelected gitcommitComment +hi link gitcommitDiscardedArrow gitcommitDiscardedFile +hi link gitcommitSelectedArrow gitcommitSelectedFile +hi link gitcommitUnmergedArrow gitcommitUnmergedFile +" } + +" Fix colors in neovim terminal buffers { + if has('nvim') + let g:terminal_color_0 = s:black.gui + let g:terminal_color_1 = s:red.gui + let g:terminal_color_2 = s:green.gui + let g:terminal_color_3 = s:yellow.gui + let g:terminal_color_4 = s:blue.gui + let g:terminal_color_5 = s:purple.gui + let g:terminal_color_6 = s:cyan.gui + let g:terminal_color_7 = s:white.gui + let g:terminal_color_8 = s:black.gui + let g:terminal_color_9 = s:red.gui + let g:terminal_color_10 = s:green.gui + let g:terminal_color_11 = s:yellow.gui + let g:terminal_color_12 = s:blue.gui + let g:terminal_color_13 = s:purple.gui + let g:terminal_color_14 = s:cyan.gui + let g:terminal_color_15 = s:white.gui + let g:terminal_color_background = s:bg.gui + let g:terminal_color_foreground = s:fg.gui + endif +" } diff --git a/install/vim/vimcolor/onehalflight.vim b/install/vim/vimcolor/onehalflight.vim new file mode 100755 index 0000000..288fcd0 --- /dev/null +++ b/install/vim/vimcolor/onehalflight.vim @@ -0,0 +1,224 @@ +" ============================================================================== +" Name: One Half Light +" Author: Son A. Pham +" Url: https://github.com/sonph/onehalf +" License: The MIT License (MIT) +" +" A light vim color scheme based on Atom's One. See github.com/sonph/onehalf +" for installation instructions, a dark color scheme, versions for other +" editors/terminals, and a matching theme for vim-airline. +" ============================================================================== + +set background=light +highlight clear +syntax reset + +let g:colors_name="onehalflight" +let colors_name="onehalflight" + + +let s:black = { "gui": "#383a42", "cterm": "237" } +let s:red = { "gui": "#e45649", "cterm": "167" } +let s:green = { "gui": "#50a14f", "cterm": "71" } +let s:yellow = { "gui": "#c18401", "cterm": "136" } +let s:blue = { "gui": "#0184bc", "cterm": "31" } +let s:purple = { "gui": "#a626a4", "cterm": "127" } +let s:cyan = { "gui": "#0997b3", "cterm": "31" } +let s:white = { "gui": "#fafafa", "cterm": "231" } + +let s:fg = s:black +let s:bg = s:white + +let s:comment_fg = { "gui": "#a0a1a7", "cterm": "247" } +let s:gutter_bg = { "gui": "#fafafa", "cterm": "231" } +let s:gutter_fg = { "gui": "#d4d4d4", "cterm": "252" } +let s:non_text = { "gui": "#e5e5e5", "cterm": "252" } + +let s:cursor_line = { "gui": "#f0f0f0", "cterm": "255" } +let s:color_col = { "gui": "#f0f0f0", "cterm": "255" } + +let s:selection = { "gui": "#bfceff", "cterm": "153" } +let s:vertsplit = { "gui": "#f0f0f0", "cterm": "255" } + + +function! s:h(group, fg, bg, attr) + if type(a:fg) == type({}) + exec "hi " . a:group . " guifg=" . a:fg.gui . " ctermfg=" . a:fg.cterm + else + exec "hi " . a:group . " guifg=NONE cterm=NONE" + endif + if type(a:bg) == type({}) + exec "hi " . a:group . " guibg=" . a:bg.gui . " ctermbg=" . a:bg.cterm + else + exec "hi " . a:group . " guibg=NONE ctermbg=NONE" + endif + if a:attr != "" + exec "hi " . a:group . " gui=" . a:attr . " cterm=" . a:attr + else + exec "hi " . a:group . " gui=NONE cterm=NONE" + endif +endfun + + +" User interface colors { +call s:h("Normal", s:fg, s:bg, "") + +call s:h("Cursor", s:bg, s:blue, "") +call s:h("CursorColumn", "", s:cursor_line, "") +call s:h("CursorLine", "", s:cursor_line, "") + +call s:h("LineNr", s:gutter_fg, s:gutter_bg, "") +call s:h("CursorLineNr", s:fg, "", "") + +call s:h("DiffAdd", s:green, "", "") +call s:h("DiffChange", s:yellow, "", "") +call s:h("DiffDelete", s:red, "", "") +call s:h("DiffText", s:blue, "", "") + +call s:h("IncSearch", s:bg, s:yellow, "") +call s:h("Search", s:bg, s:yellow, "") + +call s:h("ErrorMsg", s:fg, "", "") +call s:h("ModeMsg", s:fg, "", "") +call s:h("MoreMsg", s:fg, "", "") +call s:h("WarningMsg", s:red, "", "") +call s:h("Question", s:purple, "", "") + +call s:h("Pmenu", s:fg, s:cursor_line, "") +call s:h("PmenuSel", s:bg, s:blue, "") +call s:h("PmenuSbar", "", s:cursor_line, "") +call s:h("PmenuThumb", "", s:comment_fg, "") + +call s:h("SpellBad", s:red, "", "") +call s:h("SpellCap", s:yellow, "", "") +call s:h("SpellLocal", s:yellow, "", "") +call s:h("SpellRare", s:yellow, "", "") + +call s:h("StatusLine", s:blue, s:cursor_line, "") +call s:h("StatusLineNC", s:comment_fg, s:cursor_line, "") +call s:h("TabLine", s:comment_fg, s:cursor_line, "") +call s:h("TabLineFill", s:comment_fg, s:cursor_line, "") +call s:h("TabLineSel", s:fg, s:bg, "") + +call s:h("Visual", "", s:selection, "") +call s:h("VisualNOS", "", s:selection, "") + +call s:h("ColorColumn", "", s:color_col, "") +call s:h("Conceal", s:fg, "", "") +call s:h("Directory", s:blue, "", "") +call s:h("VertSplit", s:vertsplit, s:vertsplit, "") +call s:h("Folded", s:fg, "", "") +call s:h("FoldColumn", s:fg, "", "") +call s:h("SignColumn", s:fg, "", "") + +call s:h("MatchParen", s:blue, "", "underline") +call s:h("SpecialKey", s:fg, "", "") +call s:h("Title", s:green, "", "") +call s:h("WildMenu", s:fg, "", "") +" } + + +" Syntax colors { +" Whitespace is defined in Neovim, not Vim. +" See :help hl-Whitespace and :help hl-SpecialKey +call s:h("Whitespace", s:non_text, "", "") +call s:h("NonText", s:non_text, "", "") +call s:h("Comment", s:comment_fg, "", "italic") +call s:h("Constant", s:cyan, "", "") +call s:h("String", s:green, "", "") +call s:h("Character", s:green, "", "") +call s:h("Number", s:yellow, "", "") +call s:h("Boolean", s:yellow, "", "") +call s:h("Float", s:yellow, "", "") + +call s:h("Identifier", s:red, "", "") +call s:h("Function", s:blue, "", "") +call s:h("Statement", s:purple, "", "") + +call s:h("Conditional", s:purple, "", "") +call s:h("Repeat", s:purple, "", "") +call s:h("Label", s:purple, "", "") +call s:h("Operator", s:fg, "", "") +call s:h("Keyword", s:red, "", "") +call s:h("Exception", s:purple, "", "") + +call s:h("PreProc", s:yellow, "", "") +call s:h("Include", s:purple, "", "") +call s:h("Define", s:purple, "", "") +call s:h("Macro", s:purple, "", "") +call s:h("PreCondit", s:yellow, "", "") + +call s:h("Type", s:yellow, "", "") +call s:h("StorageClass", s:yellow, "", "") +call s:h("Structure", s:yellow, "", "") +call s:h("Typedef", s:yellow, "", "") + +call s:h("Special", s:blue, "", "") +call s:h("SpecialChar", s:fg, "", "") +call s:h("Tag", s:fg, "", "") +call s:h("Delimiter", s:fg, "", "") +call s:h("SpecialComment", s:fg, "", "") +call s:h("Debug", s:fg, "", "") +call s:h("Underlined", s:fg, "", "") +call s:h("Ignore", s:fg, "", "") +call s:h("Error", s:red, s:gutter_bg, "") +call s:h("Todo", s:purple, "", "") +" } + + +" Plugins { +" GitGutter +call s:h("GitGutterAdd", s:green, s:gutter_bg, "") +call s:h("GitGutterDelete", s:red, s:gutter_bg, "") +call s:h("GitGutterChange", s:yellow, s:gutter_bg, "") +call s:h("GitGutterChangeDelete", s:red, s:gutter_bg, "") +" Fugitive +call s:h("diffAdded", s:green, "", "") +call s:h("diffRemoved", s:red, "", "") +" } + + +" Git { +call s:h("gitcommitComment", s:comment_fg, "", "") +call s:h("gitcommitUnmerged", s:red, "", "") +call s:h("gitcommitOnBranch", s:fg, "", "") +call s:h("gitcommitBranch", s:purple, "", "") +call s:h("gitcommitDiscardedType", s:red, "", "") +call s:h("gitcommitSelectedType", s:green, "", "") +call s:h("gitcommitHeader", s:fg, "", "") +call s:h("gitcommitUntrackedFile", s:cyan, "", "") +call s:h("gitcommitDiscardedFile", s:red, "", "") +call s:h("gitcommitSelectedFile", s:green, "", "") +call s:h("gitcommitUnmergedFile", s:yellow, "", "") +call s:h("gitcommitFile", s:fg, "", "") +hi link gitcommitNoBranch gitcommitBranch +hi link gitcommitUntracked gitcommitComment +hi link gitcommitDiscarded gitcommitComment +hi link gitcommitSelected gitcommitComment +hi link gitcommitDiscardedArrow gitcommitDiscardedFile +hi link gitcommitSelectedArrow gitcommitSelectedFile +hi link gitcommitUnmergedArrow gitcommitUnmergedFile +" } + +" Fix colors in neovim terminal buffers { + if has('nvim') + let g:terminal_color_0 = s:black.gui + let g:terminal_color_1 = s:red.gui + let g:terminal_color_2 = s:green.gui + let g:terminal_color_3 = s:yellow.gui + let g:terminal_color_4 = s:blue.gui + let g:terminal_color_5 = s:purple.gui + let g:terminal_color_6 = s:cyan.gui + let g:terminal_color_7 = s:white.gui + let g:terminal_color_8 = s:black.gui + let g:terminal_color_9 = s:red.gui + let g:terminal_color_10 = s:green.gui + let g:terminal_color_11 = s:yellow.gui + let g:terminal_color_12 = s:blue.gui + let g:terminal_color_13 = s:purple.gui + let g:terminal_color_14 = s:cyan.gui + let g:terminal_color_15 = s:white.gui + let g:terminal_color_background = s:bg.gui + let g:terminal_color_foreground = s:fg.gui + endif +" } diff --git a/install/vim/vimcolor/rainbow.vim b/install/vim/vimcolor/rainbow.vim new file mode 100755 index 0000000..7eda438 --- /dev/null +++ b/install/vim/vimcolor/rainbow.vim @@ -0,0 +1,25 @@ +let g:rainbow_active = 1 + +let g:rainbow_conf = { + \ 'guifgs': ['royalblue3', 'darkorange3', 'seagreen3', 'firebrick'], + \ 'ctermfgs': ['blue', 'yellow', 'cyan', 'magenta'], + \ 'operators': '_,_', + \ 'parentheses': ['start=/(/ end=/)/ fold', 'start=/\[/ end=/\]/ fold', 'start=/{/ end=/}/ fold'], + \ 'separately': { + \ '*': {}, + \ 'tex': { + \ 'parentheses': ['start=/(/ end=/)/', 'start=/\[/ end=/\]/'], + \ }, + \ 'lisp': { + \ 'guifgs': ['royalblue3', 'darkorange3', 'seagreen3', 'firebrick', 'darkorchid3'], + \ }, + \ 'vim': { + \ 'parentheses': ['start=/(/ end=/)/', 'start=/\[/ end=/\]/', 'start=/{/ end=/}/ fold', 'start=/(/ end=/)/ containedin=vimFuncBody', 'start=/\[/ end=/\]/ containedin=vimFuncBody', 'start=/{/ end=/}/ fold containedin=vimFuncBody'], + \ }, + \ 'html': { + \ 'parentheses': ['start=/\v\<((area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)[ >])@!\z([-_:a-zA-Z0-9]+)(\s+[-_:a-zA-Z0-9]+(\=("[^"]*"|'."'".'[^'."'".']*'."'".'|[^ '."'".'"><=`]*))?)*\>/ end=## fold'], + \ }, + \ 'css': 0, + \ 'nerdtree': 0, + \ } + \ } diff --git a/install/vim/vimcolor/setCpp.vim b/install/vim/vimcolor/setCpp.vim new file mode 100755 index 0000000..d027b5b --- /dev/null +++ b/install/vim/vimcolor/setCpp.vim @@ -0,0 +1,6 @@ +let g:cpp_class_scope_highlight = 1 +let g:cpp_member_variable_highlight = 1 +let g:cpp_class_decl_highlight = 1 +let g:cpp_experimental_simple_template_highlight = 1 +let g:cpp_concepts_highlight = 1 +let g:cpp_no_function_highlight = 1 diff --git a/install/vim/vimcolor/solarized-master/.gitmodules b/install/vim/vimcolor/solarized-master/.gitmodules new file mode 100755 index 0000000..e69de29 diff --git a/install/vim/vimcolor/solarized-master/CHANGELOG.mkd b/install/vim/vimcolor/solarized-master/CHANGELOG.mkd new file mode 100755 index 0000000..ec00a76 --- /dev/null +++ b/install/vim/vimcolor/solarized-master/CHANGELOG.mkd @@ -0,0 +1,148 @@ +Solarized Changelog +=================== + +## Current release 1.0.0beta2 + +1.0.0beta2 +---------- + +### Summary + +Switch to the alternative red hue (final and only hue change), included a whole +heap of new ports and updates to the existing Vim colorscheme. The list of all +currently included ports, highlighted items are new, updates noted: + +#### Editors & IDEs + +* \[UPDATED\] **Vim** +* \[NEW\] ***Emacs*** +* \[NEW\] ***IntelliJ IDEA*** +* \[NEW\] ***NetBeans*** +* \[NEW\] ***SeeStyle theme for Coda & SubEthaEdit*** +* \[NEW\] ***TextMate*** +* \[NEW\] ***Visual Studio*** + +#### Terminal Emulators + +* \[UPDATED\] **iTerm2 colorschemes** +* \[UPDATED\] **OS X Terminal.app colors** +* \[UPDATED\] **Xresources colors** + +#### Other Applications + +* \[UPDATED\] **Mutt mail client colorschemes** + +#### Palettes + +* \[UPDATED\] **Adobe Photoshop Swatches** +* \[UPDATED\] **Apple Color Picker Palette** +* \[UPDATED\] **Gimp Palette** + + +### Critical Changes + +These changes may require you to change your configuration. + +* **GLOBAL : IMPROVEMENT : New red accent color value** + Modified red from L\*a\*b lightness value 45 to 50 to bring it in + line with the other accent colors and address bleed into dark background on + some displays, as well as reducing shift of red against base03 when viewed + with glasses (chromatic aberration). All instances of the colorscheme and + palettes updated to new red and avalailable for use/import without further + modification. Forks and ports should pull new changes and/or update ported + red value accordingly. The new red: + + red #dc322f + +* **VIM : CHANGE : Default mode now 16 color** + Default terminal mode is now ***16 colors***. Most of the users of terminal + mode seem comfortabel and capable changing terminal colors. This is the + preferred method of implementing Solarized in Terminal mode. If you wish to + instead use the degraded 256 color palette, you may do so with the + following line in your .vimrc: + + let g:solarized_termcolors=256 + + You no longer need to specify "let g:solarized_termcolors=16" as it is now + the default; leaving it in your .vimrc won't hurt anything, however. + +* **VIM : IMPROVEMENT : New Toggle Background Plugin** + Added new Toggle Background plugin. Will load automatically and show up as + a menu item in the `Window` menu in gui vim. Automatically maps to + `` if available (won't clobber that mapping if you're using it). + Also available as a command `:ToggleBG`. To manually map to + something other than ``: + + To set your own mapping in your .vimrc file, simply add the following line + to support normal, insert and visual mode usage, changing the + "``" value to the key or key combination you wish to use: + + call togglebg#map("") + + Note that you'll want to use a single function key or equivalent if you want + the plugin to work in all modes (normal, insert, visual). + +* **VIM : IMPROVEMENT : Special & Non-text items now more visible** + Special characters such as trailing whitespace, tabs, newlines, when + displayed using ":set list" can be set to one of three levels depending on + your needs. + + let g:solarized_visibility = "normal"| "high" or "low" + + I'll be honest: I still prefer low visibility. I like them barely there. + They show up in lines that are highlighted as by the cursor line, which + works for me. If you are with me on this, put the following in your .vimrc: + + let g:solarized_visibility = "low" + +### Non Critical Changes + +These changes should not impact your usage of the Solarized. + +* **PALETTES : IMPROVEMENT : Colorspace tagged and untagged versions** + Changed default OS X color picker palatte swatches to tagged colors (sRGB) + and included alternate palette with untagged color swatches for advanced + users (v1.0.0beta1 had untagged as default). + +* **VIM : BUGFIX : Better display in Terminal.app, other emulators** + Terminal.app and other common terminal emulators that report 8 color mode + had display issues due to order of synt highlighting definitions and color + values specified. These have been conformed and reordered in such a way + that there is a more graceful degrading of the Solarized color palette on + 8 color terminals. Infact, the experience should be almost identical to gui + other than lack of bold typeface. + +* **VIM : BUGFIX : Better distinction between status bar and split windows** + Status bar was previously too similar to the cursor line and window splits. + This has now been changed significantly to improve the clarity of what is + status, cursor line and window separator. + +* **VIM : STREAMLINED : Removed simultaneous gui/cterm definitions** +* Refactored solarized.vim to eliminate simultaneous definition of gui and + cterm values. + +* **VIM : BUGFIX : Removed italicized front in terminal mode** + Removed default italicized font in terminal mode in the Solarized Vim + colorscheme (many terminal emulators display Vim italics as reversed type). + Italics still used in GUI mode by default and can still be turned off in + both modes by setting a variable: `let g:solarized_italic=0`. + +1.0.0beta1 +---------- + +First public release. Included: + +* Adobe Photoshop Swatches +* Apple Color Picker Palette +* Gimp Palette +* iTerm2 colorschemes +* Mutt mail client colorschemes +* OS X Terminal.app colors +* Vim Colorscheme +* Xresources colors + + + +*** + +MODIFIED: 2011 Apr 16 diff --git a/install/vim/vimcolor/solarized-master/DEVELOPERS.mkd b/install/vim/vimcolor/solarized-master/DEVELOPERS.mkd new file mode 100755 index 0000000..f95aaf8 --- /dev/null +++ b/install/vim/vimcolor/solarized-master/DEVELOPERS.mkd @@ -0,0 +1,57 @@ +--- +Title: Solarized Developers +Description: Notes and Guidelines on Port Development +Author: Ethan Schoonover +Tags: test, testing, test123 +Colors: light yellow +Created: 2011 Mar 15 +Modified: 2011 Apr 14 + +--- + +Solarized Developers +==================== + +## Notes and Guidelines on Port Development + +When developing a port of the Solarized colorscheme that you'd like to see +included in the main project repository, please consider the following +guidelines: + +1. No hue or color changes. Please keep the same hex/rgb/L*a*b values. If you + want to change them, that's fine, but I'd recommend setting it up as a + +2. If you are making a new port, consider creating a repository with just the + theme/plugin for your particular port, rather than forking the entire + Solarized master repository. This allows your users to pull down just the + theme for the application easily. I can also pull in your repository using + git-subtree as a subdirectory of the master Solarized project. This is what + I do with the Vim and Mutt themes (they each have an independent repo for + the convenience of those cloning the project directly into their vim/mutt + configuration). + +3. If you are going to fork and modify code, please check to see who the + maintainer for the specific Solarized component is. Mail me if you can't + find that information in the README for the specific port. + +### README guidlines + +Please include a README for your project that contains the following +information: + +1. A link to the main solarized project page: + http://ethanschoonover.com/solarized + This page will also have links back to your port/repo as well as + attribution. I want to maintain it as the canonical clearing house for all + ports, etc. + +2. A link to your project repository + +3. A link to the main solarized repository on github (in addition to the link + to the main site above) + +4. Installation instructions as necessary for your port + +See the vim-colors-solarized subdirectory for an example of this. Your README +doesn't need to be this elaborate, of course, but should be clear enough that +users can get up and running. diff --git a/install/vim/vimcolor/solarized-master/LICENSE b/install/vim/vimcolor/solarized-master/LICENSE new file mode 100755 index 0000000..ee08d7e --- /dev/null +++ b/install/vim/vimcolor/solarized-master/LICENSE @@ -0,0 +1,20 @@ +Copyright (c) 2011 Ethan Schoonover + +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. + diff --git a/install/vim/vimcolor/solarized-master/README.md b/install/vim/vimcolor/solarized-master/README.md new file mode 100755 index 0000000..d18ee94 --- /dev/null +++ b/install/vim/vimcolor/solarized-master/README.md @@ -0,0 +1,413 @@ +--- +title: Solarized +description: Precision colors for machines and people +author: Ethan Schoonover +tags: test, testing, test123 +colors: light yellow +created: 2011 Mar 15 +modified: 2011 Apr 16 + +--- + +Solarized +========= + +## Precision colors for machines and people + +[![solarized dualmode](https://github.com/altercation/solarized/raw/master/img/solarized-yinyang.png)](#features) + +Solarized is a sixteen color palette (eight monotones, eight accent colors) +designed for use with terminal and gui applications. It has several [unique +properties](#features). I designed this colorscheme with both precise +[CIELAB](http://en.wikipedia.org/wiki/Lab_color_space) lightness relationships +and a refined set of hues based on fixed color wheel relationships. It has been +tested extensively in real world use on color calibrated displays (as well as +uncalibrated/intentionally miscalibrated displays) and in a variety of lighting +conditions. + +***See the [changelog] for what's new in the most recent release.*** + +![solarized palette](https://github.com/altercation/solarized/raw/master/img/solarized-palette.png) + +![solarized vim](https://github.com/altercation/solarized/raw/master/img/solarized-vim.png) + +Currently available in formats for (cf [screenshots](#screenshots) below): + +### Editors & IDEs + +* **Vim** by [me](https://github.com/altercation) (the Vim-only portion of Solarized is + [available here](https://github.com/altercation/vim-colors-solarized), for use with + Pathogen, etc.). See also the [Vim README](http://ethanschoonover.com/solarized/vim-colors-solarized). +* **Emacs** courtesy of [Greg Pfeil](http://blog.technomadic.org) + ([@sellout](http://twitter.com/sellout)) + in the main repo and in a [standalone repository][Emacs Repository] +* **IntelliJ IDEA** + courtesy of [Johan Kaving](https://github.com/jkaving) and + ([@flangy](http://twitter.com/flangy)) + in the main repo and in a [standalone repository][IntelliJ Repository] +* **NetBeans** courtesy of [Brian Fenton](https://github.com/fentie) and + in the main repo and in a [standalone repository][NetBeans Repository] +* **SeeStyle theme for Coda & SubEthaEdit** courtesy of + [Justin Hileman](http://justinhileman.com/) + ([@bobthecow](http://twitter.com/bobthecow)), + in the main repo and in a + [standalone repository][SeeStyle-Coda-SubEthaEdit Repository] +* **TextMate** --- ***NOTE:*** Dark Theme is work in progress\ + courtesy of [Tom Martin](http://thedeplorableword.net/) + ([@deplorableword](http://twitter.com/deplorableword)) + in the main repo and in a [standalone repository][TextMate Repository] + (with key work from [Mark Story](http://mark-story.com) + and [Brian Mathiyakom](http://brian.rarevisions.net)) +* **TextWrangler & BBEdit** courtesy of [Rui Carmo](http://the.taoofmac.com) + ([@taoofmac](http://twitter.com/taoofmac)) + in the main repo and in a [standalone repository][TextWrangler-BBEdit Repository] +* **Visual Studio** courtesy of [David Thibault](http://www.leddt.com) + ([@leddt](http://twitter.com/leddt)) + in the main repo and in a [standalone repository][Visual Studio Repository] + +* **Xcode** work in progress ports are available for [Xcode 3] and [Xcode 4] + and will be pulled into the main Solarized project soon. + +### Terminal Emulators + +* **Xresources** / Xdefaults +* **iTerm2** +* **OS X Terminal.app** +* **Putty** courtesy [Brant Bobby](http://www.control-v.net) + and on [GitHub](https://github.com/brantb) +* **Xfce terminal** courtesy [Sasha Gerrand](http://sgerrand.com) + and on [GitHub](https://github.com/sgerrand) + +### Other Applications + +* **Mutt** e-mail client also by [me] (*just* the Mutt colorscheme is + [available here][Mutt Repository]) + +### Palettes + +* **Adobe Photoshop** Palette (inc. L\*a\*b values) +* **Apple Color Picker** Palettes +* **GIMP** Palette + +Don't see the application you want to use it in? Download the palettes (or pull +the values from the table below) and create your own. Submit it back and I'll +happily note the contribution and include it on this page. See also the +[Usage & Development](#usage-development) section below for details on the +specific values to be used in different contexts. + +Download +-------- + +### [Click here to download latest version](http://ethanschoonover.com/solarized/files/solarized.zip) + +Current release is **v1.0.0beta2**. See the [changelog] for details on what's +new in this release. + +### Fresh Code on GitHub + +You can also use the following links to access application specific downloads +and git repositories: + +* **Canonical Project Page:** + + Downloads, screenshots and more information are always available from the + project page: + +* **Full Git Repository:** + + The full git repository is at: + Get it using the following command: + + $ git clone git://github.com/altercation/solarized.git + +* **Application Specific Repositories:** + + You can clone repositories specific to many of the application specific + color themes. See links in the list above or select from this list: + + * [Vim Repository] + * [Mutt Repository] + * [Emacs Repository] + * [IntelliJ Repository] + * [NetBeans Repository] + * [SeeStyle-Coda-SubEthaEdit Repository] + * [TextMate Repository] + * [TextWrangler-BBEdit Repository] + * [Visual Studio Repository] + + * [Xcode 3 work in progress][Xcode 3] + * [Xcode 4 work in progress][Xcode 4] + +Note that through the magic of [git-subtree](https://github.com/apenwarr/git-subtree) +these repositories are all kept in sync, so you can pull any of them and get the most up-to-date version. + +Features +-------- + +1. **Selective contrast** + + On a sunny summer day I love to read a book outside. Not right in the sun; + that's too bright. I'll hunt for a shady spot under a tree. The shaded + paper contrasts with the crisp text nicely. If you were to actually measure + the contrast between the two, you'd find it is much lower than black text + on a white background (or white on black) on your display device of choice. + Black text on white from a computer display is akin to reading a book in + direct sunlight and tires the eye. + + ![solarized selective contrast](https://github.com/altercation/solarized/raw/master/img/solarized-selcon.png) + + Solarized reduces *brightness contrast* but, unlike many low contrast + colorschemes, retains *contrasting hues* (based on colorwheel relations) + for syntax highlighting readability. + +2. **Both sides of the force** + + ![solarized dualmode](https://github.com/altercation/solarized/raw/master/img/solarized-dualmode.png) + + I often switch between dark and light modes when editing text and code. + Solarized retains the same selective contrast relationships and overall + feel when switching between the light and dark background modes. A *lot* of + thought, planning and testing has gone into making both modes feel like + part of a unified colorscheme. + +3. **16/5 palette modes** + + ![solarized palettes](https://github.com/altercation/solarized/raw/master/img/solarized-165.png) + + Solarized works as a sixteen color palette for compatibility with common + terminal based applications / emulators. In addition, it has been carefully + designed to scale down to a variety of five color palettes (four base + monotones plus one accent color) for use in design work such as web design. + In every case it retains a strong personality but doesn't overwhelm. + +5. **Precision, symmetry** + + ![solarized symmetry](https://github.com/altercation/solarized/raw/master/img/solarized-sym.png) + + The monotones have symmetric CIELAB lightness differences, so switching + from dark to light mode retains the same perceived contrast in brightness + between each value. Each mode is equally readable. The accent colors are + based off specific colorwheel relations and subsequently translated to + CIELAB to ensure perceptual uniformity in terms of lightness. The hues + themselves, as with the monotone \*a\*b values, have been adjusted within + a small range to achieve the most pleasing combination of colors. + + See also the [Usage & Development](#usage-development) section below for + details on the specific values to be used in different contexts. + + This makes colorscheme inversion trivial. Here, for instance, is a sass + (scss) snippet that inverts solarized based on the class of the html tag + (e.g. `` to give a dark background with red accent): + + $base03: #002b36; + $base02: #073642; + $base01: #586e75; + $base00: #657b83; + $base0: #839496; + $base1: #93a1a1; + $base2: #eee8d5; + $base3: #fdf6e3; + $yellow: #b58900; + $orange: #cb4b16; + $red: #dc322f; + $magenta: #d33682; + $violet: #6c71c4; + $blue: #268bd2; + $cyan: #2aa198; + $green: #859900; + @mixin rebase($rebase03,$rebase02,$rebase01,$rebase00,$rebase0,$rebase1,$rebase2,$rebase3) + { + background-color:$rebase03; + color:$rebase0; + * { color:$rebase0; } + h1,h2,h3,h4,h5,h6 { color:$rebase1; border-color: $rebase0; } + a, a:active, a:visited { color: $rebase1; } + } + @mixin accentize($accent) { + a, a:active, a:visited, code.url { color: $accent; } + h1,h2,h3,h4,h5,h6 {color:$accent} + } + /* light is default mode, so pair with general html definition */ + html, .light { @include rebase($base3,$base2,$base1,$base0,$base00,$base01,$base02,$base03)} + .dark { @include rebase($base03,$base02,$base01,$base00,$base0,$base1,$base2,$base3)} + html * { + color-profile: sRGB; + rendering-intent: auto; + } + + See also [the full css stylesheet for this site](https://github.com/altercation/ethanschoonover.com/blob/master/resources/css/style.css). + +Installation +------------ + +Installation instructions for each version of the colorscheme are included in +the subdirectory README files. Note that for Vim (and possibly for Mutt) you +may want to clone the specific repository (for instance if you are using +Pathogen). See the links at the top of this file. + +Font Samples +------------ + +Solarized has been designed to handle fonts of various weights and retain +readability, from the classic Terminus to the beefy Menlo. + +![font samples - light](https://github.com/altercation/solarized/raw/master/img/solarized-fontsamples-light.png) +![font samples - dark](https://github.com/altercation/solarized/raw/master/img/solarized-fontsamples-dark.png) + +Clockwise from upper left: Menlo, Letter Gothic, Terminus, Andale Mono. + +Preview all code samples in specific font faces by selecting a link from this +list: + +* [DejaVu Sans 18](http://ethanschoonover.com/solarized/img/dejavusans18/) +* [DejaVu Sans 14](http://ethanschoonover.com/solarized/img/dejavusans14/) +* [Letter Gothic 18](http://ethanschoonover.com/solarized/img/lettergothic18/) +* [Letter Gothic 14](http://ethanschoonover.com/solarized/img/lettergothic14/) + +* [Andale Mono 14](http://ethanschoonover.com/solarized/img/andalemono14/) +* [Monaco 14](http://ethanschoonover.com/solarized/img/monaco14/) +* [Skyhook Mono 14](http://ethanschoonover.com/solarized/img/skyhookmono14/) + +* [Terminus 12](http://ethanschoonover.com/solarized/img/terminus12/) +* [Terminus 20](http://ethanschoonover.com/solarized/img/terminus20/) + +Screenshots +----------- + +Click to view. + +### Mutt + +[![mutt dark](https://github.com/altercation/solarized/raw/master/img/screen-mutt-dark-th.png)](https://github.com/altercation/solarized/raw/master/img/screen-mutt-dark.png) +[![mutt light](https://github.com/altercation/solarized/raw/master/img/screen-mutt-light-th.png)](https://github.com/altercation/solarized/raw/master/img/screen-mutt-light.png) + +### C (Vim) + +[![c dark](https://github.com/altercation/solarized/raw/master/img/screen-c-dark-th.png)](https://github.com/altercation/solarized/raw/master/img/screen-c-dark.png) +[![c light](https://github.com/altercation/solarized/raw/master/img/screen-c-light-th.png)](https://github.com/altercation/solarized/raw/master/img/screen-c-light.png) + +### Haskell (Vim) + +[![haskell dark](https://github.com/altercation/solarized/raw/master/img/screen-haskell-dark-th.png)](https://github.com/altercation/solarized/raw/master/img/screen-haskell-dark.png) +[![haskell light](https://github.com/altercation/solarized/raw/master/img/screen-haskell-light-th.png)](https://github.com/altercation/solarized/raw/master/img/screen-haskell-light.png) + +### HTML (Vim) + +[![html dark](https://github.com/altercation/solarized/raw/master/img/screen-html-dark-th.png)](https://github.com/altercation/solarized/raw/master/img/screen-html-dark.png) +[![html light](https://github.com/altercation/solarized/raw/master/img/screen-html-light-th.png)](https://github.com/altercation/solarized/raw/master/img/screen-html-light.png) + +### Java (Vim) + +[![java dark](https://github.com/altercation/solarized/raw/master/img/screen-java-dark-th.png)](https://github.com/altercation/solarized/raw/master/img/screen-java-dark.png) +[![java light](https://github.com/altercation/solarized/raw/master/img/screen-java-light-th.png)](https://github.com/altercation/solarized/raw/master/img/screen-java-light.png) + +### Javascript (Vim) + +[![javascript dark](https://github.com/altercation/solarized/raw/master/img/screen-javascript-dark-th.png)](https://github.com/altercation/solarized/raw/master/img/screen-javascript-dark.png) +[![javascript light](https://github.com/altercation/solarized/raw/master/img/screen-javascript-light-th.png)](https://github.com/altercation/solarized/raw/master/img/screen-javascript-light.png) + +### Pandoc Markdown (Vim) + +These screen shots show Vim running with my own [Pandoc Kit Syntax](http://ethanschoonover.com/pandockit/). + +[![pandoc dark](https://github.com/altercation/solarized/raw/master/img/screen-pandoc-dark-th.png)](https://github.com/altercation/solarized/raw/master/img/screen-pandoc-dark.png) +[![pandoc light](https://github.com/altercation/solarized/raw/master/img/screen-pandoc-light-th.png)](https://github.com/altercation/solarized/raw/master/img/screen-pandoc-light.png) + +### Perl (Vim) + +[![perl dark](https://github.com/altercation/solarized/raw/master/img/screen-perl-dark-th.png)](https://github.com/altercation/solarized/raw/master/img/screen-perl-dark.png) +[![perl light](https://github.com/altercation/solarized/raw/master/img/screen-perl-light-th.png)](https://github.com/altercation/solarized/raw/master/img/screen-perl-light.png) + +### PHP (Vim) + +[![php dark](https://github.com/altercation/solarized/raw/master/img/screen-php-dark-th.png)](https://github.com/altercation/solarized/raw/master/img/screen-php-dark.png) +[![php light](https://github.com/altercation/solarized/raw/master/img/screen-php-light-th.png)](https://github.com/altercation/solarized/raw/master/img/screen-php-light.png) + +### Python (Vim) + +[![python dark](https://github.com/altercation/solarized/raw/master/img/screen-python-dark-th.png)](https://github.com/altercation/solarized/raw/master/img/screen-python-dark.png) +[![python light](https://github.com/altercation/solarized/raw/master/img/screen-python-light-th.png)](https://github.com/altercation/solarized/raw/master/img/screen-python-light.png) + +### Ruby (Vim) + +[![ruby dark](https://github.com/altercation/solarized/raw/master/img/screen-ruby-dark-th.png)](https://github.com/altercation/solarized/raw/master/img/screen-ruby-dark.png) +[![ruby light](https://github.com/altercation/solarized/raw/master/img/screen-ruby-light-th.png)](https://github.com/altercation/solarized/raw/master/img/screen-ruby-light.png) + +### Shell (Vim) + +[![shell dark](https://github.com/altercation/solarized/raw/master/img/screen-shell-dark-th.png)](https://github.com/altercation/solarized/raw/master/img/screen-shell-dark.png) +[![shell light](https://github.com/altercation/solarized/raw/master/img/screen-shell-light-th.png)](https://github.com/altercation/solarized/raw/master/img/screen-shell-light.png) + +### TeX (Vim) + +[![tex dark](https://github.com/altercation/solarized/raw/master/img/screen-tex-dark-th.png)](https://github.com/altercation/solarized/raw/master/img/screen-tex-dark.png) +[![tex light](https://github.com/altercation/solarized/raw/master/img/screen-tex-light-th.png)](https://github.com/altercation/solarized/raw/master/img/screen-tex-light.png) + +The Values +---------- + +L\*a\*b values are canonical (White D65, Reference D50), other values are +matched in sRGB space. + + SOLARIZED HEX 16/8 TERMCOL XTERM/HEX L*A*B RGB HSB + --------- ------- ---- ------- ----------- ---------- ----------- ----------- + base03 #002b36 8/4 brblack 234 #1c1c1c 15 -12 -12 0 43 54 193 100 21 + base02 #073642 0/4 black 235 #262626 20 -12 -12 7 54 66 192 90 26 + base01 #586e75 10/7 brgreen 240 #585858 45 -07 -07 88 110 117 194 25 46 + base00 #657b83 11/7 bryellow 241 #626262 50 -07 -07 101 123 131 195 23 51 + base0 #839496 12/6 brblue 244 #808080 60 -06 -03 131 148 150 186 13 59 + base1 #93a1a1 14/4 brcyan 245 #8a8a8a 65 -05 -02 147 161 161 180 9 63 + base2 #eee8d5 7/7 white 254 #e4e4e4 92 -00 10 238 232 213 44 11 93 + base3 #fdf6e3 15/7 brwhite 230 #ffffd7 97 00 10 253 246 227 44 10 99 + yellow #b58900 3/3 yellow 136 #af8700 60 10 65 181 137 0 45 100 71 + orange #cb4b16 9/3 brred 166 #d75f00 50 50 55 203 75 22 18 89 80 + red #dc322f 1/1 red 160 #d70000 50 65 45 220 50 47 1 79 86 + magenta #d33682 5/5 magenta 125 #af005f 50 65 -05 211 54 130 331 74 83 + violet #6c71c4 13/5 brmagenta 61 #5f5faf 50 15 -45 108 113 196 237 45 77 + blue #268bd2 4/4 blue 33 #0087ff 55 -10 -45 38 139 210 205 82 82 + cyan #2aa198 6/6 cyan 37 #00afaf 60 -35 -05 42 161 152 175 74 63 + green #859900 2/2 green 64 #5f8700 60 -20 65 133 153 0 68 100 60 + +Usage & Development +------------------- + +If you are considering developing a port for Solarized, please see also the +[developer notes](http://ethanschoonover.com/solarized/DEVELOPERS) for +information about optional repository structure and readme formats. + +Solarized flips between light and dark modes. In each mode, four monotones form +the core values (with an optional fifth for emphasized content). + +![value samples - dark](https://github.com/altercation/solarized/raw/master/img/solarized-values-dark.png) + +![value samples - light](https://github.com/altercation/solarized/raw/master/img/solarized-values-light.png) + +Thus in the case of a dark background colorscheme, the normal relationship for +background and body text is `base03:base0` (please note that body text is +**not** `base00`). Note also that in cases where the background and foreground +can be specified as a pair value, text can be highlighted using a combination +of `base02:base1`. The L\*a\*b lightness difference between `base03:base0` and +`base02:base1` is identical by design, resulting in identical readability +against both normal and highlighted backgrounds. An example use case is folded +text in Vim which uses `base02` for the background and `base1` for the +foreground. + +The values in this example are simply inverted in the case of a light +background. + + + +[Vim Repository]: https://github.com/altercation/vim-colors-solarized +[Mutt Repository]: https://github.com/altercation/mutt-colors-solarized +[Emacs Repository]: https://github.com/sellout/emacs-color-theme-solarized +[IntelliJ Repository]: https://github.com/jkaving/intellij-colors-solarized +[NetBeans Repository]: https://github.com/fentie/netbeans-colors-solarized +[SeeStyle-Coda-SubEthaEdit Repository]: https://github.com/bobthecow/solarized-seestyle +[TextMate Repository]: https://github.com/deplorableword/textmate-solarized +[TextWrangler-BBEdit Repository]: https://github.com/rcarmo/textwrangler-bbedit-solarized +[Visual Studio Repository]: https://github.com/leddt/visualstudio-colors-solarized +[Xcode 3]: https://github.com/shayne/solarized/tree/master/apple-xcode3-solarized +[Xcode 4]: https://github.com/brianmichel/solarized/tree/master/apple-xcode4-solarized +[me]: http://ethanschoonover.com/colophon +[changelog]: http://ethanschoonover.com/solarized/CHANGELOG +[Vim README]: http://ethanschoonover.com/solarized/vim-colors-solarized diff --git a/install/vim/vimcolor/solarized-master/adobe-swatches-solarized/README.md b/install/vim/vimcolor/solarized-master/adobe-swatches-solarized/README.md new file mode 100755 index 0000000..1908589 --- /dev/null +++ b/install/vim/vimcolor/solarized-master/adobe-swatches-solarized/README.md @@ -0,0 +1,34 @@ +Solarized - Adobe Photoshop Swatches +==================================== + +### [See official homepage for full content](http://ethanschoonover.com/solarized) + +Installation +------------ + +Import using the Photoshop swatches palette. Colors are referenced below: + +The Values +---------- + +L\*a\*b values are canonical (White D65, Reference D50), other values are +matched in sRGB space. + + SOLARIZED HEX 16/8 TERMCOL XTERM/HEX L*A*B sRGB HSB + --------- ------- ---- ------- ----------- ---------- ----------- ----------- + base03 #002b36 8/4 brblack 234 #1c1c1c 15 -12 -12 0 43 54 193 100 21 + base02 #073642 0/4 black 235 #262626 20 -12 -12 7 54 66 192 90 26 + base01 #586e75 10/7 brgreen 240 #4e4e4e 45 -07 -07 88 110 117 194 25 46 + base00 #657b83 11/7 bryellow 241 #585858 50 -07 -07 101 123 131 195 23 51 + base0 #839496 12/6 brblue 244 #808080 60 -06 -03 131 148 150 186 13 59 + base1 #93a1a1 14/4 brcyan 245 #8a8a8a 65 -05 -02 147 161 161 180 9 63 + base2 #eee8d5 7/7 white 254 #d7d7af 92 -00 10 238 232 213 44 11 93 + base3 #fdf6e3 15/7 brwhite 230 #ffffd7 97 00 10 253 246 227 44 10 99 + yellow #b58900 3/3 yellow 136 #af8700 60 10 65 181 137 0 45 100 71 + orange #cb4b16 9/3 brred 166 #d75f00 50 50 55 203 75 22 18 89 80 + red #dc322f 1/1 red 160 #d70000 50 65 45 220 50 47 1 79 86 + magenta #d33682 5/5 magenta 125 #af005f 50 65 -05 211 54 130 331 74 83 + violet #6c71c4 13/5 brmagenta 61 #5f5faf 50 15 -45 108 113 196 237 45 77 + blue #268bd2 4/4 blue 33 #0087ff 55 -10 -45 38 139 210 205 82 82 + cyan #2aa198 6/6 cyan 37 #00afaf 60 -35 -05 42 161 152 175 74 63 + green #859900 2/2 green 64 #5f8700 60 -20 65 133 153 0 68 100 60 diff --git a/install/vim/vimcolor/solarized-master/adobe-swatches-solarized/solarized.act b/install/vim/vimcolor/solarized-master/adobe-swatches-solarized/solarized.act new file mode 100755 index 0000000..227c2a0 Binary files /dev/null and b/install/vim/vimcolor/solarized-master/adobe-swatches-solarized/solarized.act differ diff --git a/install/vim/vimcolor/solarized-master/adobe-swatches-solarized/solarized.ase b/install/vim/vimcolor/solarized-master/adobe-swatches-solarized/solarized.ase new file mode 100755 index 0000000..c903433 Binary files /dev/null and b/install/vim/vimcolor/solarized-master/adobe-swatches-solarized/solarized.ase differ diff --git a/install/vim/vimcolor/solarized-master/apple-colorpalette-solarized/README.md b/install/vim/vimcolor/solarized-master/apple-colorpalette-solarized/README.md new file mode 100755 index 0000000..1e46117 --- /dev/null +++ b/install/vim/vimcolor/solarized-master/apple-colorpalette-solarized/README.md @@ -0,0 +1,81 @@ +Solarized - Apple Color Picker Palette +====================================== + +### [See official homepage for full content](http://ethanschoonover.com/solarized) + +Installation +------------ + +Copy or move the `solarized.clr` file to your `~/Library/Colors` directory. + +Use the included colorpicker launcher to confirm installation. Launch the +`launch-colorpicker` application, navigate to the color palette view (usually +the third icon from the left) and select 'Solarized' from the drop-down palette +list. Click the cancel button to dismiss the color picker. + +Alternate Palette +------------------ + +NOT FOR USE UNLESS YOU UNDERSTAND THE HELL THAT IS COLOR MANAGEMENT. + +The `alternate palettes` directory contains two Apple Color Picker palettes. +The "tagged" palette is identical to the main Solarized.clr palette. The +untagged palette contains untagged sRGB values (Apple calls untagged values +"device colors"). Don't use this unless you are using an application that +otherwise can't handle tagged values. + +An example: If you are a web developer working on OS X and you wish to use one +of the Solarized hex values, you have a couple choices: + +1. Enter the code manually (easy, you should do this) +2. Use the color picker (possible, but do it the right way! See below...) + +A popular colorpicker plugin is the "Hex Color Picker" from +. If you wish to use this with the +colorpicker and a preset palette like Solarized, here's what you do: + +1. Instead of the plain old "solarized.clr" palette, use the "solarized-tagged" + and "solarized-untagged" palettes (solarized-tagged is the same as + solarized.clr, just renamed for clarity). + +2. In the Hex Color picker (inside the Apple Color Picker) click the options + button and ensure that "Don't generate calibrated colors" is **checked**. + Ideally, Hex Color Picker would be aware of a particular color being + untagged (a "device" color in Apple parlance) and hand it over to you in + unaltered form, even if it was otherwise pulling calibrated colors off your + display. + +3. If you desire a Solarized color **for web use** (not for use in an + application that uses Mac color swatches) then you switch to the + Solarized-untagged palette in Color Picker, choose a color, switch to the + Hex Color Picker tab and grab the correct color. Double check against the + chart below to confirm it's working as expected. + +This is just one of many examples of how, even with applications/plugins that +deal exclusively with color, there are unexpected or unintuitive exceptions to +take into account. + +The Values +---------- + +L\*a\*b values are canonical (White D65, Reference D50), other values are +matched in sRGB space. + + SOLARIZED HEX 16/8 TERMCOL XTERM/HEX L*A*B sRGB HSB + --------- ------- ---- ------- ----------- ---------- ----------- ----------- + base03 #002b36 8/4 brblack 234 #1c1c1c 15 -12 -12 0 43 54 193 100 21 + base02 #073642 0/4 black 235 #262626 20 -12 -12 7 54 66 192 90 26 + base01 #586e75 10/7 brgreen 240 #4e4e4e 45 -07 -07 88 110 117 194 25 46 + base00 #657b83 11/7 bryellow 241 #585858 50 -07 -07 101 123 131 195 23 51 + base0 #839496 12/6 brblue 244 #808080 60 -06 -03 131 148 150 186 13 59 + base1 #93a1a1 14/4 brcyan 245 #8a8a8a 65 -05 -02 147 161 161 180 9 63 + base2 #eee8d5 7/7 white 254 #d7d7af 92 -00 10 238 232 213 44 11 93 + base3 #fdf6e3 15/7 brwhite 230 #ffffd7 97 00 10 253 246 227 44 10 99 + yellow #b58900 3/3 yellow 136 #af8700 60 10 65 181 137 0 45 100 71 + orange #cb4b16 9/3 brred 166 #d75f00 50 50 55 203 75 22 18 89 80 + red #dc322f 1/1 red 160 #d70000 50 65 45 220 50 47 1 79 86 + magenta #d33682 5/5 magenta 125 #af005f 50 65 -05 211 54 130 331 74 83 + violet #6c71c4 13/5 brmagenta 61 #5f5faf 50 15 -45 108 113 196 237 45 77 + blue #268bd2 4/4 blue 33 #0087ff 55 -10 -45 38 139 210 205 82 82 + cyan #2aa198 6/6 cyan 37 #00afaf 60 -35 -05 42 161 152 175 74 63 + green #859900 2/2 green 64 #5f8700 60 -20 65 133 153 0 68 100 60 diff --git a/install/vim/vimcolor/solarized-master/apple-colorpalette-solarized/alternate palettes/README.md b/install/vim/vimcolor/solarized-master/apple-colorpalette-solarized/alternate palettes/README.md new file mode 100755 index 0000000..618d0e1 --- /dev/null +++ b/install/vim/vimcolor/solarized-master/apple-colorpalette-solarized/alternate palettes/README.md @@ -0,0 +1,66 @@ +Alternate Palette +------------------ + +NOT FOR USE UNLESS YOU UNDERSTAND THE HELL THAT IS COLOR MANAGEMENT. + +The `alternate palettes` directory contains two Apple Color Picker palettes. +The "tagged" palette is identical to the main Solarized.clr palette. The +untagged palette contains untagged sRGB values (Apple calls untagged values +"device colors"). Don't use this unless you are using an application that +otherwise can't handle tagged values. + +An example: If you are a web developer working on OS X and you wish to use one +of the Solarized hex values, you have a couple choices: + +1. Enter the code manually (easy, you should do this) +2. Use the color picker (possible, but do it the right way! See below...) + +A popular colorpicker plugin is the "Hex Color Picker" from +. If you wish to use this with the +colorpicker and a preset palette like Solarized, here's what you do: + +1. Instead of the plain old "solarized.clr" palette, use the "solarized-tagged" + and "solarized-untagged" palettes (solarized-tagged is the same as + solarized.clr, just renamed for clarity). + +2. In the Hex Color picker (inside the Apple Color Picker) click the options + button and ensure that "Don't generate calibrated colors" is **checked**. + Ideally, Hex Color Picker would be aware of a particular color being + untagged (a "device" color in Apple parlance) and hand it over to you in + unaltered form, even if it was otherwise pulling calibrated colors off your + display. + +3. If you desire a Solarized color **for web use** (not for use in an + application that uses Mac color swatches) then you switch to the + Solarized-untagged palette in Color Picker, choose a color, switch to the + Hex Color Picker tab and grab the correct color. Double check against the + chart below to confirm it's working as expected. + +This is just one of many examples of how, even with applications/plugins that +deal exclusively with color, there are unexpected or unintuitive exceptions to +take into account. + +The Values +---------- + +L\*a\*b values are canonical (White D65, Reference D50), other values are +matched in sRGB space. + + SOLARIZED HEX 16/8 TERMCOL XTERM/HEX L*A*B sRGB HSB + --------- ------- ---- ------- ----------- ---------- ----------- ----------- + base03 #002b36 8/4 brblack 234 #1c1c1c 15 -12 -12 0 43 54 193 100 21 + base02 #073642 0/4 black 235 #262626 20 -12 -12 7 54 66 192 90 26 + base01 #586e75 10/7 brgreen 240 #4e4e4e 45 -07 -07 88 110 117 194 25 46 + base00 #657b83 11/7 bryellow 241 #585858 50 -07 -07 101 123 131 195 23 51 + base0 #839496 12/6 brblue 244 #808080 60 -06 -03 131 148 150 186 13 59 + base1 #93a1a1 14/4 brcyan 245 #8a8a8a 65 -05 -02 147 161 161 180 9 63 + base2 #eee8d5 7/7 white 254 #d7d7af 92 -00 10 238 232 213 44 11 93 + base3 #fdf6e3 15/7 brwhite 230 #ffffd7 97 00 10 253 246 227 44 10 99 + yellow #b58900 3/3 yellow 136 #af8700 60 10 65 181 137 0 45 100 71 + orange #cb4b16 9/3 brred 166 #d75f00 50 50 55 203 75 22 18 89 80 + red #dc322f 1/1 red 160 #d70000 50 65 45 220 50 47 1 79 86 + magenta #d33682 5/5 magenta 125 #af005f 50 65 -05 211 54 130 331 74 83 + violet #6c71c4 13/5 brmagenta 61 #5f5faf 50 15 -45 108 113 196 237 45 77 + blue #268bd2 4/4 blue 33 #0087ff 55 -10 -45 38 139 210 205 82 82 + cyan #2aa198 6/6 cyan 37 #00afaf 60 -35 -05 42 161 152 175 74 63 + green #859900 2/2 green 64 #5f8700 60 -20 65 133 153 0 68 100 60 diff --git a/install/vim/vimcolor/solarized-master/apple-colorpalette-solarized/alternate palettes/Solarized tagged.clr b/install/vim/vimcolor/solarized-master/apple-colorpalette-solarized/alternate palettes/Solarized tagged.clr new file mode 100755 index 0000000..45d015c Binary files /dev/null and b/install/vim/vimcolor/solarized-master/apple-colorpalette-solarized/alternate palettes/Solarized tagged.clr differ diff --git a/install/vim/vimcolor/solarized-master/apple-colorpalette-solarized/alternate palettes/Solarized untagged.clr b/install/vim/vimcolor/solarized-master/apple-colorpalette-solarized/alternate palettes/Solarized untagged.clr new file mode 100755 index 0000000..6b4051c Binary files /dev/null and b/install/vim/vimcolor/solarized-master/apple-colorpalette-solarized/alternate palettes/Solarized untagged.clr differ diff --git a/install/vim/vimcolor/solarized-master/apple-colorpalette-solarized/launch-colorpicker.app/Contents/Info.plist b/install/vim/vimcolor/solarized-master/apple-colorpalette-solarized/launch-colorpicker.app/Contents/Info.plist new file mode 100755 index 0000000..ef0c8ce --- /dev/null +++ b/install/vim/vimcolor/solarized-master/apple-colorpalette-solarized/launch-colorpicker.app/Contents/Info.plist @@ -0,0 +1,44 @@ + + + + + CFBundleAllowMixedLocalizations + + CFBundleDevelopmentRegion + English + CFBundleExecutable + applet + CFBundleIconFile + applet + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + launch-colorpicker + CFBundlePackageType + APPL + CFBundleSignature + aplt + LSMinimumSystemVersionByArchitecture + + x86_64 + 10.6 + + LSRequiresCarbon + + WindowState + + dividerCollapsed + + eventLogLevel + -1 + name + ScriptWindowState + positionOfDivider + 333 + savedFrame + 159 537 602 597 0 0 1920 1178 + selectedTabView + event log + + + diff --git a/install/vim/vimcolor/solarized-master/apple-colorpalette-solarized/launch-colorpicker.app/Contents/MacOS/applet b/install/vim/vimcolor/solarized-master/apple-colorpalette-solarized/launch-colorpicker.app/Contents/MacOS/applet new file mode 100755 index 0000000..6a47312 Binary files /dev/null and b/install/vim/vimcolor/solarized-master/apple-colorpalette-solarized/launch-colorpicker.app/Contents/MacOS/applet differ diff --git a/install/vim/vimcolor/solarized-master/apple-colorpalette-solarized/launch-colorpicker.app/Contents/PkgInfo b/install/vim/vimcolor/solarized-master/apple-colorpalette-solarized/launch-colorpicker.app/Contents/PkgInfo new file mode 100755 index 0000000..3253614 --- /dev/null +++ b/install/vim/vimcolor/solarized-master/apple-colorpalette-solarized/launch-colorpicker.app/Contents/PkgInfo @@ -0,0 +1 @@ +APPLaplt \ No newline at end of file diff --git a/install/vim/vimcolor/solarized-master/apple-colorpalette-solarized/launch-colorpicker.app/Contents/Resources/Scripts/main.scpt b/install/vim/vimcolor/solarized-master/apple-colorpalette-solarized/launch-colorpicker.app/Contents/Resources/Scripts/main.scpt new file mode 100755 index 0000000..396d571 Binary files /dev/null and b/install/vim/vimcolor/solarized-master/apple-colorpalette-solarized/launch-colorpicker.app/Contents/Resources/Scripts/main.scpt differ diff --git a/install/vim/vimcolor/solarized-master/apple-colorpalette-solarized/launch-colorpicker.app/Contents/Resources/applet.icns b/install/vim/vimcolor/solarized-master/apple-colorpalette-solarized/launch-colorpicker.app/Contents/Resources/applet.icns new file mode 100755 index 0000000..fcc1f09 Binary files /dev/null and b/install/vim/vimcolor/solarized-master/apple-colorpalette-solarized/launch-colorpicker.app/Contents/Resources/applet.icns differ diff --git a/install/vim/vimcolor/solarized-master/apple-colorpalette-solarized/launch-colorpicker.app/Contents/Resources/applet.rsrc b/install/vim/vimcolor/solarized-master/apple-colorpalette-solarized/launch-colorpicker.app/Contents/Resources/applet.rsrc new file mode 100755 index 0000000..30b9f94 Binary files /dev/null and b/install/vim/vimcolor/solarized-master/apple-colorpalette-solarized/launch-colorpicker.app/Contents/Resources/applet.rsrc differ diff --git a/install/vim/vimcolor/solarized-master/apple-colorpalette-solarized/launch-colorpicker.app/Contents/Resources/description.rtfd/TXT.rtf b/install/vim/vimcolor/solarized-master/apple-colorpalette-solarized/launch-colorpicker.app/Contents/Resources/description.rtfd/TXT.rtf new file mode 100755 index 0000000..33192ea --- /dev/null +++ b/install/vim/vimcolor/solarized-master/apple-colorpalette-solarized/launch-colorpicker.app/Contents/Resources/description.rtfd/TXT.rtf @@ -0,0 +1,4 @@ +{\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf350 +{\fonttbl} +{\colortbl;\red255\green255\blue255;} +} \ No newline at end of file diff --git a/install/vim/vimcolor/solarized-master/apple-colorpalette-solarized/solarized.clr b/install/vim/vimcolor/solarized-master/apple-colorpalette-solarized/solarized.clr new file mode 100755 index 0000000..d5b03be Binary files /dev/null and b/install/vim/vimcolor/solarized-master/apple-colorpalette-solarized/solarized.clr differ diff --git a/install/vim/vimcolor/solarized-master/emacs-colors-solarized/LICENSE b/install/vim/vimcolor/solarized-master/emacs-colors-solarized/LICENSE new file mode 100755 index 0000000..ee08d7e --- /dev/null +++ b/install/vim/vimcolor/solarized-master/emacs-colors-solarized/LICENSE @@ -0,0 +1,20 @@ +Copyright (c) 2011 Ethan Schoonover + +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. + diff --git a/install/vim/vimcolor/solarized-master/emacs-colors-solarized/README.md b/install/vim/vimcolor/solarized-master/emacs-colors-solarized/README.md new file mode 100755 index 0000000..8813107 --- /dev/null +++ b/install/vim/vimcolor/solarized-master/emacs-colors-solarized/README.md @@ -0,0 +1,277 @@ +Solarized +========= + +### [See official homepage for full content](http://ethanschoonover.com/solarized) + +## Precision colors for machines and people + +[![solarized dualmode](https://github.com/altercation/solarized/raw/master/img/solarized-yinyang.png)](#features)\ + + +Solarized is a sixteen color palette (eight monotones, eight accent colors) +designed for use with terminal and gui applications. It has several [unique +properties](#features). I designed this colorscheme with both precise +[CIELAB](http://en.wikipedia.org/wiki/Lab_color_space) lightness relationships +and a refined set of hues based on fixed color wheel relationships. It has been +tested extensively in real world use on color calibrated displays (as well as +uncalibrated/intentionally miscalibrated displays) and in a variety of lighting +conditions. + +![solarized palette](https://github.com/altercation/solarized/raw/master/img/solarized-palette.png)\ + +Currently available in formats for (cf [screenshots](#screenshots) below): + +* **Vim** (the Vim-only portion of Solarized is [available +here](https://github.com/altercation/vim-colors-solarized), for use with +Pathogen, etc.) +* **Mutt** e-mail client (*just* the Mutt colorscheme is [available +here](https://github.com/altercation/mutt-colors-solarized)) +* **Xresources** / Xdefaults +* **iTerm2** +* OS X **Terminal.app** +* Adobe Photoshop Palette (inc. L\*a\*b values) +* Apple Color Picker Palette +* GIMP Palette + +Don't see the application you want to use it in? Download the palettes (or pull +the values from the table below) and create your own. Submit it back and I'll +happily note the contribution and include it on this page. + +**Note:** I am still tweaking the Vim highlighting for specific syntaxes and +welcome feedback on these. + +Download +-------- + +### [Click here to download latest version](http://ethanschoonover.com/files/solarized/solarized.tar.gz) + +Or use the following links to access application specific downloads and git +repositories: + +* **Git repo:** + + The full git repository is at: + Get it using the following command: + + $ git clone git://github.com/altercation/solarized.git + +* **Vim only:** + + The vim-only colorscheme (Pathogen ready) is available at: + . + + $ git clone git://github.com/altercation/vim-colors-solarized.git + + You can also download it from [vim.org](http://www.vim.org/scripts/script.php?script_id=3520). + +* **Mutt only:** + + The mutt-only variants can be cloned from + + + $ git clone git://github.com/altercation/mutt-colors-solarized.git + +* **Canonical Project Page:** + + Downloads, screenshots and more information are always available from the + project page: + +Note that through the magic of +[git-subtree](https://github.com/apenwarr/git-subtree) these repositories are +all kept in sync, so you can pull any of them and get the most up-to-date +version. + +Features +-------- + +1. **Selective contrast** + + On a sunny summer day I love to read a book outside. Not right in the sun; + that's too bright. I'll hunt for a shady spot under a tree. The shaded + paper contrasts with the crisp text nicely. If you were to actually measure + the contrast between the two, you'd find it is much lower than black text + on a white background (or white on black) on your display device of choice. + Black text on white from a computer display is akin to reading a book in + direct sunlight and tires the eye. + + ![solarized selective contrast](https://github.com/altercation/solarized/raw/master/img/solarized-selcon.png)\ + + Solarized reduces *brightness contrast* but, unlike many low contrast + colorschemes, retains *contrasting hues* (based on colorwheel relations) + for syntax highlighting readability. + +2. **Both sides of the force** + + ![solarized dualmode](https://github.com/altercation/solarized/raw/master/img/solarized-dualmode.png)\ + + I often switch between dark and light modes when editing text and code. + Solarized retains the same selective contrast relationships and overall + feel when switching between the light and dark background modes. A *lot* of + thought, planning and testing has gone into making both modes feel like + part of a unified colorscheme. + +3. **16/5 palette modes** + + ![solarized palettes](https://github.com/altercation/solarized/raw/master/img/solarized-165.png)\ + + Solarized works as a sixteen color palette for compatibility with common + terminal based applications / emulators. In addition, it has been carefull + designed to scale down to a variety of five color palettes (four base + monotones plus one accent color) for use in design work such as web design. + In every case it retains a strong personality but doesn't overwhelm. + +5. **Precision, symmetry** + + ![solarized symmetry](https://github.com/altercation/solarized/raw/master/img/solarized-sym.png)\ + + The monotones have symmetric CIELAB lightness differences, so switching + from dark to light mode retains the same perceived contrast in brightness + between each value. Each mode is equally readable. The accent colors are + based off specific colorwheel relations and subsequently translated to + CIELAB to ensure perceptual uniformity in terms of lightness. The hues + themselves, as with the monotone \*a\*b values, have been adjusted within + a small range to achieve the most pleasing combination of colors. + + This makes colorscheme inversion trivial. Here, for instance, is a sass + (scss) snippet that inverts solarized based on the class of the html tag + (e.g. `` to give a dark background with red accent): + + $base03: #002b36; + $base02: #073642; + $base01: #586e75; + $base00: #657b83; + $base0: #839496; + $base1: #93a1a1; + $base2: #eee8d5; + $base3: #fdf6e3; + $yellow: #b58900; + $orange: #cb4b16; + $red: #d30102; + $magenta: #d33682; + $violet: #6c71c4; + $blue: #268bd2; + $cyan: #2aa198; + $green: #859900; + @mixin rebase($rebase03,$rebase02,$rebase01,$rebase00,$rebase0,$rebase1,$rebase2,$rebase3) + { + background-color:$rebase03; + color:$rebase0; + * { color:$rebase0; } + h1,h2,h3,h4,h5,h6 { color:$rebase1; border-color: $rebase0; } + a, a:active, a:visited { color: $rebase1; } + } + @mixin accentize($accent) { + a, a:active, a:visited, code.url { color: $accent; } + h1,h2,h3,h4,h5,h6 {color:$accent} + } + /* light is default mode, so pair with general html definition */ + html, .light { @include rebase($base3,$base2,$base1,$base0,$base00,$base01,$base02,$base03)} + .dark { @include rebase($base03,$base02,$base01,$base00,$base0,$base1,$base2,$base3)} + html * { + color-profile: sRGB; + rendering-intent: auto; + } + +Installation +------------ + +Installation instructions for each version of the colorscheme are included in +the subdirectory README files. Note that for Vim (and possibly for Mutt) you +may want to clone the specific repository (for instance if you are using +Pathogen). See the links at the top of this file. + +Font Samples +------------ + +Solarized has been designed to handle fonts of various weights and retain +readability, from the classic Terminus to the beefy Menlo. + +![font samples - light](https://github.com/altercation/solarized/raw/master/img/solarized-fontsamples-light.png) +![font samples - dark](https://github.com/altercation/solarized/raw/master/img/solarized-fontsamples-dark.png) + +Clockwise from upper left: Menlo, Letter Gothic, Terminus, Andale Mono + +Screenshots +----------- + +Click to view. + +### Mutt + +[![mutt dark](https://github.com/altercation/solarized/raw/master/img/solarized-screen-mutt-dark-th.png)](https://github.com/altercation/solarized/raw/master/img/solarized-screen-mutt-dark.png) +[![mutt light](https://github.com/altercation/solarized/raw/master/img/solarized-screen-mutt-light-th.png)](https://github.com/altercation/solarized/raw/master/img/solarized-screen-mutt-light.png) + +### C (Vim) + +[![c dark](https://github.com/altercation/solarized/raw/master/img/solarized-screen-c-dark-th.png)](https://github.com/altercation/solarized/raw/master/img/solarized-screen-c-dark.png) +[![c light](https://github.com/altercation/solarized/raw/master/img/solarized-screen-c-light-th.png)](https://github.com/altercation/solarized/raw/master/img/solarized-screen-c-light.png) + +### Haskell (Vim) + +[![haskell dark](https://github.com/altercation/solarized/raw/master/img/solarized-screen-haskell-dark-th.png)](https://github.com/altercation/solarized/raw/master/img/solarized-screen-haskell-dark.png) +[![haskell light](https://github.com/altercation/solarized/raw/master/img/solarized-screen-haskell-light-th.png)](https://github.com/altercation/solarized/raw/master/img/solarized-screen-haskell-light.png) + +### HTML (Vim) + +[![html dark](https://github.com/altercation/solarized/raw/master/img/solarized-screen-html-dark-th.png)](https://github.com/altercation/solarized/raw/master/img/solarized-screen-html-dark.png) +[![html light](https://github.com/altercation/solarized/raw/master/img/solarized-screen-html-light-th.png)](https://github.com/altercation/solarized/raw/master/img/solarized-screen-html-light.png) + +### Java (Vim) + +[![java dark](https://github.com/altercation/solarized/raw/master/img/solarized-screen-java-dark-th.png)](https://github.com/altercation/solarized/raw/master/img/solarized-screen-java-dark.png) +[![java light](https://github.com/altercation/solarized/raw/master/img/solarized-screen-java-light-th.png)](https://github.com/altercation/solarized/raw/master/img/solarized-screen-java-light.png) + +### Pandoc Markdown (Vim) + +These screen shots show Vim running with my own [Pandoc Kit +Syntax](/pandockit). + +[![pandoc dark](https://github.com/altercation/solarized/raw/master/img/solarized-screen-pandoc-dark-th.png)](https://github.com/altercation/solarized/raw/master/img/solarized-screen-pandoc-dark.png) +[![pandoc light](https://github.com/altercation/solarized/raw/master/img/solarized-screen-pandoc-light-th.png)](https://github.com/altercation/solarized/raw/master/img/solarized-screen-pandoc-light.png) + +### Perl (Vim) + +[![perl dark](https://github.com/altercation/solarized/raw/master/img/solarized-screen-perl-dark-th.png)](https://github.com/altercation/solarized/raw/master/img/solarized-screen-perl-dark.png) +[![perl light](https://github.com/altercation/solarized/raw/master/img/solarized-screen-perl-light-th.png)](https://github.com/altercation/solarized/raw/master/img/solarized-screen-perl-light.png) + +### Python (Vim) + +[![python dark](https://github.com/altercation/solarized/raw/master/img/solarized-screen-python-dark-th.png)](https://github.com/altercation/solarized/raw/master/img/solarized-screen-python-dark.png) +[![python light](https://github.com/altercation/solarized/raw/master/img/solarized-screen-python-light-th.png)](https://github.com/altercation/solarized/raw/master/img/solarized-screen-python-light.png) + +### Ruby (Vim) + +[![ruby dark](https://github.com/altercation/solarized/raw/master/img/solarized-screen-ruby-dark-th.png)](https://github.com/altercation/solarized/raw/master/img/solarized-screen-ruby-dark.png) +[![ruby light](https://github.com/altercation/solarized/raw/master/img/solarized-screen-ruby-light-th.png)](https://github.com/altercation/solarized/raw/master/img/solarized-screen-ruby-light.png) + +### TeX (Vim) + +[![tex dark](https://github.com/altercation/solarized/raw/master/img/solarized-screen-tex-dark-th.png)](https://github.com/altercation/solarized/raw/master/img/solarized-screen-tex-dark.png) +[![tex light](https://github.com/altercation/solarized/raw/master/img/solarized-screen-tex-light-th.png)](https://github.com/altercation/solarized/raw/master/img/solarized-screen-tex-light.png) + + +The Values +---------- + +L\*a\*b values are canonical (White D65, Reference D50), other values are +matched in sRGB space. + + SOLARIZED HEX 16/8 TERMCOL XTERM/HEX L*A*B RGB HSB + --------- ------- ---- ------- ----------- ---------- ----------- ----------- + base03 #002b36 8/4 brblack 234 #1c1c1c 15 -12 -12 0 43 54 193 100 21 + base02 #073642 0/4 black 235 #262626 20 -12 -12 7 54 66 192 90 26 + base01 #586e75 10/7 brgreen 240 #585858 45 -07 -07 88 110 117 194 25 46 + base00 #657b83 11/7 bryellow 241 #626262 50 -07 -07 101 123 131 195 23 51 + base0 #839496 12/6 brblue 244 #808080 60 -06 -03 131 148 150 186 13 59 + base1 #93a1a1 14/4 brcyan 245 #8a8a8a 65 -05 -02 147 161 161 180 9 63 + base2 #eee8d5 7/7 white 254 #e4e4e4 92 -00 10 238 232 213 44 11 93 + base3 #fdf6e3 15/7 brwhite 230 #ffffd7 97 00 10 253 246 227 44 10 99 + yellow #b58900 3/3 yellow 136 #af8700 60 10 65 181 137 0 45 100 71 + orange #cb4b16 9/3 brred 166 #d75f00 50 50 55 203 75 22 18 89 80 + red #dc322f 1/1 red 160 #d70000 50 65 45 220 50 47 1 79 86 + magenta #d33682 5/5 magenta 125 #af005f 50 65 -05 211 54 130 331 74 83 + violet #6c71c4 13/5 brmagenta 61 #5f5faf 50 15 -45 108 113 196 237 45 77 + blue #268bd2 4/4 blue 33 #0087ff 55 -10 -45 38 139 210 205 82 82 + cyan #2aa198 6/6 cyan 37 #00afaf 60 -35 -05 42 161 152 175 74 63 + green #859900 2/2 green 64 #5f8700 60 -20 65 133 153 0 68 100 60 + diff --git a/install/vim/vimcolor/solarized-master/emacs-colors-solarized/color-theme-solarized.el b/install/vim/vimcolor/solarized-master/emacs-colors-solarized/color-theme-solarized.el new file mode 100755 index 0000000..1cc7231 --- /dev/null +++ b/install/vim/vimcolor/solarized-master/emacs-colors-solarized/color-theme-solarized.el @@ -0,0 +1,131 @@ +;;; Author: Ethan Schoonover, Solarized; Greg Pfeil, Emacs adaptation +;;; URL: http://ethanschoonover.com/solarized + +;;; This file is not (YET) part of GNU Emacs. + +;;; # Usage + +;;; 1. Install the color-theme package +;;; (http://www.emacswiki.org/cgi-bin/wiki/ColorTheme) +;;; 2. Load this file +;;; 3. M-x color-theme-solarized-[dark|light] + +(eval-when-compile + (require 'color-theme)) + +(defun color-theme-solarized (mode) + "Color theme by Ethan Schoonover, created 2011-03-24. +Ported to Emacs by Greg Pfeil, http://ethanschoonover.com/solarized." + (interactive "Slight or dark? ") + (let ((base03 "#002b36") + (base02 "#073642") + (base01 "#586e75") + (base00 "#657b83") + (base0 "#839496") + (base1 "#93a1a1") + (base2 "#eee8d5") + (base3 "#fdf6e3") + (yellow "#b58900") + (orange "#cb4b16") + (red "#dc322f") + (magenta "#d33682") + (violet "#6c71c4") + (blue "#268bd2") + (cyan "#2aa198") + (green "#859900")) + (when (eq 'light mode) + (rotatef base03 base3) + (rotatef base02 base2) + (rotatef base01 base1) + (rotatef base00 base0)) + (color-theme-install + `(color-theme-solarized + ((foreground-color . ,base0) + (background-color . ,base03) + (background-mode . ,mode) + (cursor-color . ,base0)) + ;; basic + (default ((t (:foreground ,base0)))) + (cursor ((t (:foreground ,base0 :background ,base03 :inverse-video t)))) + (escape-glyph-face ((t (:foreground ,red)))) + (fringe ((t (:foreground ,base01 :background ,base02)))) + (header-line ((t (:foreground ,base0 :background ,base2)))) + (highlight ((t (:background ,base02)))) + (isearch ((t (:foreground ,yellow :inverse-video t)))) + (menu ((t (:foreground ,base0 :background ,base02)))) + (minibuffer-prompt ((t (:foreground ,blue)))) + (mode-line + ((t (:foreground ,base1 :background ,base02 + :box (:line-width 1 :color ,base1))))) + (mode-line-buffer-id ((t (:foreground ,base1)))) + (mode-line-inactive + ((t (:foreground ,base0 :background ,base02 + :box (:line-width 1 :color ,base02))))) + (region ((t (:background ,base02)))) + (secondary-selection ((t (:background ,base02)))) + (trailing-whitespace ((t (:foreground ,red :inverse-video t)))) + (vertical-border ((t (:foreground ,base0)))) + ;; compilation + (compilation-info ((t (:forground ,green :bold t)))) + (compilation-warning ((t (:foreground ,orange :bold t)))) + ;; customize + (custom-button + ((t (:background ,base02 :box (:line-width 2 :style released-button))))) + (custom-button-mouse ((t (:inherit custom-button :foreground ,base1)))) + (custom-button-pressed + ((t (:inherit custom-button-mouse + :box (:line-width 2 :style pressed-button))))) + (custom-comment-tag ((t (:background ,base02)))) + (custom-comment-tag ((t (:background ,base02)))) + (custom-documentation ((t (:inherit default)))) + (custom-group-tag ((t (:foreground ,orange :bold t)))) + (custom-link ((t (:foreground ,violet)))) + (custom-state ((t (:foreground ,green)))) + (custom-variable-tag ((t (:foreground ,orange :bold t)))) + ;; diff + (diff-added ((t (:foreground ,green :inverse-video t)))) + (diff-changed ((t (:foreground ,yellow :inverse-video t)))) + (diff-removed ((t (:foreground ,red :inverse-video t)))) + ;; emacs-wiki + (emacs-wiki-bad-link-face ((t (:foreground ,red :underline t)))) + (emacs-wiki-link-face ((t (:foreground ,blue :underline t)))) + (emacs-wiki-verbatim-face ((t (:foreground ,base00 :underline t)))) + ;; font-lock + (font-lock-builtin-face ((t (:foreground ,green)))) + (font-lock-comment-face ((t (:foreground ,base01 :italic t)))) + (font-lock-constant-face ((t (:foreground ,cyan)))) + (font-lock-function-name-face ((t (:foreground ,blue)))) + (font-lock-keyword-face ((t (:foreground ,green)))) + (font-lock-string-face ((t (:foreground ,cyan)))) + (font-lock-type-face ((t (:foreground ,yellow)))) + (font-lock-variable-name-face ((t (:foreground ,blue)))) + (font-lock-warning-face ((t (:foreground ,red :bold t)))) + ;; info + (info-xref ((t (:foreground ,blue :underline t)))) + (info-xref-visited ((t (:inherit info-xref :foreground ,magenta)))) + ;; org + (org-hide ((t (:foreground ,base03)))) + (org-todo ((t (:foreground ,red :bold t)))) + (org-done ((t (:foreground ,green :bold t)))) + ;; show-paren + (show-paren-match-face ((t (:background ,cyan :foreground ,base3)))) + (show-paren-mismatch-face ((t (:background ,red :foreground ,base3)))))))) + +(defun color-theme-solarized-dark () + (interactive) + (color-theme-solarized 'dark)) + +(defun color-theme-solarized-light () + (interactive) + (color-theme-solarized 'light)) + +(add-to-list 'color-themes + '(color-theme-solarized-light + "Solarized Light" + "Ethan Schoonover & Greg Pfeil ")) +(add-to-list 'color-themes + '(color-theme-solarized-dark + "Solarized Dark" + "Ethan Schoonover & Greg Pfeil ")) + +(provide 'color-theme-solarized) diff --git a/install/vim/vimcolor/solarized-master/files/README.md b/install/vim/vimcolor/solarized-master/files/README.md new file mode 100755 index 0000000..f9674b6 --- /dev/null +++ b/install/vim/vimcolor/solarized-master/files/README.md @@ -0,0 +1,10 @@ +Solarized Package Downloads +=========================== + +If you are reviewing this on Github you probably just want to clone the project. + +This project does double duty as the actual website (or rather subdirectory) +for Solarized at . The current release +downloads live here. I only build these for an actual release increment. + +The version tagged and untagged files in this directory are identical. diff --git a/install/vim/vimcolor/solarized-master/files/mutt-colors-solarized-1.0.0beta2.zip b/install/vim/vimcolor/solarized-master/files/mutt-colors-solarized-1.0.0beta2.zip new file mode 100755 index 0000000..6f62575 Binary files /dev/null and b/install/vim/vimcolor/solarized-master/files/mutt-colors-solarized-1.0.0beta2.zip differ diff --git a/install/vim/vimcolor/solarized-master/files/mutt-colors-solarized.zip b/install/vim/vimcolor/solarized-master/files/mutt-colors-solarized.zip new file mode 100755 index 0000000..6f62575 Binary files /dev/null and b/install/vim/vimcolor/solarized-master/files/mutt-colors-solarized.zip differ diff --git a/install/vim/vimcolor/solarized-master/files/solarized-1.0.0beta2.zip b/install/vim/vimcolor/solarized-master/files/solarized-1.0.0beta2.zip new file mode 100755 index 0000000..d70e04a Binary files /dev/null and b/install/vim/vimcolor/solarized-master/files/solarized-1.0.0beta2.zip differ diff --git a/install/vim/vimcolor/solarized-master/files/solarized.zip b/install/vim/vimcolor/solarized-master/files/solarized.zip new file mode 100755 index 0000000..d70e04a Binary files /dev/null and b/install/vim/vimcolor/solarized-master/files/solarized.zip differ diff --git a/install/vim/vimcolor/solarized-master/files/vim-colors-solarized-1.0.0beta2.zip b/install/vim/vimcolor/solarized-master/files/vim-colors-solarized-1.0.0beta2.zip new file mode 100755 index 0000000..1f7d886 Binary files /dev/null and b/install/vim/vimcolor/solarized-master/files/vim-colors-solarized-1.0.0beta2.zip differ diff --git a/install/vim/vimcolor/solarized-master/files/vim-colors-solarized.zip b/install/vim/vimcolor/solarized-master/files/vim-colors-solarized.zip new file mode 100755 index 0000000..1f7d886 Binary files /dev/null and b/install/vim/vimcolor/solarized-master/files/vim-colors-solarized.zip differ diff --git a/install/vim/vimcolor/solarized-master/gedit/README.md b/install/vim/vimcolor/solarized-master/gedit/README.md new file mode 100755 index 0000000..abbb133 --- /dev/null +++ b/install/vim/vimcolor/solarized-master/gedit/README.md @@ -0,0 +1,67 @@ +# Solarized for Gedit + +## Precision colors for machines and people - _Now with more Gedit!_ + +--- + +### Solarized + +Solarized was created by [Ethan Schoonover][ES] and you can find out more +about the design work that went into it on his [project page][ES-solarized]. If +you would like to use Solarized in editors other than Gedit or on your terminal, +Ethan hosts the [main repository][SolarizedRepo] which combines all the available +ports in one place. + +### Solarized for Gedit + +Solarized was initially ported for Gedit by [Matthew Cantelon][MC] and can be +found at . + +### Screenshots + +![Light theme][LightImg] +![Dark theme][DarkImg] + +### Installation + +_Please note that installation has only been tested on Ubuntu 12.10 and Gedit 3_ + +You can download the files in one of two ways: + +* using `git clone git://github.com/mattcan/solarized-gedit.git` +* using the **Download** button to get the ZIP file and extracting the files to + a folder + +Once the files are on your PC, copy `solarized-light.xml` and `solarized-dark.xml` +to one of these folders: + +* if you are the only user on your computer + +``` +mkdir -p ~/.local/share/gedit/styles +cp solarized-* ~/.local/share/gedit/styles +``` + +* if you want everyone on your PC to be able to use the styles ( _path + below is for Ubuntu_ ) + +``` +sudo mkdir -p /usr/share/gtksourceview-3.0/styles +sudo cp solarized-* /usr/share/gtksourceview-3.0/styles +``` + +* you can also use the installer ( _has only been tested with Ubuntu 12.10_ ) + +``` +cd wherever/you/extracted +chmod a+x installer +# -a for all users, -l for local +./installer [-a | -l] +``` + +[ES]: http://ethanschoonover.com +[ES-Solarized]: http://ethanschoonover.com/solarized +[SolarizedRepo]: https://github.com/altercation/solarized +[MC]: http://matthewcantelon.ca +[LightImg]: https://github.com/mattcan/solarized-gedit/raw/master/img/solarized_light.png +[DarkImg]: https://github.com/mattcan/solarized-gedit/raw/master/img/solarized_dark.png diff --git a/install/vim/vimcolor/solarized-master/gedit/img/solarized_dark.png b/install/vim/vimcolor/solarized-master/gedit/img/solarized_dark.png new file mode 100755 index 0000000..0f79cff Binary files /dev/null and b/install/vim/vimcolor/solarized-master/gedit/img/solarized_dark.png differ diff --git a/install/vim/vimcolor/solarized-master/gedit/img/solarized_light.png b/install/vim/vimcolor/solarized-master/gedit/img/solarized_light.png new file mode 100755 index 0000000..9f495f9 Binary files /dev/null and b/install/vim/vimcolor/solarized-master/gedit/img/solarized_light.png differ diff --git a/install/vim/vimcolor/solarized-master/gedit/installer b/install/vim/vimcolor/solarized-master/gedit/installer new file mode 100755 index 0000000..f91c345 --- /dev/null +++ b/install/vim/vimcolor/solarized-master/gedit/installer @@ -0,0 +1,62 @@ +#!/bin/bash + +# shows usage instructions +usage() +{ +cat << EOF +usage: $0 [options] + +This script installs the Solarized styles for gedit. + +OPTIONS: + -h Shows this message + -a Install for all users + -l Install only for you +EOF +} + +chkdir() +{ +if [ ! -d "$INSTALLPATH" ]; then + if [ "$NEEDSUDO" == true ]; then + sudo mkdir -p "$INSTALLPATH" + else + mkdir -p "$INSTALLPATH" + fi +fi +} + +# path to install to +INSTALLPATH=$HOME/.local/share/gedit/styles +# will need to use sudo to install for all users +NEEDSUDO=false + +# loop through passed arguments +while getopts "hal" OPTION +do + case $OPTION in + h) + usage + exit 1 + ;; + a) + INSTALLPATH=/usr/share/gtksourceview-3.0/styles + NEEDSUDO=true + ;; + l) + INSTALLPATH=$HOME/.local/share/gedit/styles + ;; + ?) + INSTALLPATH=$HOME/.local/share/gedit/styles + ;; + esac +done + +# install for all users when sudo set to true +if [ "$NEEDSUDO" == true ]; then + chkdir + sudo cp solarized-*.xml "$INSTALLPATH" +else + chkdir + cp solarized-*.xml "$INSTALLPATH" +fi diff --git a/install/vim/vimcolor/solarized-master/gedit/solarized-dark.xml b/install/vim/vimcolor/solarized-master/gedit/solarized-dark.xml new file mode 100755 index 0000000..0ab5d96 --- /dev/null +++ b/install/vim/vimcolor/solarized-master/gedit/solarized-dark.xml @@ -0,0 +1,131 @@ + + + + + + Matthew Cantelon + <_description>Gedit port of the dark version of the Solarized theme. Check https://github.com/mattcan/solarized-gedit for more information. + + + + + + + + + + + + + + + + + + + + + + + +

abc

+

def

+

Testing page

+ + diff --git a/install/vim/vimcolor/solarized-master/utils/tests/java.java b/install/vim/vimcolor/solarized-master/utils/tests/java.java new file mode 100755 index 0000000..55133df --- /dev/null +++ b/install/vim/vimcolor/solarized-master/utils/tests/java.java @@ -0,0 +1,16 @@ +import java.util.Map; +import java.util.TreeSet; + +public class GetEnv { + /** + * let's test generics + * @param args the command line arguments + */ + public static void main(String[] args) { + // get a map of environment variables + Map env = System.getenv(); + // build a sorted set out of the keys and iterate + for(String k: new TreeSet(env.keySet())) { + System.out.printf("%s = %s\n", k, env.get(k)); + } + } } diff --git a/install/vim/vimcolor/solarized-master/utils/tests/javascript.js b/install/vim/vimcolor/solarized-master/utils/tests/javascript.js new file mode 100755 index 0000000..ce01bf7 --- /dev/null +++ b/install/vim/vimcolor/solarized-master/utils/tests/javascript.js @@ -0,0 +1,20 @@ +/** +sample javascript from xui +*/ + +var undefined, + xui, + window = this, + string = new String('string'), + document = window.document, + simpleExpr = /^#?([\w-]+)$/, + idExpr = /^#/, + tagExpr = /<([\w:]+)/, + slice = function (e) { return [].slice.call(e, 0); }; + try { var a = slice(document.documentElement.childNodes)[0].nodeType; } + catch(e){ slice = function (e) { var ret=[]; for (var i=0; e[i]; i++) + ret.push(e[i]); return ret; }; } + +window.x$ = window.xui = xui = function(q, context) { + return new xui.fn.find(q, context); +}; diff --git a/install/vim/vimcolor/solarized-master/utils/tests/pandoc.md b/install/vim/vimcolor/solarized-master/utils/tests/pandoc.md new file mode 100755 index 0000000..be1761a --- /dev/null +++ b/install/vim/vimcolor/solarized-master/utils/tests/pandoc.md @@ -0,0 +1,26 @@ +% Pandoc Test File +% Ethan Schoonover +% March 22, 2011 + +%% format: markdown+lhs + +> import Hakyll +> main :: IO () +> main = hakyll $ do +> compile "css/*" $ byExtension (error "Not a (S)CSS file") + +Using *Pandoc* +============= + +In this document the technical terms `water` and `ice` will be replaced by +H~2~O.^[a contrived footnote] + +## Heading styles can be mixed + +And matched, and they still fold **properly** + +* * * * + +Some code: + + a verbatim or "code" block diff --git a/install/vim/vimcolor/solarized-master/utils/tests/perl.pl b/install/vim/vimcolor/solarized-master/utils/tests/perl.pl new file mode 100755 index 0000000..71db713 --- /dev/null +++ b/install/vim/vimcolor/solarized-master/utils/tests/perl.pl @@ -0,0 +1,33 @@ +#!perl -w + +# Time-stamp: <2002/04/06, 13:12:13 (EST), maverick, csvformat.pl> +# Two pass CSV file to table formatter + +$delim = $#ARGV >= 1 ? $ARGV[1] : ','; +print STDERR "Split pattern: $delim\n"; + +# first pass +open F, "<$ARGV[0]" or die; +while() +{ + chomp; + $i = 0; + map { $max[$_->[1]] = $_->[0] if $_->[0] > ($max[$_->[1]] || 0) } + (map {[length $_, $i++]} split($delim)); +} +close F; + +print STDERR 'Field width: ', join(', ', @max), "\n"; +print STDERR join(' ', map {'-' x $_} @max); + +# second pass +open F, "<$ARGV[0]" or die; +while() + { + chomp; + $i = 0; + map { printf("%-$max[$_->[1]]s ", $_->[0]) } + (map {[$_, $i++]} split($delim)); + print "\n"; +} +close F; diff --git a/install/vim/vimcolor/solarized-master/utils/tests/php.php b/install/vim/vimcolor/solarized-master/utils/tests/php.php new file mode 100755 index 0000000..f649731 --- /dev/null +++ b/install/vim/vimcolor/solarized-master/utils/tests/php.php @@ -0,0 +1,29 @@ + + +hasPermission("ManageCountries")) { ?> + + + + +
diff --git a/install/vim/vimcolor/solarized-master/utils/tests/python.py b/install/vim/vimcolor/solarized-master/utils/tests/python.py new file mode 100755 index 0000000..5b8f258 --- /dev/null +++ b/install/vim/vimcolor/solarized-master/utils/tests/python.py @@ -0,0 +1,67 @@ +# test python (sample from offlineimap) + +class ExitNotifyThread(Thread): + """This class is designed to alert a "monitor" to the fact that a thread has + exited and to provide for the ability for it to find out why.""" + def run(self): + global exitthreads, profiledir + self.threadid = thread.get_ident() + try: + if not profiledir: # normal case + Thread.run(self) + else: + try: + import cProfile as profile + except ImportError: + import profile + prof = profile.Profile() + try: + prof = prof.runctx("Thread.run(self)", globals(), locals()) + except SystemExit: + pass + prof.dump_stats( \ + profiledir + "/" + str(self.threadid) + "_" + \ + self.getName() + ".prof") + except: + self.setExitCause('EXCEPTION') + if sys: + self.setExitException(sys.exc_info()[1]) + tb = traceback.format_exc() + self.setExitStackTrace(tb) + else: + self.setExitCause('NORMAL') + if not hasattr(self, 'exitmessage'): + self.setExitMessage(None) + + if exitthreads: + exitthreads.put(self, True) + + def setExitCause(self, cause): + self.exitcause = cause + def getExitCause(self): + """Returns the cause of the exit, one of: + 'EXCEPTION' -- the thread aborted because of an exception + 'NORMAL' -- normal termination.""" + return self.exitcause + def setExitException(self, exc): + self.exitexception = exc + def getExitException(self): + """If getExitCause() is 'EXCEPTION', holds the value from + sys.exc_info()[1] for this exception.""" + return self.exitexception + def setExitStackTrace(self, st): + self.exitstacktrace = st + def getExitStackTrace(self): + """If getExitCause() is 'EXCEPTION', returns a string representing + the stack trace for this exception.""" + return self.exitstacktrace + def setExitMessage(self, msg): + """Sets the exit message to be fetched by a subsequent call to + getExitMessage. This message may be any object or type except + None.""" + self.exitmessage = msg + def getExitMessage(self): + """For any exit cause, returns the message previously set by + a call to setExitMessage(), or None if there was no such message + set.""" + return self.exitmessage diff --git a/install/vim/vimcolor/solarized-master/utils/tests/ruby.rb b/install/vim/vimcolor/solarized-master/utils/tests/ruby.rb new file mode 100755 index 0000000..bf438fe --- /dev/null +++ b/install/vim/vimcolor/solarized-master/utils/tests/ruby.rb @@ -0,0 +1,49 @@ +# ruby test file ruby.rb + +include Enumerable + +def initialize(rbconfig) +@rbconfig = rbconfig +@no_harm = false +end + +def load_savefile +begin + File.foreach(savefile()) do |line| + k, v = *line.split(/=/, 2) + self[k] = v.strip + end +rescue Errno::ENOENT + setup_rb_error $!.message + "\n#{File.basename($0)} config first" +end +end + +if c['rubylibdir'] + # V > 1.6.3 + libruby = "#{c['prefix']}/lib/ruby" + siterubyverarch = c['sitearchdir'] +end +parameterize = lambda {|path| + path.sub(/\A#{Regexp.quote(c['prefix'])}/, '$prefix') +} + +if arg = c['configure_args'].split.detect {|arg| /--with-make-prog=/ =~ arg } + makeprog = arg.sub(/'/, '').split(/=/, 2)[1] +else + makeprog = 'make' +end + +def setup_rb_error(msg) + raise SetupError, msg +end + +if $0 == __FILE__ + begin + ToplevelInstaller.invoke + rescue SetupError + raise if $DEBUG + $stderr.puts $!.message + $stderr.puts "Try 'ruby #{$0} --help' for detailed usage." + exit 1 + end +end diff --git a/install/vim/vimcolor/solarized-master/utils/tests/shell.sh b/install/vim/vimcolor/solarized-master/utils/tests/shell.sh new file mode 100755 index 0000000..4b73ffc --- /dev/null +++ b/install/vim/vimcolor/solarized-master/utils/tests/shell.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +cd $ROOT_DIR +DOT_FILES="lastpass weechat ssh Xauthority" +for dotfile in $DOT_FILES; do conform_link "$DATA_DIR/$dotfile" ".$dotfile"; done + +# }}} +# crontab update from file {{{ +# TODO: refactor with suffix variables (or common cron values) + +case "$PLATFORM" in + linux) + #conform_link "$CONF_DIR/shell/zshenv" ".zshenv" + crontab -l > $ROOT_DIR/tmp/crontab-conflict-arch + cd $ROOT_DIR/$CONF_DIR/cron + if [[ "$(diff ~/tmp/crontab-conflict-arch crontab-current-arch)" == "" + ]]; + then # no difference with current backup + logger "$LOG_PREFIX: crontab live settings match stored "\ + "settings; no restore required" + rm ~/tmp/crontab-conflict-arch + else # current crontab settings in file do not match live settings + crontab $ROOT_DIR/$CONF_DIR/cron/crontab-current-arch + logger "$LOG_PREFIX: crontab stored settings conflict with "\ + "live settings; stored settings restored. "\ + "Previous settings recorded in ~/tmp/crontab-conflict-arch." + fi + ;; + diff --git a/install/vim/vimcolor/solarized-master/utils/tests/tex.tex b/install/vim/vimcolor/solarized-master/utils/tests/tex.tex new file mode 100755 index 0000000..37a19e8 --- /dev/null +++ b/install/vim/vimcolor/solarized-master/utils/tests/tex.tex @@ -0,0 +1,24 @@ +% Time-stamp: <2004/04/06, 16:46:43 (EST), maverick, test.tex> +\subsection{Strict diagonal-dominance} +Suppose we are given a matrix $A=L+D$, where $L$ is a Laplacian and +$D$ is a nonnegative diagonal matrix, for which we seek to construct a +preconditioner. + +We may construct a Support Tree Preconditioner, $B = +\begin{pmatrix} T & U\\U\TT & W\end{pmatrix}$ for $L$ and to use $B' +=\begin{pmatrix} T & U \\U\TT & W+D\end{pmatrix}$ as a preconditioner +for $A$. If we let $Q = W - U\TT T\IV U$, by Lemma~\ref{lem:stcg} it +suffices to bound $\sigma(A/Q+D)$ and $\sigma(Q+D/A)$. + +\begin{proposition}\label{prop:XZ-YZ} +If $X$, $Y$, and $Z$ are spsd matrices of the same size then +$\sigma(X+Z/Y+Z) \leq \max\{\sigma(X/Y),\, 1\}$. +\end{proposition} + +\Proof We have $\sigma(X+Z/Y+Z) = +\min\{\tau \mid \forall\vv{x},\, \tau\cdot \vv{x}\TT (Y+Z)\vv{x} \geq + \vv{x}\TT(X+Z)\vv{x}\} = +\min\{\tau \mid \forall\vv{x},\, (\tau-1)\cdot \vv{x}\TT Z\vv{x} + + \tau \cdot\vv{x}\TT Y\vv{x} \geq \vv{x}\TT X\vv{x}\} \leq +\max\{1,\,\sigma(X/Y)\}$.\QED + diff --git a/install/vim/vimcolor/solarized-master/utils/vimorg-text b/install/vim/vimcolor/solarized-master/utils/vimorg-text new file mode 100755 index 0000000..9197f74 --- /dev/null +++ b/install/vim/vimcolor/solarized-master/utils/vimorg-text @@ -0,0 +1,28 @@ +Solarized +========= + +summary +------- + +Beautiful dual light/dark, selective contrast, GUI/256/16 colorscheme + +detailed description +-------------------- + +Screenshots and details at http://ethanschoonover.com/solarized (includes Solarized for other applications including mutt, terminal emulators). + +Can also be cloned from github at https://github.com/altercation/vim-colors-solarized for use with Pathogen, Vundle, etc. + +* * * + +Solarized is a beautiful, carefully designed 16 color, selective contrast colorscheme with both *light* and *dark* modes. It supports GUI full color, 256 color terminal mode and 16 color terminal mode (use Solarized terminal colorschemes with the latter for optimal results; see project homepage above). + +It has been built on a foundation of eight monotones with precise CIELAB lightness relations. These monotones relations are symmetric, allowing for use in light and dark modes with identical readability. + +Install details +--------------- + +See the README in the script download for installation details and utility scripts for your .vimrc. + +For the impatient without customized vim setups: drop solarized.vim into your ~/.vim/colors directory. + diff --git a/install/vim/vimcolor/solarized-master/utils/vimscreenshots.applescript b/install/vim/vimcolor/solarized-master/utils/vimscreenshots.applescript new file mode 100755 index 0000000..f259613 --- /dev/null +++ b/install/vim/vimcolor/solarized-master/utils/vimscreenshots.applescript @@ -0,0 +1,114 @@ +set fontList to {{"LetterGothicMono\\ Light:h18", "lettergothic18"}, {"LetterGothicMono\\ Light:h14", "lettergothic14"}, {"Andale\\ Mono:h14", "andalemono14"}, {"Monaco:h14", "monaco14"}, {"DejaVu\\ Sans\\ Mono:h18", "dejavusans18"}, {"DejaVu\\ Sans\\ Mono:h14", "dejavusans14"}, {"SkyHook\\ Mono:h14", "skyhookmono14"}, {"Terminus\\ Medium:h20", "terminus20"}, {"Terminus\\ Medium:h12", "terminus12"}} + +set fileSuffixes to {"-light", "-dark"} + +tell application "MacVim" + --set thisSize to bounds of first window +end tell + +set TestFolder to choose folder +tell application "System Events" + set TestFileNames to the name of every item of TestFolder whose name does not start with "." +end tell + +tell application "MacVim" + activate + delay 1 + my do_menu("MacVim", "File", "Close Window") + delay 1 + my do_menu("MacVim", "File", "New Window") + delay 1 + tell application "System Events" + keystroke ":set lines=30 | set columns=87 | set guifont=LetterGothicMono\\ Light:h18 | set guioptions-=Tm | set showtabline=0 | set transparency=0" & return + end tell + delay 1 + tell application "Finder" + set screenResolution to bounds of window of desktop + set screenWidth to (item 3 of screenResolution) + set screenHeight to (item 4 of screenResolution) + end tell + + repeat with t from 1 to number of items in fontList + set fontCommand to item 1 of item t of fontList + set fontDirectory to item 2 of item t of fontList + set tmpDir to ((POSIX path of (path to desktop)) as string) & fontDirectory + try + do shell script "mkdir " & tmpDir + end try + try + do shell script "rm " & tmpDir & "/index.html" + end try + do shell script "echo \"

" & fontDirectory & "

\" >> " & tmpDir & "/index.html" + repeat with i from 1 to number of items in TestFileNames + set ThisFileName to item i of TestFileNames + set ThisBaseFileName to (text 1 thru ((offset of "." in ThisFileName) - 1) of ThisFileName) as string + do shell script "echo \"

" & ThisBaseFileName & "\" >> " & tmpDir & "/index.html" + end repeat + tell application "System Events" to keystroke ":set guifont=" & fontCommand & return + delay 2 + tell application "System Events" + set proc to (name of first process whose frontmost is true) + tell window 1 of process proc + -- get window initial position + copy position to {ini_x, ini_y} + copy size to {windowWidth, windowHeight} + set chromeHeight to 24 + -- center window because the sips crop command automatically centers the cropped area in the image + set windowPosX to ((screenWidth - windowWidth) / 2) as integer + set windowPosY to (((screenHeight - windowHeight) / 2) - chromeHeight / 2) as integer + set position to {windowPosX, windowPosY} + end tell + end tell + delay 0.5 + repeat with i from 1 to number of items in TestFileNames + set ThisFileName to item i of TestFileNames + set ThisBaseFileName to (text 1 thru ((offset of "." in ThisFileName) - 1) of ThisFileName) as string + open POSIX path of TestFolder & ThisFileName + delay 0.5 + set tmpBaseFileName to "screen-" & ThisBaseFileName + set tmpPath to (tmpDir & "/" & tmpBaseFileName) + --set tmpPath to quoted form of tmpPath + do shell script "echo \"

" & ThisBaseFileName & "

\" >> " & tmpDir & "/index.html" + repeat with fileSuffix in fileSuffixes + set tmpFileName to tmpPath & fileSuffix & ".png" + set tmpThumbName to tmpPath & fileSuffix & "-th.png" + set captureCommand to "screencapture" & space & "-x" & space & tmpFileName + set convertBaseCommand to "/usr/local/bin/convert " & tmpFileName & " -crop " & windowWidth & "x" & windowHeight & "+" & windowPosX & "+" & windowPosY + -- +dither turns *off* dithering + set thumbCommand to convertBaseCommand & " -thumbnail 20% -unsharp 0x.5 +dither -depth 8 -colors 256 -strip " & tmpThumbName + set cropCommand to convertBaseCommand & " +dither -depth 8 -colors 256 -strip " & tmpFileName + do shell script captureCommand + delay 0.5 + do shell script thumbCommand + do shell script cropCommand + do shell script "echo \"

\" >> " & tmpDir & "/index.html" + tell application "System Events" to keystroke ":Togbg" & return + delay 0.5 + end repeat + end repeat + end repeat + +end tell + +on do_menu(app_name, menu_name, menu_item) + try + -- bring the target application to the front + tell application app_name + activate + end tell + tell application "System Events" + tell process app_name + tell menu bar 1 + tell menu bar item menu_name + tell menu menu_name + click menu item menu_item + end tell + end tell + end tell + end tell + end tell + return true + on error error_message + return false + end try +end do_menu \ No newline at end of file diff --git a/install/vim/vimcolor/solarized-master/vim-colors-solarized/README.mkd b/install/vim/vimcolor/solarized-master/vim-colors-solarized/README.mkd new file mode 100755 index 0000000..1f4d0e6 --- /dev/null +++ b/install/vim/vimcolor/solarized-master/vim-colors-solarized/README.mkd @@ -0,0 +1,268 @@ +--- +Title: Solarized Colorscheme for Vim +Description: Precision colors for machines and people +Author: Ethan Schoonover +Colors: light yellow +Created: 2011 Mar 15 +Modified: 2011 Apr 16 + +--- + +Solarized Colorscheme for Vim +============================= + +Developed by Ethan Schoonover + +Visit the [Solarized homepage] +------------------------------ + +See the [Solarized homepage] for screenshots, +details and colorscheme versions for Vim, Mutt, popular terminal emulators and +other applications. + +Screenshots +----------- + +![solarized dark](https://github.com/altercation/solarized/raw/master/img/solarized-vim.png) + +Downloads +--------- + +If you have come across this colorscheme via the [Vim-only repository] on +github, or the [vim.org script] page see the link above to the Solarized +homepage or visit the main [Solarized repository]. + +The [Vim-only repository] is kept in sync with the main [Solarized repository] +and is for installation convenience only (with [Pathogen] or [Vundle], for +instance). Issues, bug reports, changelogs are centralized at the main +[Solarized repository]. + +[Solarized homepage]: http://ethanschoonover.com/solarized +[Solarized repository]: https://github.com/altercation/solarized +[Vim-only repository]: https://github.com/altercation/vim-colors-solarized +[vimorg-script]: http://vim.org/script +[Pathogen]: https://github.com/tpope/vim-pathogen +[Vundle]: https://github.com/gmarik/vundle + +Installation +------------ + +### Option 1: Manual installation + +1. Move `solarized.vim` to your `.vim/colors` directory. After downloading the + vim script or package: + + $ cd vim-colors-solarized/colors + $ mv solarized.vim ~/.vim/colors/ + +### Option 2: Pathogen installation ***(recommended)*** + +1. Download and install Tim Pope's [Pathogen]. + +2. Next, move or clone the `vim-colors-solarized` directory so that it is + a subdirectory of the `.vim/bundle` directory. + + a. **Clone:** + + $ cd ~/.vim/bundle + $ git clone git://github.com/altercation/vim-colors-solarized.git + + b. **Move:** + + In the parent directory of vim-colors-solarized: + + $ mv vim-colors-solarized ~/.vim/bundle/ + +### Modify .vimrc + +After either Option 1 or Option 2 above, put the following two lines in your +.vimrc: + + syntax enable + set background=dark + colorscheme solarized + +or, for the light background mode of Solarized: + + syntax enable + set background=light + colorscheme solarized + +I like to have a different background in GUI and terminal modes, so I can use +the following if-then. However, I find vim's background autodetection to be +pretty good and, at least with MacVim, I can leave this background value +assignment out entirely and get the same results. + + if has('gui_running') + set background=light + else + set background=dark + endif + +See the [Solarized homepage] for screenshots which will help you +select either the light or dark background. + +### IMPORTANT NOTE FOR TERMINAL USERS: + +If you are going to use Solarized in Terminal mode (i.e. not in a GUI version +like gvim or macvim), **please please please** consider setting your terminal +emulator's colorscheme to use the Solarized palette. I've included palettes +for some popular terminal emulator as well as Xresources in the official +Solarized download available from [Solarized homepage]. If you use +Solarized *without* these colors, Solarized will need to be told to degrade its +colorscheme to a set compatible with the limited 256 terminal palette (whereas +by using the terminal's 16 ansi color values, you can set the correct, specific +values for the Solarized palette). + +If you do use the custom terminal colors, solarized.vim should work out of the +box for you. If you are using a terminal emulator that supports 256 colors and +don't want to use the custom Solarized terminal colors, you will need to use +the degraded 256 colorscheme. To do so, simply add the following line *before* +the `colorscheme solarized` line: + + let g:solarized_termcolors=256 + +Again, I recommend just changing your terminal colors to Solarized values +either manually or via one of the many terminal schemes available for import. + +Advanced Configuration +---------------------- + +Solarized will work out of the box with just the two lines specified above but +does include several other options that can be set in your .vimrc file. + +Set these in your vimrc file prior to calling the colorscheme. +``` + option name default optional + ------------------------------------------------ + g:solarized_termcolors= 16 | 256 + g:solarized_termtrans = 0 | 1 + g:solarized_degrade = 0 | 1 + g:solarized_bold = 1 | 0 + g:solarized_underline = 1 | 0 + g:solarized_italic = 1 | 0 + g:solarized_contrast = "normal"| "high" or "low" + g:solarized_visibility= "normal"| "high" or "low" + ------------------------------------------------ +``` + +### Option Details + +* g:solarized_termcolors + + This is set to *16* by default, meaning that Solarized will attempt to use + the standard 16 colors of your terminal emulator. You will need to set + those colors to the correct Solarized values either manually or by + importing one of the many colorscheme available for popular terminal + emulators and Xresources. + +* g:solarized_termtrans + + If you use a terminal emulator with a transparent background and Solarized + isn't displaying the background color transparently, set this to 1 and + Solarized will use the default (transparent) background of the terminal + emulator. *urxvt* required this in my testing; iTerm2 did not. + + Note that on Mac OS X Terminal.app, solarized_termtrans is set to 1 by + default as this is almost always the best option. The only exception to + this is if the working terminfo file supports 256 colors (xterm-256color). + +* g:solarized_degrade + + For test purposes only; forces Solarized to use the 256 degraded color mode + to test the approximate color values for accuracy. + +* g:solarized_bold | g:solarized_underline | g:solarized_italic + + If you wish to stop Solarized from displaying bold, underlined or + italicized typefaces, simply assign a zero value to the appropriate + variable, for example: `let g:solarized_italic=0` + +* g:solarized_contrast + + Stick with normal! It's been carefully tested. Setting this option to high + or low does use the same Solarized palette but simply shifts some values up + or down in order to expand or compress the tonal range displayed. + +* g:solarized_visibility + + Special characters such as trailing whitespace, tabs, newlines, when + displayed using `:set list` can be set to one of three levels depending on + your needs. Default value is `normal` with `high` and `low` options. + +Toggle Background Function +-------------------------- + +Solarized comes with a Toggle Background plugin that by default will map to + if that mapping is available. If it is not available you will need to +either map the function manually or change your current mapping to +something else. + +To set your own mapping in your .vimrc file, simply add the following line to +support normal, insert and visual mode usage, changing the "" value to the +key or key combination you wish to use: + + call togglebg#map("") + +Note that you'll want to use a single function key or equivalent if you want +the plugin to work in all modes (normal, insert, visual). + +Code Notes +---------- + +Use folding to view the `solarized.vim` script with `foldmethod=marker` turned +on. + +I have attempted to modularize the creation of Vim colorschemes in this script +and, while it could be refactored further, it should be a good foundation for +the creation of any color scheme. By simply changing the sixteen values in the +GUI section and testing in gvim (or mvim) you can rapidly prototype new +colorschemes without diving into the weeds of line-item editing each syntax +highlight declaration. + +The Values +---------- + +L\*a\*b values are canonical (White D65, Reference D50), other values are +matched in sRGB space. + + SOLARIZED HEX 16/8 TERMCOL XTERM/HEX L*A*B sRGB HSB + --------- ------- ---- ------- ----------- ---------- ----------- ----------- + base03 #002b36 8/4 brblack 234 #1c1c1c 15 -12 -12 0 43 54 193 100 21 + base02 #073642 0/4 black 235 #262626 20 -12 -12 7 54 66 192 90 26 + base01 #586e75 10/7 brgreen 240 #4e4e4e 45 -07 -07 88 110 117 194 25 46 + base00 #657b83 11/7 bryellow 241 #585858 50 -07 -07 101 123 131 195 23 51 + base0 #839496 12/6 brblue 244 #808080 60 -06 -03 131 148 150 186 13 59 + base1 #93a1a1 14/4 brcyan 245 #8a8a8a 65 -05 -02 147 161 161 180 9 63 + base2 #eee8d5 7/7 white 254 #d7d7af 92 -00 10 238 232 213 44 11 93 + base3 #fdf6e3 15/7 brwhite 230 #ffffd7 97 00 10 253 246 227 44 10 99 + yellow #b58900 3/3 yellow 136 #af8700 60 10 65 181 137 0 45 100 71 + orange #cb4b16 9/3 brred 166 #d75f00 50 50 55 203 75 22 18 89 80 + red #dc322f 1/1 red 160 #d70000 50 65 45 220 50 47 1 79 86 + magenta #d33682 5/5 magenta 125 #af005f 50 65 -05 211 54 130 331 74 83 + violet #6c71c4 13/5 brmagenta 61 #5f5faf 50 15 -45 108 113 196 237 45 77 + blue #268bd2 4/4 blue 33 #0087ff 55 -10 -45 38 139 210 205 82 82 + cyan #2aa198 6/6 cyan 37 #00afaf 60 -35 -05 42 161 152 175 74 63 + green #859900 2/2 green 64 #5f8700 60 -20 65 133 153 0 68 100 60 + +License +------- +Copyright (c) 2011 Ethan Schoonover + +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. diff --git a/install/vim/vimcolor/solarized-master/vim-colors-solarized/autoload/togglebg.vim b/install/vim/vimcolor/solarized-master/vim-colors-solarized/autoload/togglebg.vim new file mode 100755 index 0000000..108511f --- /dev/null +++ b/install/vim/vimcolor/solarized-master/vim-colors-solarized/autoload/togglebg.vim @@ -0,0 +1,55 @@ +" Toggle Background +" Modified: 2011 Apr 29 +" Maintainer: Ethan Schoonover +" License: OSI approved MIT license + +if exists("g:loaded_togglebg") + finish +endif +let g:loaded_togglebg = 1 + +" noremap is a bit misleading here if you are unused to vim mapping. +" in fact, there is remapping, but only of script locally defined remaps, in +" this case TogBG. The + + diff --git a/install/vim/vimplugin/rainbow-master/tests/test.html.txt b/install/vim/vimplugin/rainbow-master/tests/test.html.txt new file mode 100755 index 0000000..495388e --- /dev/null +++ b/install/vim/vimplugin/rainbow-master/tests/test.html.txt @@ -0,0 +1,8 @@ + +

+ + (1 + (2 + 3)) +
+ + + diff --git a/install/vim/vimplugin/rainbow-master/tests/test.js b/install/vim/vimplugin/rainbow-master/tests/test.js new file mode 100755 index 0000000..912966f --- /dev/null +++ b/install/vim/vimplugin/rainbow-master/tests/test.js @@ -0,0 +1,5 @@ +typoo +(typoo) + +console.log({w: 200, h: 100, pos: [{x: 1, y: 2}, {x: 3, y: 4}]}) + diff --git a/install/vim/vimplugin/rainbow-master/tests/test.lua b/install/vim/vimplugin/rainbow-master/tests/test.lua new file mode 100755 index 0000000..15e369d --- /dev/null +++ b/install/vim/vimplugin/rainbow-master/tests/test.lua @@ -0,0 +1,12 @@ +(function(args) + lst = { a=function(arg) print("hello") end, + b=(1+2)*3/4, + [3+5]={ ["hello"]=("hi") }, + } + lst[ + (function() return 0 end)()] = 1 +end)("blah") + +[[ +Special lua string... +]] diff --git a/install/vim/vimplugin/rainbow-master/tests/test.php b/install/vim/vimplugin/rainbow-master/tests/test.php new file mode 100755 index 0000000..bad0d4c --- /dev/null +++ b/install/vim/vimplugin/rainbow-master/tests/test.php @@ -0,0 +1,13 @@ + 0) + { + echo "Error: " . $_FILES["file"]["error"] . "
"; + } +else + { + echo "Size: " . ($_FILES["file"]["size"] / 1024) . " Kb
"; + } +?> + +hello (world) + diff --git a/install/vim/vimplugin/rainbow-master/tests/test.pl b/install/vim/vimplugin/rainbow-master/tests/test.pl new file mode 100755 index 0000000..ac48bb3 --- /dev/null +++ b/install/vim/vimplugin/rainbow-master/tests/test.pl @@ -0,0 +1,10 @@ +typoo +(typoo) + +sub test { +correct indent; +} + +if ($test) { +incorrect indent; +} diff --git a/install/vim/vimplugin/rainbow-master/tests/test.rb b/install/vim/vimplugin/rainbow-master/tests/test.rb new file mode 100755 index 0000000..c2cd371 --- /dev/null +++ b/install/vim/vimplugin/rainbow-master/tests/test.rb @@ -0,0 +1,15 @@ +{{{}}} +((())) +[[[]]] +[[[[]]]] + +def sample_function(a, b) + ((())) + [[[]]] +end + +class SampleClass + def sample_method(a, b) + [[[]]] + end +end diff --git a/install/vim/vimplugin/rainbow-master/tests/test.sh b/install/vim/vimplugin/rainbow-master/tests/test.sh new file mode 100755 index 0000000..5a765dc --- /dev/null +++ b/install/vim/vimplugin/rainbow-master/tests/test.sh @@ -0,0 +1,52 @@ +#!/bin/bash +typoo +(typoo) + +if stuff +then + somestuff + test = (()) + (()) + a = (1 + (2 + 3)) + if + then + elif + then + else + fi +else + otherstuff +fi + +if stuff + then + somestuff + else + otherstuff +fi + +function f() { + if + fi +} + + +# check if command exists +command_exists () { + type "${1}" > /dev/null 2>&1; + a = (1 + (2 + 3)) +} + +# Fetch the update +fetch() { + if type wget > /dev/null 2>&1 ; then + $debug && echo "fetching update via wget" + wget --no-check-certificate -O "${2}" "${1}" >/dev/null 2>&1 + elif type curl > /dev/null 2>&1 ; then + $debug && echo "fetching update via curl" + curl --insecure --remote-name -o "${2}" "${1}" >/dev/null 2>&1 + else + echo 'Warning: Neither wget nor curl is available. online updates unavailable' >&2 + exit 1 + fi +} diff --git a/install/vim/vimplugin/rainbow-master/tests/test.special-ft b/install/vim/vimplugin/rainbow-master/tests/test.special-ft new file mode 100755 index 0000000..ad5e11d --- /dev/null +++ b/install/vim/vimplugin/rainbow-master/tests/test.special-ft @@ -0,0 +1,5 @@ +(((()))) +[[[[]]]] +{{{{}}}} + +# vim: set ft=this-is-a--very-SPECIAL-filetype : diff --git a/install/vim/vimplugin/rainbow-master/tests/test.styl b/install/vim/vimplugin/rainbow-master/tests/test.styl new file mode 100755 index 0000000..b870224 --- /dev/null +++ b/install/vim/vimplugin/rainbow-master/tests/test.styl @@ -0,0 +1,3 @@ +div { + color: red +} diff --git a/install/vim/vimplugin/rainbow-master/tests/test.tex b/install/vim/vimplugin/rainbow-master/tests/test.tex new file mode 100755 index 0000000..a72760c --- /dev/null +++ b/install/vim/vimplugin/rainbow-master/tests/test.tex @@ -0,0 +1,11 @@ +\documentclass[]{article} + +{{{{}}}} +((((((())))))) +[[[[[[]]]]]] +\begin{document} +((((())))) +${{{{}}}}$ +{{{{}}}} +[[[[[[]]]]]] +\end{document} diff --git a/install/vim/vimplugin/rainbow-master/tests/test.xml b/install/vim/vimplugin/rainbow-master/tests/test.xml new file mode 100755 index 0000000..a851d9a --- /dev/null +++ b/install/vim/vimplugin/rainbow-master/tests/test.xml @@ -0,0 +1,6 @@ + +
+ +
+ + diff --git a/install/vim/vimplugin/vim-airline-master/CHANGELOG.md b/install/vim/vimplugin/vim-airline-master/CHANGELOG.md new file mode 100755 index 0000000..e2fc5c3 --- /dev/null +++ b/install/vim/vimplugin/vim-airline-master/CHANGELOG.md @@ -0,0 +1,251 @@ +# Change Log + +This is the Changelog for the vim-airline project. + +## [0.12] - Unreleased +- New features + - Extensions: + - [poetv](https://github.com/petobens/poet-v) support + - [vim-lsp](https://github.com/prabirshrestha/vim-lsp) support + - [zoomwintab](https://github.com/troydm/zoomwintab.vim) support + - [Vaffle](https://github.com/cocopon/vaffle.vim) support + - [vim-dirvish](https://github.com/justinmk/vim-dirvish) support + - [fzf.vim](https://github.com/junegunn/fzf.vim) support + - [OmniSharp](https://github.com/OmniSharp/omnisharp-vim) support + - [searchcount](https://vim-jp.org/vimdoc-en/eval.html#searchcount()) support + - [fern.vim](https://github.com/lambdalisue/fern.vim) support + - [Vim-CMake](https://github.com/cdelledonne/vim-cmake) support + - [battery.vim](https://github.com/lambdalisue/battery.vim) support + - [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig) support + - [gen_tags.vim](https://github.com/jsfaint/gen_tags.vim) support + - Ascii Scrollbar support +- Improvements + - git branch can also be displayed using [gina.vim](https://github.com/lambdalisue/gina.vim) + - coc extensions can also show additional status messages as well as the current function + - [coc-git](https://github.com/neoclide/coc-git) extension integrated into hunks extension + - rewrote parts using Vim9 Script for performance improvements +- Other + - Changed CI from travis-ci.org to GitHub Actions + - Introduce Vim script static analysis using [reviewdog](https://github.com/reviewdog/action-vint) + - Added multiple Vim versions to unit tests using Travis CI + - Added option to show short paths in the status line + +## [0.11] - 2019-11-10 +- New features + - Extensions: + - [Coc](https://github.com/neoclide/coc.nvim) support + - [Defx](https://github.com/Shougo/defx.nvim) support + - [gina](https://github.com/lambdalisue/gina.vim) support + - [vim-bookmark](https://github.com/MattesGroeger/vim-bookmarks) support + - [vista.vim](https://github.com/liuchengxu/vista.vim) support + - [tabws](https://github.com/s1341/vim-tabws) support for the tabline +- Improvements + - The statusline can be configured to be shown on top (in the tabline) + Set the `g:airline_statusline_ontop` to enable this experimental feature. + - If `buffer_idx_mode=2`, up to 89 mappings will be exposed to access more + buffers directly (issue [#1823](https://github.com/vim-airline/vim-airline/issues/1823)) + - Allow to use `random` as special theme name, which will switch to a random + airline theme (at least if a random number can be generated :() + - The branch extensions now also displays whether the repository is in a clean state + (will append a ! or ⚡if the repository is considered dirty). + - The whitespace extensions will also check for conflict markers + - `:AirlineRefresh` command now takes an additional `!` attribute, that **skips** + recreating the highlighting groups (which might have a serious performance + impact if done very often, as might be the case when the configuration variable + `airline_skip_empty_sections` is active). + - airline can now also detect multiple cursor mode (issue [#1933](https://github.com/vim-airline/vim-airline/issues/1933)) + - expose hunks output using the function `airline#extensions#hunks#get_raw_hunks()` to the outside [#1877](https://github.com/vim-airline/vim-airline/pull/1877) + - expose wordcount affected filetype list to the public using the `airline#extensions#wordcount#filetypes` variable [#1887](https://github.com/vim-airline/vim-airline/pull/1887) + - for the `:AirlineExtension` command, indicate whether the extension has been loaded from an external source [#1890](https://github.com/vim-airline/vim-airline/issues/1890) + - correctly load custom wordcount formatters [#1896](https://github.com/vim-airline/vim-airline/issues/1896) + - add a new short_path formatter for the tabline [#1898](https://github.com/vim-airline/vim-airline/pull/1898) + - several improvements to the branch, denite and tabline extension, as well as the async code for Vim and Neovim + - the term extension supports [neoterm](https://github.com/kassio/neoterm) vim plugin + +## [0.10] - 2018-12-15 +- New features + - Extensions: + - [LanguageClient](https://github.com/autozimu/LanguageClient-neovim) + - [vim-gutentags](https://github.com/ludovicchabant/vim-gutentags) + - [vim-localsearch](https://github.com/mox-mox/vim-localsearch) + - [xtabline](https://github.com/mg979/vim-xtabline) + - [vim-grepper](https://github.com/mhinz/vim-grepper) + - Add custom AirlineModeChanged autocommand, allowing to call user defined commands + whenever airline displays a different mode + - New :AirlineExtensions command, to show which extensions have been loaded + - Detect several new modes (e.g. completion, virtual replace, etc) +- Improvements + - Various performance improvements, should Vim keep responsive, even when + many highlighting groups need to be re-created + - Rework tabline extension + - Refactor [vim-ctrlspace](https://github.com/szw/vim-ctrlspace) extension + - Refactor the wordcount extension + - Reworked the po extension + - Allow to disable line numbers for the [Ale Extension](https://github.com/w0rp/ale) + - [fugitive](https://github.com/tpope/vim-fugitive) plugin has been refactored + causing adjustments for vim-airline, also uses Fugitives new API calls + - some improvements to Vims terminal mode + - Allow to use alternative seperators for inactive windows ([#1236](https://github.com/vim-airline/vim-airline/issues/1236)) + - Statusline can be set to inactive, whenever Vim loses focus (using FocusLost autocommand) + +## [0.9] - 2018-01-15 +- Changes + - Look of default Airline Symbols has been improved [#1397](https://github.com/vim-airline/vim-airline/issues/1397) + - Airline does now set `laststatus=2` if needed + - Syntastic extension now displays warnings and errors separately + - Updates on Resize and SessionLoad events + - Add `maxlinenr` symbol to `airline_section_z` + - Add quickfix title to inactive windows +- Improvements + - Many performance improvements (using caching and async feature when possible) + - Cache changes to highlighting groups if `g:airline_highlighting_cache = 1` is set + - Allow to skip empty sections by setting `g:airline_skip_empty_sections` variable + - Make use of improved Vim Script API, if available (e.g. getwininfo()) + - Support for Vims terminal feature (very experimental since it hasn't been stabilized yet) + - More configuration for the tabline extension (with clickable buffers for Neovim) + - Works better on smaller window sizes + - Make airline aware of git worktrees + - Improvements to the fugitive extension [#1603](https://github.com/vim-airline/vim-airline/issues/1603) + - Allows for configurable fileformat output if `g:airline#parts#ffenc#skip_expected_string` is set + - Improvements to the documentation +- New features + - Full async support for Vim 8 and Neovim + - Extensions: + - [vim-bufmru](https://github.com/mildred/vim-bufmru) + - [xkb-switch](https://github.com/ierton/xkb-switch) + - [input-source-switcher](https://github.com/vovkasm/input-source-switcher) + - [vimagit](https://github.com/jreybert/vimagit) + - [denite](https://github.com/Shougo/denite.nvim) + - [dein](https://github.com/Shougo/dein.vim) + - [vimtex](https://github.com/lervag/vimtex) + - [minpac](https://github.com/k-takata/minpac/) + - [vim-cursormode](https://github.com/vheon/vim-cursormode) + - [Neomake](https://github.com/neomake/neomake) + - [Ale](https://github.com/w0rp/ale) + - [vim-obsession](https://github.com/tpope/vim-obsession) + - spell (can also display Spell language) + - keymap + - Formatters: + - Formatters for JavaScript [#1617](https://github.com/vim-airline/vim-airline/issues/1617) + - Tabline: Allow for custom formatter for `tab_nr_type` [#1418](https://github.com/vim-airline/vim-airline/issues/1418) + - Customizable wordcount formatter [#1584](https://github.com/vim-airline/vim-airline/issues/1584) + - Add User autocommand for Theme changing [#1226](https://github.com/vim-airline/vim-airline/issues/1226) + - Shows mercurial mq status if hg mq extension is enabled + +## [0.8] - 2016-03-09 +- Changes + - Airline converted to an organization and moved to new [repository](https://github.com/vim-airline/vim-airline) + - Themes have been split into an separate repository [vim-airline-themes](https://github.com/vim-airline/vim-airline-themes) +- Improvements + - Extensions + - branch: support Git and Mercurial simultaneously, untracked files + - whitespace: new mixed-indent rule + - Windows support + - Many bug fixes + - Support for Neovim +- New features + - Many new themes + - Extensions/integration + - [taboo](https://github.com/gcmt/taboo.vim) + - [vim-ctrlspace](https://github.com/szw/vim-ctrlspace) + - [quickfixsigns](https://github.com/tomtom/quickfixsigns_vim) + - [YouCompleteMe](https://github.com/ycm-core/YouCompleteMe) + - [po.vim](http://www.vim.org/scripts/script.php?script_id=695) + - [unicode.vim](https://github.com/chrisbra/unicode.vim) + - wordcount + - crypt indicator + - byte order mark indicator + - Tabline's tab mode can display splits simultaneously + +## [0.7] - 2014-12-10 +- New features + - accents support; allowing multiple colors/styles in the same section + - extensions: eclim + - themes: understated, monochrome, murmur, sol, lucius +- Improvements + - solarized theme; support for 8 color terminals + - tabline resizes dynamically based on number of open buffers + - miscellaneous bug fixes + +## [0.6] - 2013-10-08 + +- New features + - accents support; allowing multiple colors/styles in the same section + - extensions: eclim + - themes: understated, monochrome, murmur, sol, lucius +- Improvements + - solarized theme; support for 8 color terminals + - tabline resizes dynamically based on number of open buffers + - miscellaneous bug fixes + +## [0.5] - 2013-09-13 + +- New features + - smart tabline extension which displays all buffers when only one tab is visible + - automatic section truncation when the window resizes + - support for a declarative style of configuration, allowing parts to contain metadata such as minimum window width or conditional visibility + - themes: zenburn, serene +- Other + - a sizable chunk of vim-airline is now running through a unit testing suite, automated via Travis CI + +## [0.4] - 2013-08-26 + + - New features + - integration with csv.vim and vim-virtualenv + - hunks extension for vim-gitgutter and vim-signify + - automatic theme switching with matching colorschemes + - commands: AirlineToggle + - themes: base16 (all variants) + - Improvements + - integration with undotree, tagbar, and unite + - Other + - refactored core and exposed statusline builder and pipeline + - all extension related g:airline_variables have been deprecated in favor of g:airline#extensions# variables + - extensions found in the runtimepath outside of the default distribution will be automatically loaded + +## [0.3] - 2013-08-12 + +- New features + - first-class integration with tagbar + - white space detection for trailing spaces and mixed indentation + - introduced warning section for syntastic and white space detection + - improved ctrlp integration: colors are automatically selected based on the current airline theme + - new themes: molokai, bubblegum, jellybeans, tomorrow +- Bug fixes + - improved handling of eventignore used by other plugins +- Other + - code cleaned up for clearer separation between core functionality and extensions + - introduced color extraction from highlight groups, allowing themes to be generated off of the active colorscheme (e.g. jellybeans and tomorrow) + - License changed to MIT + +## [0.2] - 2013-07-28 + +- New features + - iminsert detection + - integration with vimshell, vimfiler, commandt, lawrencium + - enhanced bufferline theming + - support for ctrlp theming + - support for custom window excludes +- New themes + - luna and wombat +- Bug fixes + - refresh branch name after switching with a shell command + +## [0.1] - 2013-07-17 + +- Initial release + - integration with other plugins: netrw, unite, nerdtree, undotree, gundo, tagbar, minibufexplr, ctrlp + - support for themes: 8 included + +[0.12]: https://github.com/vim-airline/vim-airline/compare/v0.11...HEAD +[0.11]: https://github.com/vim-airline/vim-airline/compare/v0.10...v0.11 +[0.10]: https://github.com/vim-airline/vim-airline/compare/v0.9...v0.10 +[0.9]: https://github.com/vim-airline/vim-airline/compare/v0.8...v0.9 +[0.8]: https://github.com/vim-airline/vim-airline/compare/v0.7...v0.8 +[0.7]: https://github.com/vim-airline/vim-airline/compare/v0.6...v0.7 +[0.6]: https://github.com/vim-airline/vim-airline/compare/v0.5...v0.6 +[0.5]: https://github.com/vim-airline/vim-airline/compare/v0.4...v0.5 +[0.4]: https://github.com/vim-airline/vim-airline/compare/v0.3...v0.4 +[0.3]: https://github.com/vim-airline/vim-airline/compare/v0.2...v0.3 +[0.2]: https://github.com/vim-airline/vim-airline/compare/v0.1...v0.2 +[0.1]: https://github.com/vim-airline/vim-airline/releases/tag/v0.1 diff --git a/install/vim/vimplugin/vim-airline-master/CONTRIBUTING.md b/install/vim/vimplugin/vim-airline-master/CONTRIBUTING.md new file mode 100755 index 0000000..b5df7e2 --- /dev/null +++ b/install/vim/vimplugin/vim-airline-master/CONTRIBUTING.md @@ -0,0 +1,45 @@ +# Contributions + +Contributions and pull requests are welcome. Please take note of the following guidelines: + +* Adhere to the existing style as much as possible; notably, 2 space indents and long-form keywords. +* Keep the history clean! Squash your branches before you submit a pull request. `pull --rebase` is your friend. +* Any changes to the core should be tested against Vim 7.4. + +# Testing + +Contributors should install [thinca/vim-themis](https://github.com/thinca/vim-themis) to run tests before sending a PR if they applied some modification to the code. PRs which do not pass tests won't be accepted. + +## 1. Installation + +``` +$ cd /path/to/vim-airline +$ git submodule add https://github.com/thinca/vim-themis ./.themis-bin +``` + +## 2. Running tests + +``` +$ ./path/to/themis-bin/bin/themis path/to/vim-airline/test --reporter spec +``` + +# Bugs + +Tracking down bugs can take a very long time due to different configurations, versions, and operating systems. To ensure a timely response, please help me out by doing the following: + +* the `:version` of vim +* the commit of vim-airline you're using +* the OS that you're using, including terminal emulator, GUI vs non-GUI + +# Themes + +* If you submit a theme, please create a screenshot so it can be added to the [Wiki][14]. +* In the majority of cases, modifications to colors of existing themes will likely be rejected. Themes are a subjective thing, so while you may prefer that a particular color be darker, another user will prefer it to be lighter, or something entirely different. The more popular the theme, the more unlikely the change will be accepted. However, it's pretty simple to create your own theme; copy the theme to `~/.vim/autoload/airline/themes` under a new name with your modifications, and it can be used. + +# Maintenance + +If you would like to take a more active role in improving vim-airline, please consider [becoming a maintainer][43]. + + +[14]: https://github.com/vim-airline/vim-airline/wiki/Screenshots +[43]: https://github.com/vim-airline/vim-airline/wiki/Becoming-a-Maintainer diff --git a/install/vim/vimplugin/vim-airline-master/LICENSE b/install/vim/vimplugin/vim-airline-master/LICENSE new file mode 100755 index 0000000..25c5db7 --- /dev/null +++ b/install/vim/vimplugin/vim-airline-master/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (C) 2013-2021 Bailey Ling, Christian Brabandt, et al. + +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. diff --git a/install/vim/vimplugin/vim-airline-master/README.md b/install/vim/vimplugin/vim-airline-master/README.md new file mode 100755 index 0000000..6793f67 --- /dev/null +++ b/install/vim/vimplugin/vim-airline-master/README.md @@ -0,0 +1,372 @@ +# vim-airline + +[![Say Thanks!](https://img.shields.io/badge/Say%20Thanks-!-1EAEDB.svg)](https://saythanks.io/to/chrisbra) +[![reviewdog](https://github.com/vim-airline/vim-airline/workflows/reviewdog/badge.svg?branch=master&event=push)](https://github.com/vim-airline/vim-airline/actions?query=workflow%3Areviewdog+event%3Apush+branch%3Amaster) +[![CI](https://github.com/vim-airline/vim-airline/workflows/CI/badge.svg)](https://github.com/vim-airline/vim-airline/actions?query=workflow%3ACI) + +Lean & mean status/tabline for vim that's light as air. + +![img](https://github.com/vim-airline/vim-airline/wiki/screenshots/demo.gif) + +When the plugin is correctly loaded, there will be a nice statusline at the +bottom of each vim window. + +That line consists of several sections, each one displaying some piece of +information. By default (without configuration) this line will look like this: + +``` ++-----------------------------------------------------------------------------+ +|~ | +|~ | +|~ VIM - Vi IMproved | +|~ | +|~ version 8.2 | +|~ by Bram Moolenaar et al. | +|~ Vim is open source and freely distributable | +|~ | +|~ type :h :q to exit | +|~ type :help or for on-line help | +|~ type :help version8 for version info | +|~ | +|~ | ++-----------------------------------------------------------------------------+ +| A | B | C X | Y | Z | [...] | ++-----------------------------------------------------------------------------+ +``` + +The statusline is the colored line at the bottom, which contains the sections +(possibly in different colors): + +section|meaning (example) +-------|------------------ + A | displays the mode + additional flags like crypt/spell/paste (INSERT) + B | Environment status (VCS information - branch, hunk summary (master), [battery][61] level) + C | filename + read-only flag (~/.vim/vimrc RO) + X | filetype (vim) + Y | file encoding[fileformat] (utf-8[unix]) + Z | current position in the file + [...] | additional sections (warning/errors/statistics) from external plugins (e.g. YCM, syntastic, ...) + +The information in Section Z looks like this: + +`10% ☰ 10/100 ln : 20` + +This means: +``` +10% - 10 percent down the top of the file +☰ 10 - current line 10 +/100 ln - of 100 lines +: 20 - current column 20 +``` + +For a better look, those sections can be colored differently, depending on various conditions +(e.g. the mode or whether the current file is 'modified') + +# Features + +* Tiny core written with extensibility in mind ([open/closed principle][8]). +* Integrates with a variety of plugins, including: [vim-bufferline][6], + [fugitive][4], [flog][62], [unite][9], [ctrlp][10], [minibufexpl][15], [gundo][16], + [undotree][17], [nerdtree][18], [tagbar][19], [vim-gitgutter][29], + [vim-signify][30], [quickfixsigns][39], [syntastic][5], [eclim][34], + [lawrencium][21], [virtualenv][31], [tmuxline][35], [taboo.vim][37], + [ctrlspace][38], [vim-bufmru][47], [vimagit][50], [denite][51], + [vim.battery][61] and more. +* Looks good with regular fonts and provides configuration points so you can use unicode or powerline symbols. +* Optimized for speed - loads in under a millisecond. +* Extensive suite of themes for popular color schemes including [solarized][23] (dark and light), [tomorrow][24] (all variants), [base16][32] (all variants), [molokai][25], [jellybeans][26] and others. + Note these are now external to this plugin. More details can be found in the [themes repository][46]. +* Supports 7.2 as the minimum Vim version. +* The master branch tries to be as stable as possible, and new features are merged in only after they have gone through a [full regression test][33]. +* Unit testing suite. + +## Straightforward customization + +If you don't like the defaults, you can replace all sections with standard `statusline` syntax. Give your statusline that you've built over the years a face lift. + +![image](https://f.cloud.github.com/assets/306502/1009429/d69306da-0b38-11e3-94bf-7c6e3eef41e9.png) + +## Themes + +Themes have moved to +another repository as of [this commit][45]. + +Install the themes as you would this plugin (Vundle example): + +```vim +Plugin 'vim-airline/vim-airline' +Plugin 'vim-airline/vim-airline-themes' +``` + +See [vim-airline-themes][46] for more. + +## Automatic truncation + +Sections and parts within sections can be configured to automatically hide when the window size shrinks. + +![image](https://f.cloud.github.com/assets/306502/1060831/05c08aac-11bc-11e3-8470-a506a3037f45.png) + +## Smarter tab line + +Automatically displays all buffers when there's only one tab open. + +![tabline](https://f.cloud.github.com/assets/306502/1072623/44c292a0-1495-11e3-9ce6-dcada3f1c536.gif) + +This is disabled by default; add the following to your vimrc to enable the extension: + + let g:airline#extensions#tabline#enabled = 1 + +Separators can be configured independently for the tabline, so here is how you can define "straight" tabs: + + let g:airline#extensions#tabline#left_sep = ' ' + let g:airline#extensions#tabline#left_alt_sep = '|' + +In addition, you can also choose which path formatter airline uses. This affects how file paths are +displayed in each individual tab as well as the current buffer indicator in the upper right. +To do so, set the `formatter` field with: + + let g:airline#extensions#tabline#formatter = 'default' + +Here is a complete list of formatters with screenshots: + +#### `default` +![image](https://user-images.githubusercontent.com/2652762/34422844-1d005efa-ebe6-11e7-8053-c784c0da7ba7.png) + +#### `jsformatter` +![image](https://user-images.githubusercontent.com/2652762/34422843-1cf6a4d2-ebe6-11e7-810a-07e6eb08de24.png) + +#### `unique_tail` +![image](https://user-images.githubusercontent.com/2652762/34422841-1ce5b4ec-ebe6-11e7-86e9-3d45c876068b.png) + +#### `unique_tail_improved` +![image](https://user-images.githubusercontent.com/2652762/34422842-1cee23f2-ebe6-11e7-962d-97e068873077.png) + +## Seamless integration + +vim-airline integrates with a variety of plugins out of the box. These extensions will be lazily loaded if and only if you have the other plugins installed (and of course you can turn them off). + +#### [ctrlp.vim][10] +![image](https://f.cloud.github.com/assets/306502/962258/7345a224-04ec-11e3-8b5a-f11724a47437.png) + +#### [unite.vim][9] +![image](https://f.cloud.github.com/assets/306502/962319/4d7d3a7e-04ed-11e3-9d59-ab29cb310ff8.png) + +#### [denite.nvim][51] +![image](https://cloud.githubusercontent.com/assets/246230/23939717/f65bce6e-099c-11e7-85c3-918dbc839392.png) + +#### [tagbar][19] +![image](https://f.cloud.github.com/assets/306502/962150/7e7bfae6-04ea-11e3-9e28-32af206aed80.png) + +#### [csv.vim][28] +![image](https://f.cloud.github.com/assets/306502/962204/cfc1210a-04eb-11e3-8a93-42e6bcd21efa.png) + +#### [syntastic][5] +![image](https://f.cloud.github.com/assets/306502/962864/9824c484-04f7-11e3-9928-da94f8c7da5a.png) + +#### hunks ([vim-gitgutter][29], [vim-signify][30], [coc-git][59] & [gitsigns.nvim][63]) +![image](https://f.cloud.github.com/assets/306502/995185/73fc7054-09b9-11e3-9d45-618406c6ed98.png) + +#### [vimagit][50] +![vim-airline-vimagit-demo](https://cloud.githubusercontent.com/assets/533068/22107273/2ea85ba0-de4d-11e6-9fa8-331103b88df4.gif) + +#### [flog][62] +![vim-flog-airline-demo](https://user-images.githubusercontent.com/5008897/120819897-4e820280-c554-11eb-963e-6c08a1bbae09.png) + +#### [virtualenv][31] +![image](https://f.cloud.github.com/assets/390964/1022566/cf81f830-0d98-11e3-904f-cf4fe3ce201e.png) + +#### [tmuxline][35] +![image](https://f.cloud.github.com/assets/1532071/1559276/4c28fbac-4fc7-11e3-90ef-7e833d980f98.gif) + +#### [promptline][36] +![airline-promptline-sc](https://f.cloud.github.com/assets/1532071/1871900/7d4b28a0-789d-11e3-90e4-16f37269981b.gif) + +#### [ctrlspace][38] +![papercolor_with_ctrlspace](https://cloud.githubusercontent.com/assets/493242/12912041/7fc3c6ec-cf16-11e5-8775-8492b9c64ebf.png) + +#### [xkb-switch][48]/[xkb-layout][49] +![image](https://cloud.githubusercontent.com/assets/5715281/22061422/347e7842-ddb8-11e6-8bdb-7abbd418653c.gif) + +#### [vimtex][53] +![image](https://cloud.githubusercontent.com/assets/1798172/25799740/e77d5c2e-33ee-11e7-8660-d34ce4c5f13f.png) + +#### [localsearch][54] +![image](https://raw.githubusercontent.com/mox-mox/vim-localsearch/master/vim-airline-localsearch-indicator.png) + +#### [LanguageClient][57] +![image](https://user-images.githubusercontent.com/9622/45275524-52f45c00-b48b-11e8-8b83-a66240b10747.gif) + +#### [Vim-CMake][60] +![image](https://user-images.githubusercontent.com/24732205/87788512-c876a380-c83d-11ea-9ee3-5f639f986a8f.png) + +#### [vim.battery][61] +![image](https://user-images.githubusercontent.com/1969470/94561399-368b0e00-0264-11eb-94a0-f6b67c73d422.png) + +## Extras + +vim-airline also supplies some supplementary stand-alone extensions. In addition to the tabline extension mentioned earlier, there is also: + +#### whitespace +![image](https://f.cloud.github.com/assets/306502/962401/2a75385e-04ef-11e3-935c-e3b9f0e954cc.png) + +### statusline on top +The statusline can alternatively be drawn on top, making room for other plugins to use the statusline: +The example shows a custom statusline setting, that imitates Vims default statusline, while allowing +to call custom functions. Use `:let g:airline_statusline_ontop=1` to enable it. + +![image](https://i.imgur.com/tW1lMRU.png) + +## Configurable and extensible + +#### Fine-tuned configuration + +Every section is composed of parts, and you can reorder and reconfigure them at will. + +![image](https://f.cloud.github.com/assets/306502/1073278/f291dd4c-14a3-11e3-8a83-268e2753f97d.png) + +Sections can contain accents, which allows for very granular control of visuals (see configuration [here](https://github.com/vim-airline/vim-airline/issues/299#issuecomment-25772886)). + +![image](https://f.cloud.github.com/assets/306502/1195815/4bfa38d0-249d-11e3-823e-773cfc2ca894.png) + +#### Extensible pipeline + +Completely transform the statusline to your liking. Build out the statusline as you see fit by extracting colors from the current colorscheme's highlight groups. + +![allyourbase](https://f.cloud.github.com/assets/306502/1022714/e150034a-0da7-11e3-94a5-ca9d58a297e8.png) + +# Rationale + +There's already [powerline][2], why yet another statusline? + +* 100% vimscript; no python needed. + +What about [vim-powerline][1]? + +* vim-powerline has been deprecated in favor of the newer, unifying powerline, which is under active development; the new version is written in python at the core and exposes various bindings such that it can style statuslines not only in vim, but also tmux, bash, zsh, and others. + +# Where did the name come from? + +I wrote the initial version on an airplane, and since it's light as air it turned out to be a good name. Thanks for flying vim! + +# Installation + +This plugin follows the standard runtime path structure, and as such it can be installed with a variety of plugin managers: + +| Plugin Manager | Install with... | +| ------------- | ------------- | +| [Pathogen][11] | `git clone https://github.com/vim-airline/vim-airline ~/.vim/bundle/vim-airline`
Remember to run `:Helptags` to generate help tags | +| [NeoBundle][12] | `NeoBundle 'vim-airline/vim-airline'` | +| [Vundle][13] | `Plugin 'vim-airline/vim-airline'` | +| [Plug][40] | `Plug 'vim-airline/vim-airline'` | +| [VAM][22] | `call vam#ActivateAddons([ 'vim-airline' ])` | +| [Dein][52] | `call dein#add('vim-airline/vim-airline')` | +| [minpac][55] | `call minpac#add('vim-airline/vim-airline')` | +| pack feature (native Vim 8 package feature)| `git clone https://github.com/vim-airline/vim-airline ~/.vim/pack/dist/start/vim-airline`
Remember to run `:helptags ~/.vim/pack/dist/start/vim-airline/doc` to generate help tags | +| manual | copy all of the files into your `~/.vim` directory | + +# Documentation + +`:help airline` + +# Integrating with powerline fonts + +For the nice looking powerline symbols to appear, you will need to install a patched font. Instructions can be found in the official powerline [documentation][20]. Prepatched fonts can be found in the [powerline-fonts][3] repository. + +Finally, you can add the convenience variable `let g:airline_powerline_fonts = 1` to your vimrc which will automatically populate the `g:airline_symbols` dictionary with the powerline symbols. + +# FAQ + +Solutions to common problems can be found in the [Wiki][27]. + +# Performance + +Whoa! Everything got slow all of a sudden... + +vim-airline strives to make it easy to use out of the box, which means that by default it will look for all compatible plugins that you have installed and enable the relevant extension. + +Many optimizations have been made such that the majority of users will not see any performance degradation, but it can still happen. For example, users who routinely open very large files may want to disable the `tagbar` extension, as it can be very expensive to scan for the name of the current function. + +The [minivimrc][7] project has some helper mappings to troubleshoot performance related issues. + +If you don't want all the bells and whistles enabled by default, you can define a value for `g:airline_extensions`. When this variable is defined, only the extensions listed will be loaded; an empty array would effectively disable all extensions (e.g. `:let g:airline_extensions = []`). + +Also, you can enable caching of the various syntax highlighting groups. This will try to prevent some of the more expensive `:hi` calls in Vim, which seem to be expensive in the Vim core at the expense of possibly not being one hundred percent correct all the time (especially if you often change highlighting groups yourself using `:hi` commands). To set this up do `:let g:airline_highlighting_cache = 1`. A `:AirlineRefresh` will however clear the cache. + +In addition you might want to check out the [dark_minimal theme][56], which does not change highlighting groups once they are defined. Also please check the [FAQ][27] for more information on how to diagnose and fix the problem. + +# Screenshots + +A full list of screenshots for various themes can be found in the [Wiki][14]. + +# Maintainers + +The project is currently being maintained by [Christian Brabandt][42] and [Bailey Ling][41]. + +If you are interested in becoming a maintainer (we always welcome more maintainers), please [go here][43]. + +# License + +[MIT License][58]. Copyright (c) 2013-2021 Bailey Ling & Contributors. + +[1]: https://github.com/Lokaltog/vim-powerline +[2]: https://github.com/powerline/powerline +[3]: https://github.com/Lokaltog/powerline-fonts +[4]: https://github.com/tpope/vim-fugitive +[5]: https://github.com/scrooloose/syntastic +[6]: https://github.com/bling/vim-bufferline +[7]: https://github.com/bling/minivimrc +[8]: http://en.wikipedia.org/wiki/Open/closed_principle +[9]: https://github.com/Shougo/unite.vim +[10]: https://github.com/ctrlpvim/ctrlp.vim +[11]: https://github.com/tpope/vim-pathogen +[12]: https://github.com/Shougo/neobundle.vim +[13]: https://github.com/VundleVim/Vundle.vim +[14]: https://github.com/vim-airline/vim-airline/wiki/Screenshots +[15]: https://github.com/techlivezheng/vim-plugin-minibufexpl +[16]: https://github.com/sjl/gundo.vim +[17]: https://github.com/mbbill/undotree +[18]: https://github.com/preservim/nerdtree +[19]: https://github.com/majutsushi/tagbar +[20]: https://powerline.readthedocs.org/en/master/installation.html#patched-fonts +[21]: https://github.com/ludovicchabant/vim-lawrencium +[22]: https://github.com/MarcWeber/vim-addon-manager +[23]: https://github.com/altercation/solarized +[24]: https://github.com/chriskempson/tomorrow-theme +[25]: https://github.com/tomasr/molokai +[26]: https://github.com/nanotech/jellybeans.vim +[27]: https://github.com/vim-airline/vim-airline/wiki/FAQ +[28]: https://github.com/chrisbra/csv.vim +[29]: https://github.com/airblade/vim-gitgutter +[30]: https://github.com/mhinz/vim-signify +[31]: https://github.com/jmcantrell/vim-virtualenv +[32]: https://github.com/chriskempson/base16-vim +[33]: https://github.com/vim-airline/vim-airline/wiki/Test-Plan +[34]: http://eclim.org +[35]: https://github.com/edkolev/tmuxline.vim +[36]: https://github.com/edkolev/promptline.vim +[37]: https://github.com/gcmt/taboo.vim +[38]: https://github.com/vim-ctrlspace/vim-ctrlspace +[39]: https://github.com/tomtom/quickfixsigns_vim +[40]: https://github.com/junegunn/vim-plug +[41]: https://github.com/bling +[42]: https://github.com/chrisbra +[43]: https://github.com/vim-airline/vim-airline/wiki/Becoming-a-Maintainer +[45]: https://github.com/vim-airline/vim-airline/commit/d7fd8ca649e441b3865551a325b10504cdf0711b +[46]: https://github.com/vim-airline/vim-airline-themes#vim-airline-themes-- +[47]: https://github.com/mildred/vim-bufmru +[48]: https://github.com/ierton/xkb-switch +[49]: https://github.com/vovkasm/input-source-switcher +[50]: https://github.com/jreybert/vimagit +[51]: https://github.com/Shougo/denite.nvim +[52]: https://github.com/Shougo/dein.vim +[53]: https://github.com/lervag/vimtex +[54]: https://github.com/mox-mox/vim-localsearch +[55]: https://github.com/k-takata/minpac/ +[56]: https://github.com/vim-airline/vim-airline-themes/blob/master/autoload/airline/themes/dark_minimal.vim +[57]: https://github.com/autozimu/LanguageClient-neovim +[58]: https://github.com/vim-airline/vim-airline/blob/master/LICENSE +[59]: https://github.com/neoclide/coc-git +[60]: https://github.com/cdelledonne/vim-cmake +[61]: http://github.com/lambdalisue/battery.vim/ +[62]: http://github.com/rbong/vim-flog/ +[63]: https://github.com/lewis6991/gitsigns.nvim diff --git a/install/vim/vimplugin/vim-airline-master/autoload/airline.vim b/install/vim/vimplugin/vim-airline-master/autoload/airline.vim new file mode 100755 index 0000000..a544d37 --- /dev/null +++ b/install/vim/vimplugin/vim-airline-master/autoload/airline.vim @@ -0,0 +1,313 @@ +" MIT License. Copyright (c) 2013-2021 Bailey Ling et al. +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +let g:airline_statusline_funcrefs = get(g:, 'airline_statusline_funcrefs', []) +let g:airline_inactive_funcrefs = get(g:, 'airline_inactive_statusline_funcrefs', []) + +let s:sections = ['a','b','c','gutter','x','y','z', 'error', 'warning'] +let s:contexts = {} +let s:core_funcrefs = [ + \ function('airline#extensions#apply'), + \ function('airline#extensions#default#apply') ] + + +function! airline#add_statusline_func(name, ...) + let warn = get(a:, 1, 1) + call airline#add_statusline_funcref(function(a:name), warn) +endfunction + +function! airline#add_inactive_statusline_func(name, ...) + let warn = get(a:, 1, 1) + call airline#add_inactive_statusline_funcref(function(a:name), warn) +endfunction + + +function! airline#add_statusline_funcref(function, ...) + if index(g:airline_statusline_funcrefs, a:function) >= 0 + let warn = get(a:, 1, 1) + if warn > 0 + call airline#util#warning(printf('The airline statusline funcref "%s" has already been added.', string(a:function))) + endif + return + endif + call add(g:airline_statusline_funcrefs, a:function) +endfunction + +function! airline#remove_statusline_func(name) + let i = index(g:airline_statusline_funcrefs, function(a:name)) + if i > -1 + call remove(g:airline_statusline_funcrefs, i) + endif +endfunction + +function! airline#add_inactive_statusline_funcref(function, ...) + if index(g:airline_inactive_funcrefs, a:function) >= 0 + let warn = get(a:, 1, 1) + if warn > 0 + call airline#util#warning(printf('The airline inactive statusline funcref "%s" has already been added.', string(a:function))) + endif + return + endif + call add(g:airline_inactive_funcrefs, a:function) +endfunction + +function! airline#load_theme() + let g:airline_theme = get(g:, 'airline_theme', 'dark') + if exists('*airline#themes#{g:airline_theme}#refresh') + call airline#themes#{g:airline_theme}#refresh() + endif + + let palette = g:airline#themes#{g:airline_theme}#palette + call airline#themes#patch(palette) + + if exists('g:airline_theme_patch_func') + let Fn = function(g:airline_theme_patch_func) + call Fn(palette) + endif + + call airline#highlighter#load_theme() + call airline#extensions#load_theme() + call airline#update_statusline() + + call airline#util#doautocmd('AirlineAfterTheme') +endfunction + +" Load an airline theme +function! airline#switch_theme(name, ...) + let silent = get(a:000, '0', 0) + " get all available themes + let themes = airline#util#themes('') + let err = 0 + try + if index(themes, a:name) == -1 + " Theme not available + if !silent + call airline#util#warning(printf('The specified theme "%s" cannot be found.', a:name)) + endif + throw "not-found" + let err = 1 + else + exe "ru autoload/airline/themes/". a:name. ".vim" + let g:airline_theme = a:name + endif + catch /^Vim/ + " catch only Vim errors, not "not-found" + call airline#util#warning(printf('There is an error in theme "%s".', a:name)) + if &vbs + call airline#util#warning(v:exception) + endif + let err = 1 + endtry + + if err + if exists('g:airline_theme') + return + else + let g:airline_theme = 'dark' + endif + endif + + unlet! w:airline_lastmode + call airline#load_theme() + + " this is required to prevent clobbering the startup info message, i don't know why... + call airline#check_mode(winnr()) +endfunction + +" Try to load the right theme for the current colorscheme +function! airline#switch_matching_theme() + if exists('g:colors_name') + let existing = g:airline_theme + let theme = tr(tolower(g:colors_name), '-', '_') + try + call airline#switch_theme(theme, 1) + return 1 + catch + for map in items(g:airline_theme_map) + if match(g:colors_name, map[0]) > -1 + try + call airline#switch_theme(map[1], 1) + catch + call airline#switch_theme(existing) + endtry + return 1 + endif + endfor + endtry + endif + return 0 +endfunction + +" Update the statusline +function! airline#update_statusline() + if airline#util#stl_disabled(winnr()) || airline#util#is_popup_window(winnr()) + return + endif + " TODO: need to ignore popup windows here as well? + let range = filter(range(1, winnr('$')), 'v:val != winnr()') + " create inactive statusline + call airline#update_statusline_inactive(range) + + unlet! w:airline_render_left w:airline_render_right + exe 'unlet! ' 'w:airline_section_'. join(s:sections, ' w:airline_section_') + + " Now create the active statusline + let w:airline_active = 1 + let context = { 'winnr': winnr(), 'active': 1, 'bufnr': winbufnr(winnr()) } + try + call s:invoke_funcrefs(context, g:airline_statusline_funcrefs) + catch /^Vim\%((\a\+)\)\=:E48:/ + " Catch: Sandbox mode + " no-op + endtry +endfunction + +" Function to be called to make all statuslines inactive +" Triggered on FocusLost autocommand +function! airline#update_statusline_focuslost() + if get(g:, 'airline_focuslost_inactive', 0) + let bufnr=bufnr('%') + call airline#highlighter#highlight_modified_inactive(bufnr) + call airline#highlighter#highlight(['inactive'], bufnr) + call airline#update_statusline_inactive(range(1, winnr('$'))) + endif +endfunction + +" Function to draw inactive statuslines for inactive windows +function! airline#update_statusline_inactive(range) + if airline#util#stl_disabled(winnr()) + return + endif + for nr in a:range + if airline#util#stl_disabled(nr) + continue + endif + call setwinvar(nr, 'airline_active', 0) + let context = { 'winnr': nr, 'active': 0, 'bufnr': winbufnr(nr) } + if get(g:, 'airline_inactive_alt_sep', 0) + call extend(context, { + \ 'left_sep': g:airline_left_alt_sep, + \ 'right_sep': g:airline_right_alt_sep }, 'keep') + endif + try + call s:invoke_funcrefs(context, g:airline_inactive_funcrefs) + catch /^Vim\%((\a\+)\)\=:E48:/ + " Catch: Sandbox mode + " no-op + endtry + endfor +endfunction + +" Gather output from all funcrefs which will later be returned by the +" airline#statusline() function +function! s:invoke_funcrefs(context, funcrefs) + let builder = airline#builder#new(a:context) + let err = airline#util#exec_funcrefs(a:funcrefs + s:core_funcrefs, builder, a:context) + if err == 1 + let a:context.line = builder.build() + let s:contexts[a:context.winnr] = a:context + let option = get(g:, 'airline_statusline_ontop', 0) ? '&tabline' : '&statusline' + call setwinvar(a:context.winnr, option, '%!airline#statusline('.a:context.winnr.')') + endif +endfunction + +" Main statusline function per window +" will be set to the statusline option +function! airline#statusline(winnr) + if has_key(s:contexts, a:winnr) + return '%{airline#check_mode('.a:winnr.')}'.s:contexts[a:winnr].line + endif + " in rare circumstances this happens...see #276 + return '' +endfunction + +" Check if mode has changed +function! airline#check_mode(winnr) + if !has_key(s:contexts, a:winnr) + return '' + endif + let context = s:contexts[a:winnr] + + if get(w:, 'airline_active', 1) + let m = mode(1) + " Refer :help mode() to see the list of modes + " NB: 'let mode' here refers to the display colour _groups_, + " not the literal mode's code (i.e., m). E.g., Select modes + " v, S and ^V use 'visual' since they are of similar ilk. + " Some modes do not get recognised for status line purposes: + " no, nov, noV, no^V, !, cv, and ce. + " Mode name displayed is handled in init.vim (g:airline_mode_map). + " + if m[0] ==# "i" + let mode = ['insert'] " Insert modes + submodes (i, ic, ix) + elseif m[0] == "R" + let mode = ['replace'] " Replace modes + submodes (R, Rc, Rv, Rx) (NB: case sensitive as 'r' is a mode) + elseif m[0] =~ '\v(v|V||s|S|)' + let mode = ['visual'] " Visual and Select modes (v, V, ^V, s, S, ^S)) + elseif m ==# "t" + let mode = ['terminal'] " Terminal mode (only has one mode (t)) + elseif m[0] =~ '\v(c|r|!)' + let mode = ['commandline'] " c, cv, ce, r, rm, r? (NB: cv and ce stay showing as mode entered from) + else + let mode = ['normal'] " Normal mode + submodes (n, niI, niR, niV; plus operator pendings no, nov, noV, no^V) + endif + if exists("*VMInfos") && !empty(VMInfos()) + " Vim plugin Multiple Cursors https://github.com/mg979/vim-visual-multi + let m = 'multi' + endif + " Adjust to handle additional modes, which don't display correctly otherwise + if index(['niI', 'niR', 'niV', 'ic', 'ix', 'Rc', 'Rv', 'Rx', 'multi'], m) == -1 + let m = m[0] + endif + let w:airline_current_mode = get(g:airline_mode_map, m, m) + else + let mode = ['inactive'] + let w:airline_current_mode = get(g:airline_mode_map, '__') + endif + + if g:airline_detect_modified && &modified + call add(mode, 'modified') + endif + + if g:airline_detect_paste && &paste + call add(mode, 'paste') + endif + + if g:airline_detect_crypt && exists("+key") && !empty(&key) + call add(mode, 'crypt') + endif + + if g:airline_detect_spell && &spell + call add(mode, 'spell') + endif + + if &readonly || ! &modifiable + call add(mode, 'readonly') + endif + + let mode_string = join(mode) + if get(w:, 'airline_lastmode', '') != mode_string + call airline#highlighter#highlight_modified_inactive(context.bufnr) + call airline#highlighter#highlight(mode, string(context.bufnr)) + call airline#util#doautocmd('AirlineModeChanged') + let w:airline_lastmode = mode_string + endif + + return '' +endfunction + +function! airline#update_tabline() + if get(g:, 'airline_statusline_ontop', 0) + call airline#extensions#tabline#redraw() + endif +endfunction + +function! airline#mode_changed() + " airline#visual_active + " Boolean: for when to get visual wordcount + " needed for the wordcount extension + let g:airline#visual_active = (mode() =~? '[vs]') + call airline#update_tabline() +endfunction diff --git a/install/vim/vimplugin/vim-airline-master/autoload/airline/async.vim b/install/vim/vimplugin/vim-airline-master/autoload/airline/async.vim new file mode 100755 index 0000000..459a725 --- /dev/null +++ b/install/vim/vimplugin/vim-airline-master/autoload/airline/async.vim @@ -0,0 +1,382 @@ +" MIT License. Copyright (c) 2013-2021 Christian Brabandt et al. +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +let s:untracked_jobs = {} +let s:mq_jobs = {} +let s:po_jobs = {} +let s:clean_jobs = {} + +" Generic functions handling on exit event of the various async functions +function! s:untracked_output(dict, buf) + if a:buf =~? ('^'. a:dict.cfg['untracked_mark']) + let a:dict.cfg.untracked[a:dict.file] = get(g:, 'airline#extensions#branch#notexists', g:airline_symbols.notexists) + else + let a:dict.cfg.untracked[a:dict.file] = '' + endif +endfunction + +" also called from branch extension (for non-async vims) +function! airline#async#mq_output(buf, file) + let buf=a:buf + if !empty(a:buf) + if a:buf =~# 'no patches applied' || + \ a:buf =~# "unknown command 'qtop'" || + \ a:buf =~# "abort" + let buf = '' + elseif exists("b:mq") && b:mq isnot# buf + " make sure, statusline is updated + unlet! b:airline_head + endif + let b:mq = buf + endif + if has_key(s:mq_jobs, a:file) + call remove(s:mq_jobs, a:file) + endif +endfunction + +function! s:po_output(buf, file) + if !empty(a:buf) + let b:airline_po_stats = printf("%s", a:buf) + else + let b:airline_po_stats = '' + endif + if has_key(s:po_jobs, a:file) + call remove(s:po_jobs, a:file) + endif +endfunction + +function! s:valid_dir(dir) + if empty(a:dir) || !isdirectory(a:dir) + return getcwd() + endif + return a:dir +endfunction + +function! airline#async#vcs_untracked(config, file, vcs) + if g:airline#init#vim_async + " Vim 8 with async support + noa call airline#async#vim_vcs_untracked(a:config, a:file) + else + " nvim async or vim without job-feature + noa call airline#async#nvim_vcs_untracked(a:config, a:file, a:vcs) + endif +endfunction + +function! s:set_clean_variables(file, vcs, val) + let var=getbufvar(fnameescape(a:file), 'buffer_vcs_config', {}) + if has_key(var, a:vcs) && has_key(var[a:vcs], 'dirty') && + \ type(getbufvar(fnameescape(a:file), 'buffer_vcs_config')) == type({}) + let var[a:vcs].dirty=a:val + try + call setbufvar(fnameescape(a:file), 'buffer_vcs_config', var) + unlet! b:airline_head + catch + endtry + endif +endfunction + +function! s:set_clean_jobs_variable(vcs, file, id) + if !has_key(s:clean_jobs, a:vcs) + let s:clean_jobs[a:vcs] = {} + endif + let s:clean_jobs[a:vcs][a:file]=a:id +endfunction + +function! s:on_exit_clean(...) dict abort + let buf=self.buf + call s:set_clean_variables(self.file, self.vcs, !empty(buf)) + if has_key(get(s:clean_jobs, self.vcs, {}), self.file) + call remove(s:clean_jobs[self.vcs], self.file) + endif +endfunction + +function! airline#async#vcs_clean(cmd, file, vcs) + if g:airline#init#vim_async + " Vim 8 with async support + noa call airline#async#vim_vcs_clean(a:cmd, a:file, a:vcs) + elseif has("nvim") + " nvim async + noa call airline#async#nvim_vcs_clean(a:cmd, a:file, a:vcs) + else + " Vim pre 8 using system() + call airline#async#vim7_vcs_clean(a:cmd, a:file, a:vcs) + endif +endfunction + +if v:version >= 800 && has("job") + " Vim 8.0 with Job feature + " TODO: Check if we need the cwd option for the job_start() functions + " (only works starting with Vim 8.0.0902) + + function! s:on_stdout(channel, msg) dict abort + let self.buf .= a:msg + endfunction + + function! s:on_exit_mq(channel) dict abort + call airline#async#mq_output(self.buf, self.file) + endfunction + + function! s:on_exit_untracked(channel) dict abort + call s:untracked_output(self, self.buf) + if has_key(s:untracked_jobs, self.file) + call remove(s:untracked_jobs, self.file) + endif + endfunction + + function! s:on_exit_po(channel) dict abort + call s:po_output(self.buf, self.file) + call airline#extensions#po#shorten() + endfunction + + function! airline#async#get_mq_async(cmd, file) + if g:airline#init#is_windows && &shell =~ 'cmd\|powershell' + let cmd = a:cmd + else + let cmd = [&shell, &shellcmdflag, a:cmd] + endif + + let options = {'cmd': a:cmd, 'buf': '', 'file': a:file} + if has_key(s:mq_jobs, a:file) + if job_status(get(s:mq_jobs, a:file)) == 'run' + return + elseif has_key(s:mq_jobs, a:file) + call remove(s:mq_jobs, a:file) + endif + endif + let id = job_start(cmd, { + \ 'err_io': 'out', + \ 'out_cb': function('s:on_stdout', options), + \ 'close_cb': function('s:on_exit_mq', options)}) + let s:mq_jobs[a:file] = id + endfunction + + function! airline#async#get_msgfmt_stat(cmd, file) + if !executable('msgfmt') + " no msgfmt + return + endif + if g:airline#init#is_windows + let cmd = 'cmd /C ' . a:cmd. shellescape(a:file) + else + let cmd = ['sh', '-c', a:cmd. shellescape(a:file)] + endif + + let options = {'buf': '', 'file': a:file} + if has_key(s:po_jobs, a:file) + if job_status(get(s:po_jobs, a:file)) == 'run' + return + elseif has_key(s:po_jobs, a:file) + call remove(s:po_jobs, a:file) + endif + endif + let id = job_start(cmd, { + \ 'err_io': 'out', + \ 'out_cb': function('s:on_stdout', options), + \ 'close_cb': function('s:on_exit_po', options)}) + let s:po_jobs[a:file] = id + endfunction + + function! airline#async#vim_vcs_clean(cmd, file, vcs) + if g:airline#init#is_windows && &shell =~ 'cmd\|powershell' + let cmd = a:cmd + else + let cmd = [&shell, &shellcmdflag, a:cmd] + endif + + let options = {'buf': '', 'vcs': a:vcs, 'file': a:file} + let jobs = get(s:clean_jobs, a:vcs, {}) + if has_key(jobs, a:file) + if job_status(get(jobs, a:file)) == 'run' + return + elseif has_key(jobs, a:file) + " still running + return + " jobs dict should be cleaned on exit, so not needed here + " call remove(jobs, a:file) + endif + endif + let id = job_start(cmd, { + \ 'err_io': 'null', + \ 'out_cb': function('s:on_stdout', options), + \ 'close_cb': function('s:on_exit_clean', options)}) + call s:set_clean_jobs_variable(a:vcs, a:file, id) + endfunction + + function! airline#async#vim_vcs_untracked(config, file) + if g:airline#init#is_windows && &shell =~ 'cmd\|powershell' + let cmd = a:config['cmd'] . shellescape(a:file) + else + let cmd = [&shell, &shellcmdflag, a:config['cmd'] . shellescape(a:file)] + endif + + let options = {'cfg': a:config, 'buf': '', 'file': a:file} + if has_key(s:untracked_jobs, a:file) + if job_status(get(s:untracked_jobs, a:file)) == 'run' + return + elseif has_key(s:untracked_jobs, a:file) + call remove(s:untracked_jobs, a:file) + endif + endif + let id = job_start(cmd, { + \ 'err_io': 'out', + \ 'out_cb': function('s:on_stdout', options), + \ 'close_cb': function('s:on_exit_untracked', options)}) + let s:untracked_jobs[a:file] = id + endfunction + +elseif has("nvim") + " NVim specific functions + + function! s:nvim_output_handler(job_id, data, event) dict + if a:event == 'stdout' || a:event == 'stderr' + let self.buf .= join(a:data) + endif + endfunction + + function! s:nvim_untracked_job_handler(job_id, data, event) dict + if a:event == 'exit' + call s:untracked_output(self, self.buf) + if has_key(s:untracked_jobs, self.file) + call remove(s:untracked_jobs, self.file) + endif + endif + endfunction + + function! s:nvim_mq_job_handler(job_id, data, event) dict + if a:event == 'exit' + call airline#async#mq_output(self.buf, self.file) + endif + endfunction + + function! s:nvim_po_job_handler(job_id, data, event) dict + if a:event == 'exit' + call s:po_output(self.buf, self.file) + call airline#extensions#po#shorten() + endif + endfunction + + function! airline#async#nvim_get_mq_async(cmd, file) + let config = { + \ 'buf': '', + \ 'file': a:file, + \ 'cwd': s:valid_dir(fnamemodify(a:file, ':p:h')), + \ 'on_stdout': function('s:nvim_output_handler'), + \ 'on_stderr': function('s:nvim_output_handler'), + \ 'on_exit': function('s:nvim_mq_job_handler') + \ } + if g:airline#init#is_windows && &shell =~ 'cmd\|powershell' + let cmd = a:cmd + else + let cmd = [&shell, &shellcmdflag, a:cmd] + endif + + if has_key(s:mq_jobs, a:file) + call remove(s:mq_jobs, a:file) + endif + let id = jobstart(cmd, config) + let s:mq_jobs[a:file] = id + endfunction + + function! airline#async#nvim_get_msgfmt_stat(cmd, file) + let config = { + \ 'buf': '', + \ 'file': a:file, + \ 'cwd': s:valid_dir(fnamemodify(a:file, ':p:h')), + \ 'on_stdout': function('s:nvim_output_handler'), + \ 'on_stderr': function('s:nvim_output_handler'), + \ 'on_exit': function('s:nvim_po_job_handler') + \ } + if g:airline#init#is_windows && &shell =~ 'cmd\|powershell' + " no msgfmt on windows? + return + else + let cmd = [&shell, &shellcmdflag, a:cmd. shellescape(a:file)] + endif + + if has_key(s:po_jobs, a:file) + call remove(s:po_jobs, a:file) + endif + let id = jobstart(cmd, config) + let s:po_jobs[a:file] = id + endfunction + + function! airline#async#nvim_vcs_clean(cmd, file, vcs) + let config = { + \ 'buf': '', + \ 'vcs': a:vcs, + \ 'file': a:file, + \ 'cwd': s:valid_dir(fnamemodify(a:file, ':p:h')), + \ 'on_stdout': function('s:nvim_output_handler'), + \ 'on_stderr': function('s:nvim_output_handler'), + \ 'on_exit': function('s:on_exit_clean')} + if g:airline#init#is_windows && &shell =~ 'cmd\|powershell' + let cmd = a:cmd + else + let cmd = [&shell, &shellcmdflag, a:cmd] + endif + + if !has_key(s:clean_jobs, a:vcs) + let s:clean_jobs[a:vcs] = {} + endif + if has_key(s:clean_jobs[a:vcs], a:file) + " still running + return + " jobs dict should be cleaned on exit, so not needed here + " call remove(s:clean_jobs[a:vcs], a:file) + endif + let id = jobstart(cmd, config) + call s:set_clean_jobs_variable(a:vcs, a:file, id) + endfunction + +endif + +" Should work in either Vim pre 8 or Nvim +function! airline#async#nvim_vcs_untracked(cfg, file, vcs) + let cmd = a:cfg.cmd . shellescape(a:file) + let id = -1 + let config = { + \ 'buf': '', + \ 'vcs': a:vcs, + \ 'cfg': a:cfg, + \ 'file': a:file, + \ 'cwd': s:valid_dir(fnamemodify(a:file, ':p:h')) + \ } + if has("nvim") + call extend(config, { + \ 'on_stdout': function('s:nvim_output_handler'), + \ 'on_exit': function('s:nvim_untracked_job_handler')}) + if has_key(s:untracked_jobs, config.file) + " still running + return + endif + try + let id = jobstart(cmd, config) + catch + " catch-all, jobstart() failed, fall back to system() + let id=-1 + endtry + let s:untracked_jobs[a:file] = id + endif + " vim without job feature or nvim jobstart failed + if id < 1 + let output=system(cmd) + call s:untracked_output(config, output) + call airline#extensions#branch#update_untracked_config(a:file, a:vcs) + endif +endfunction + +function! airline#async#vim7_vcs_clean(cmd, file, vcs) + " Vim pre 8, fallback using system() + " don't want to to see error messages + if g:airline#init#is_windows && &shell =~ 'cmd' + let cmd = a:cmd .' 2>nul' + elseif g:airline#init#is_windows && &shell =~ 'powerline' + let cmd = a:cmd .' 2> $null' + else + let cmd = a:cmd .' 2>/dev/null' + endif + let output=system(cmd) + call s:set_clean_variables(a:file, a:vcs, !empty(output)) +endfunction diff --git a/install/vim/vimplugin/vim-airline-master/autoload/airline/builder.vim b/install/vim/vimplugin/vim-airline-master/autoload/airline/builder.vim new file mode 100755 index 0000000..ad2d838 --- /dev/null +++ b/install/vim/vimplugin/vim-airline-master/autoload/airline/builder.vim @@ -0,0 +1,246 @@ +" MIT License. Copyright (c) 2013-2021 Bailey Ling et al. +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +let s:prototype = {} + +function! s:prototype.split(...) dict + call add(self._sections, ['|', a:0 ? a:1 : '%=']) +endfunction + +function! s:prototype.add_section_spaced(group, contents) dict + let spc = empty(a:contents) ? '' : g:airline_symbols.space + call self.add_section(a:group, spc.a:contents.spc) +endfunction + +function! s:prototype.add_section(group, contents) dict + call add(self._sections, [a:group, a:contents]) +endfunction + +function! s:prototype.add_raw(text) dict + call add(self._sections, ['', a:text]) +endfunction + +function! s:prototype.insert_section(group, contents, position) dict + call insert(self._sections, [a:group, a:contents], a:position) +endfunction + +function! s:prototype.insert_raw(text, position) dict + call insert(self._sections, ['', a:text], a:position) +endfunction + +function! s:prototype.get_position() dict + return len(self._sections) +endfunction + +function! airline#builder#get_prev_group(sections, i) + let x = a:i - 1 + while x >= 0 + let group = a:sections[x][0] + if group != '' && group != '|' + return group + endif + let x = x - 1 + endwhile + return '' +endfunction + +function! airline#builder#get_next_group(sections, i) + let x = a:i + 1 + let l = len(a:sections) + while x < l + let group = a:sections[x][0] + if group != '' && group != '|' + return group + endif + let x = x + 1 + endwhile + return '' +endfunction + +function! s:prototype.build() dict + let side = 1 + let line = '' + let i = 0 + let length = len(self._sections) + let split = 0 + let is_empty = 0 + let prev_group = '' + + while i < length + let section = self._sections[i] + let group = section[0] + let contents = section[1] + let pgroup = prev_group + let prev_group = airline#builder#get_prev_group(self._sections, i) + if group ==# 'airline_c' && &buftype ==# 'terminal' && self._context.active + let group = 'airline_term' + elseif group ==# 'airline_c' && !self._context.active && has_key(self._context, 'bufnr') + let group = 'airline_c'. self._context.bufnr + elseif prev_group ==# 'airline_c' && !self._context.active && has_key(self._context, 'bufnr') + let prev_group = 'airline_c'. self._context.bufnr + endif + if is_empty + let prev_group = pgroup + endif + let is_empty = s:section_is_empty(self, contents) + + if is_empty + " need to fix highlighting groups, since we + " have skipped a section, we actually need + " the previous previous group and so the + " separator goes from the previous previous group + " to the current group + let pgroup = group + endif + + if group == '' + let line .= contents + elseif group == '|' + let side = 0 + let line .= contents + let split = 1 + else + if prev_group == '' + let line .= '%#'.group.'#' + elseif split + if !is_empty + let line .= s:get_transitioned_separator(self, prev_group, group, side) + endif + let split = 0 + else + if !is_empty + let line .= s:get_separator(self, prev_group, group, side) + endif + endif + let line .= is_empty ? '' : s:get_accented_line(self, group, contents) + endif + + let i = i + 1 + endwhile + + if !self._context.active + "let line = substitute(line, '%#airline_c#', '%#airline_c'.self._context.bufnr.'#', '') + let line = substitute(line, '%#.\{-}\ze#', '\0_inactive', 'g') + endif + return line +endfunction + +function! airline#builder#should_change_group(group1, group2) + if a:group1 == a:group2 + return 0 + endif + let color1 = airline#highlighter#get_highlight(a:group1) + let color2 = airline#highlighter#get_highlight(a:group2) + return color1[1] != color2[1] || color1[0] != color2[0] + \ || color1[2] != color2[2] || color1[3] != color2[3] +endfunction + +function! s:get_transitioned_separator(self, prev_group, group, side) + let line = '' + if get(a:self._context, 'tabline', 0) && get(g:, 'airline#extensions#tabline#alt_sep', 0) && a:group ==# 'airline_tabsel' && a:side + call airline#highlighter#add_separator(a:prev_group, a:group, 0) + let line .= '%#'.a:prev_group.'_to_'.a:group.'#' + let line .= a:self._context.right_sep.'%#'.a:group.'#' + else + call airline#highlighter#add_separator(a:prev_group, a:group, a:side) + let line .= '%#'.a:prev_group.'_to_'.a:group.'#' + let line .= a:side ? a:self._context.left_sep : a:self._context.right_sep + let line .= '%#'.a:group.'#' + endif + return line +endfunction + +function! s:get_separator(self, prev_group, group, side) + if airline#builder#should_change_group(a:prev_group, a:group) + return s:get_transitioned_separator(a:self, a:prev_group, a:group, a:side) + else + return a:side ? a:self._context.left_alt_sep : a:self._context.right_alt_sep + endif +endfunction + +function! s:get_accented_line(self, group, contents) + if a:self._context.active + " active window + let contents = [] + let content_parts = split(a:contents, '__accent') + for cpart in content_parts + let accent = matchstr(cpart, '_\zs[^#]*\ze') + call add(contents, cpart) + endfor + let line = join(contents, a:group) + let line = substitute(line, '__restore__', a:group, 'g') + else + " inactive window + let line = substitute(a:contents, '%#__accent[^#]*#', '', 'g') + let line = substitute(line, '%#__restore__#', '', 'g') + endif + return line +endfunction + +function! s:section_is_empty(self, content) + let start=1 + + " do not check for inactive windows or the tabline + if a:self._context.active == 0 + return 0 + elseif get(a:self._context, 'tabline', 0) + return 0 + endif + + " only check, if airline#skip_empty_sections == 1 + if get(g:, 'airline_skip_empty_sections', 0) == 0 + return 0 + endif + + " only check, if airline#skip_empty_sections == 1 + if get(w:, 'airline_skip_empty_sections', -1) == 0 + return 0 + endif + + " special case: When the content is %=, that is the + " separation marker, which switches between left- and + " right-aligned content. + " Consider that to be empty, so that the previous previous + " group is correctly remembered in the builder() function + if empty(a:content) || a:content is# '%=' + return 1 + endif + + let stripped = substitute(a:content, + \ '\(%{.*}\|%#__accent_[^#]*#\|%#__restore__#\|%( \| %)\)', '', 'g') + + if !empty(stripped) + return 0 " There is content in the statusline + endif + + let exprlist = [] + call substitute(a:content, '%{\([^}]*\)}', '\=add(exprlist, submatch(1))', 'g') + + for expr in exprlist + try + " catch all exceptions, just in case + if !empty(eval(expr)) + return 0 + endif + catch + return 0 + endtry + endfor + return 1 +endfunction + +function! airline#builder#new(context) + let builder = copy(s:prototype) + let builder._context = a:context + let builder._sections = [] + + call extend(builder._context, { + \ 'left_sep': g:airline_left_sep, + \ 'left_alt_sep': g:airline_left_alt_sep, + \ 'right_sep': g:airline_right_sep, + \ 'right_alt_sep': g:airline_right_alt_sep, + \ }, 'keep') + return builder +endfunction diff --git a/install/vim/vimplugin/vim-airline-master/autoload/airline/debug.vim b/install/vim/vimplugin/vim-airline-master/autoload/airline/debug.vim new file mode 100755 index 0000000..f04b296 --- /dev/null +++ b/install/vim/vimplugin/vim-airline-master/autoload/airline/debug.vim @@ -0,0 +1,51 @@ +" MIT License. Copyright (c) 2013-2021 Bailey Ling et al. +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +function! airline#debug#profile1() + profile start airline-profile-switch.log + profile func * + profile file * + split + for i in range(1, 1000) + wincmd w + redrawstatus + endfor + profile pause + noautocmd qall! +endfunction + +function! airline#debug#profile2() + profile start airline-profile-cursor.log + profile func * + profile file * + edit blank + call setline(1, 'all your base are belong to us') + call setline(2, 'all your base are belong to us') + let positions = [[1,2], [2,2], [1,2], [1,1]] + for i in range(1, 1000) + for pos in positions + call cursor(pos[0], pos[1]) + redrawstatus + endfor + endfor + profile pause + noautocmd qall! +endfunction + +function! airline#debug#profile3() + profile start airline-profile-mode.log + profile func * + profile file * + + for i in range(1000) + startinsert + redrawstatus + stopinsert + redrawstatus + endfor + + profile pause + noautocmd qall! +endfunction diff --git a/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions.vim b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions.vim new file mode 100755 index 0000000..99eba2f --- /dev/null +++ b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions.vim @@ -0,0 +1,523 @@ +" MIT License. Copyright (c) 2013-2021 Bailey Ling et al. +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +let s:loaded_ext = [] +let s:ext = {} +let s:ext._theme_funcrefs = [] + +function! s:ext.add_statusline_func(name) dict + call airline#add_statusline_func(a:name) +endfunction +function! s:ext.add_statusline_funcref(function) dict + call airline#add_statusline_funcref(a:function) +endfunction +function! s:ext.add_inactive_statusline_func(name) dict + call airline#add_inactive_statusline_func(a:name) +endfunction +function! s:ext.add_theme_func(name) dict + call add(self._theme_funcrefs, function(a:name)) +endfunction + +let s:script_path = tolower(resolve(expand(':p:h'))) + +let s:filetype_overrides = { + \ 'coc-explorer': [ 'CoC Explorer', '' ], + \ 'defx': ['defx', '%{b:defx.paths[0]}'], + \ 'fugitive': ['fugitive', '%{airline#util#wrap(airline#extensions#branch#get_head(),80)}'], + \ 'floggraph': [ 'Flog', '%{get(b:, "flog_status_summary", "")}' ], + \ 'gundo': [ 'Gundo', '' ], + \ 'help': [ 'Help', '%f' ], + \ 'minibufexpl': [ 'MiniBufExplorer', '' ], + \ 'startify': [ 'startify', '' ], + \ 'vim-plug': [ 'Plugins', '' ], + \ 'vimfiler': [ 'vimfiler', '%{vimfiler#get_status_string()}' ], + \ 'vimshell': ['vimshell','%{vimshell#get_status_string()}'], + \ 'vaffle' : [ 'Vaffle', '%{b:vaffle.dir}' ], + \ } + +if get(g:, 'airline#extensions#nerdtree_statusline', 1) + let s:filetype_overrides['nerdtree'] = [ get(g:, 'NERDTreeStatusline', 'NERD'), '' ] +else + let s:filetype_overrides['nerdtree'] = ['NERDTree', ''] +endif + +let s:filetype_regex_overrides = {} + +function! s:check_defined_section(name) + if !exists('w:airline_section_{a:name}') + let w:airline_section_{a:name} = g:airline_section_{a:name} + endif +endfunction + +function! airline#extensions#append_to_section(name, value) + call check_defined_section(a:name) + let w:airline_section_{a:name} .= a:value +endfunction + +function! airline#extensions#prepend_to_section(name, value) + call check_defined_section(a:name) + let w:airline_section_{a:name} = a:value . w:airline_section_{a:name} +endfunction + +function! airline#extensions#apply_left_override(section1, section2) + let w:airline_section_a = a:section1 + let w:airline_section_b = a:section2 + let w:airline_section_c = airline#section#create(['readonly']) + let w:airline_render_left = 1 + let w:airline_render_right = 0 +endfunction + +function! airline#extensions#apply(...) + let filetype_overrides = get(s:, 'filetype_overrides', {}) + call extend(filetype_overrides, get(g:, 'airline_filetype_overrides', {}), 'force') + + if s:is_excluded_window() + return -1 + endif + + if &buftype == 'terminal' + let w:airline_section_x = '' + let w:airline_section_y = '' + endif + + if &previewwindow && empty(get(w:, 'airline_section_a', '')) + let w:airline_section_a = 'Preview' + let w:airline_section_b = '' + let w:airline_section_c = bufname(winbufnr(winnr())) + endif + + if has_key(filetype_overrides, &ft) && + \ ((&filetype == 'help' && &buftype == 'help') || &filetype !~ 'help') + " for help files only override it, if the buftype is also of type 'help', + " else it would trigger when editing Vim help files + let args = filetype_overrides[&ft] + call airline#extensions#apply_left_override(args[0], args[1]) + endif + + if &buftype == 'help' + let w:airline_section_x = '' + let w:airline_section_y = '' + let w:airline_render_right = 1 + endif + + for item in items(s:filetype_regex_overrides) + if match(&ft, item[0]) >= 0 + call airline#extensions#apply_left_override(item[1][0], item[1][1]) + endif + endfor +endfunction + +function! s:is_excluded_window() + for matchft in g:airline_exclude_filetypes + if matchft ==# &ft + return 1 + endif + endfor + + for matchw in g:airline_exclude_filenames + if matchstr(expand('%'), matchw) ==# matchw + return 1 + endif + endfor + + if g:airline_exclude_preview && &previewwindow + return 1 + endif + + return 0 +endfunction + +function! airline#extensions#load_theme() + call airline#util#exec_funcrefs(s:ext._theme_funcrefs, g:airline#themes#{g:airline_theme}#palette) +endfunction + +function! airline#extensions#load() + let s:loaded_ext = [] + + if exists('g:airline_extensions') + for ext in g:airline_extensions + try + call airline#extensions#{ext}#init(s:ext) + catch /^Vim\%((\a\+)\)\=:E117/ " E117, function does not exist + call airline#util#warning("Extension '".ext."' not installed, ignoring!") + continue + endtry + call add(s:loaded_ext, ext) + endfor + return + endif + + call airline#extensions#quickfix#init(s:ext) + call add(s:loaded_ext, 'quickfix') + + if get(g:, 'loaded_unite', 0) && get(g:, 'airline#extensions#unite#enabled', 1) + call airline#extensions#unite#init(s:ext) + call add(s:loaded_ext, 'unite') + endif + + if get(g:, 'loaded_denite', 0) && get(g:, 'airline#extensions#denite#enabled', 1) + call airline#extensions#denite#init(s:ext) + call add(s:loaded_ext, 'denite') + endif + + if get(g:, 'loaded_gina', 0) && get(g:, 'airline#extensions#gina#enabled', 1) + call airline#extensions#gina#init(s:ext) + call add(s:loaded_ext, 'gina') + endif + + if get(g:, 'loaded_fern', 0) && get(g:, 'airline#extensions#fern#enabled', 1) + call airline#extensions#fern#init(s:ext) + call add(s:loaded_ext, 'fern') + endif + + if exists(':NetrwSettings') + call airline#extensions#netrw#init(s:ext) + call add(s:loaded_ext, 'netrw') + endif + + " fzf buffers are also terminal buffers, so this must be above term. + if exists(':FZF') && get(g:, 'airline#extensions#fzf#enabled', 1) + call airline#extensions#fzf#init(s:ext) + call add(s:loaded_ext, 'fzf') + endif + + " Vim-CMake buffers are also terminal buffers, so this must be above term. + if get(g:, 'loaded_cmake', 0) && get(g:, 'airline#extensions#vimcmake#enabled', 1) + call airline#extensions#vimcmake#init(s:ext) + call add(s:loaded_ext, 'vimcmake') + endif + + if (has("terminal") || has('nvim')) && + \ get(g:, 'airline#extensions#term#enabled', 1) + call airline#extensions#term#init(s:ext) + call add(s:loaded_ext, 'term') + endif + + if get(g:, 'airline#extensions#ycm#enabled', 0) && exists('g:loaded_youcompleteme') + call airline#extensions#ycm#init(s:ext) + call add(s:loaded_ext, 'ycm') + endif + + if get(g:, 'loaded_vimfiler', 0) + let g:vimfiler_force_overwrite_statusline = 0 + endif + + if get(g:, 'loaded_ctrlp', 0) + call airline#extensions#ctrlp#init(s:ext) + call add(s:loaded_ext, 'ctrlp') + endif + + if get(g:, 'loaded_localsearch', 0) + call airline#extensions#localsearch#init(s:ext) + call add(s:loaded_ext, 'localsearch') + endif + + if get(g:, 'CtrlSpaceLoaded', 0) + call airline#extensions#ctrlspace#init(s:ext) + call add(s:loaded_ext, 'ctrlspace') + endif + + if get(g:, 'command_t_loaded', 0) + call airline#extensions#commandt#init(s:ext) + call add(s:loaded_ext, 'commandt') + endif + + if exists(':UndotreeToggle') + call airline#extensions#undotree#init(s:ext) + call add(s:loaded_ext, 'undotree') + endif + + if get(g:, 'airline#extensions#hunks#enabled', 1) + \ && (exists('g:loaded_signify') + \ || exists('g:loaded_gitgutter') + \ || exists('g:loaded_changes') + \ || exists('g:loaded_quickfixsigns') + \ || exists(':Gitsigns') + \ || exists(':CocCommand')) + call airline#extensions#hunks#init(s:ext) + call add(s:loaded_ext, 'hunks') + endif + + if get(g:, 'airline#extensions#vimagit#enabled', 1) + \ && (exists('g:loaded_magit')) + call airline#extensions#vimagit#init(s:ext) + call add(s:loaded_ext, 'vimagit') + endif + + if get(g:, 'airline#extensions#tagbar#enabled', 1) + \ && exists(':TagbarToggle') + call airline#extensions#tagbar#init(s:ext) + call add(s:loaded_ext, 'tagbar') + endif + if get(g:, 'airline#extensions#taglist#enabled', 1) && exists(':TlistShowTag') + call airline#extensions#taglist#init(s:ext) + call add(s:loaded_ext, 'taglist') + endif + + if get(g:, 'airline#extensions#vista#enabled', 1) + \ && exists(':Vista') + call airline#extensions#vista#init(s:ext) + call add(s:loaded_ext, 'vista') + endif + + if get(g:, 'airline#extensions#bookmark#enabled', 1) + \ && exists(':BookmarkToggle') + call airline#extensions#bookmark#init(s:ext) + call add(s:loaded_ext, 'bookmark') + endif + + if get(g:, 'airline#extensions#scrollbar#enabled', 0) + call airline#extensions#scrollbar#init(s:ext) + call add(s:loaded_ext, 'scrollbar') + endif + + if get(g:, 'airline#extensions#csv#enabled', 1) + \ && (get(g:, 'loaded_csv', 0) || exists(':Table')) + call airline#extensions#csv#init(s:ext) + call add(s:loaded_ext, 'csv') + endif + + if get(g:, 'airline#extensions#zoomwintab#enabled', 0) + call airline#extensions#zoomwintab#init(s:ext) + call add(s:loaded_ext, 'zoomwintab') + endif + + if exists(':VimShell') + let s:filetype_regex_overrides['^int-'] = ['vimshell','%{substitute(&ft, "int-", "", "")}'] + endif + + if get(g:, 'airline#extensions#branch#enabled', 1) && ( + \ airline#util#has_fugitive() || + \ airline#util#has_gina() || + \ airline#util#has_lawrencium() || + \ airline#util#has_vcscommand() || + \ airline#util#has_custom_scm()) + call airline#extensions#branch#init(s:ext) + call add(s:loaded_ext, 'branch') + endif + + if get(g:, 'airline#extensions#bufferline#enabled', 1) + \ && exists('*bufferline#get_status_string') + call airline#extensions#bufferline#init(s:ext) + call add(s:loaded_ext, 'bufferline') + endif + + if get(g:, 'airline#extensions#fugitiveline#enabled', 1) + \ && airline#util#has_fugitive() + \ && index(s:loaded_ext, 'bufferline') == -1 + call airline#extensions#fugitiveline#init(s:ext) + call add(s:loaded_ext, 'fugitiveline') + endif + + " NOTE: This means that if both virtualenv and poetv are enabled and + " available, poetv silently takes precedence and the virtualenv + " extension won't be initialized. Since both extensions currently just + " add a virtualenv identifier section to the airline, this seems + " acceptable. + if (get(g:, 'airline#extensions#poetv#enabled', 0) && (exists(':PoetvActivate'))) + call airline#extensions#poetv#init(s:ext) + call add(s:loaded_ext, 'poetv') + elseif (get(g:, 'airline#extensions#virtualenv#enabled', 0) && (exists(':VirtualEnvList'))) + call airline#extensions#virtualenv#init(s:ext) + call add(s:loaded_ext, 'virtualenv') + elseif (get(g:, 'airline#extensions#poetv#enabled', 0) && (isdirectory($VIRTUAL_ENV))) + call airline#extensions#poetv#init(s:ext) + call add(s:loaded_ext, 'poetv') + endif + + if (get(g:, 'airline#extensions#eclim#enabled', 1) && exists(':ProjectCreate')) + call airline#extensions#eclim#init(s:ext) + call add(s:loaded_ext, 'eclim') + endif + + if get(g:, 'airline#extensions#syntastic#enabled', 1) + \ && exists(':SyntasticCheck') + call airline#extensions#syntastic#init(s:ext) + call add(s:loaded_ext, 'syntastic') + endif + + if (get(g:, 'airline#extensions#ale#enabled', 1) && exists(':ALELint')) + call airline#extensions#ale#init(s:ext) + call add(s:loaded_ext, 'ale') + endif + + if (get(g:, 'airline#extensions#lsp#enabled', 1) && exists(':LspDeclaration')) + call airline#extensions#lsp#init(s:ext) + call add(s:loaded_ext, 'lsp') + endif + + if (get(g:, 'airline#extensions#nvimlsp#enabled', 1) + \ && has('nvim') + \ && luaeval('vim.lsp ~= nil')) + call airline#extensions#nvimlsp#init(s:ext) + call add(s:loaded_ext, 'nvimlsp') + endif + + if (get(g:, 'airline#extensions#coc#enabled', 1) && exists(':CocCommand')) + call airline#extensions#coc#init(s:ext) + call add(s:loaded_ext, 'coc') + endif + + if (get(g:, 'airline#extensions#languageclient#enabled', 1) && exists(':LanguageClientStart')) + call airline#extensions#languageclient#init(s:ext) + call add(s:loaded_ext, 'languageclient') + endif + + if get(g:, 'airline#extensions#whitespace#enabled', 1) + call airline#extensions#whitespace#init(s:ext) + call add(s:loaded_ext, 'whitespace') + endif + + if (get(g:, 'airline#extensions#neomake#enabled', 1) && exists(':Neomake')) + call airline#extensions#neomake#init(s:ext) + call add(s:loaded_ext, 'neomake') + endif + + if get(g:, 'airline#extensions#po#enabled', 1) && executable('msgfmt') + call airline#extensions#po#init(s:ext) + call add(s:loaded_ext, 'po') + endif + + if get(g:, 'airline#extensions#wordcount#enabled', 1) + call airline#extensions#wordcount#init(s:ext) + call add(s:loaded_ext, 'wordcount') + endif + + if get(g:, 'airline#extensions#tabline#enabled', 0) + call airline#extensions#tabline#init(s:ext) + call add(s:loaded_ext, 'tabline') + endif + + if get(g:, 'airline#extensions#tmuxline#enabled', 1) && exists(':Tmuxline') + call airline#extensions#tmuxline#init(s:ext) + call add(s:loaded_ext, 'tmuxline') + endif + + if get(g:, 'airline#extensions#promptline#enabled', 1) && exists(':PromptlineSnapshot') && len(get(g:, 'airline#extensions#promptline#snapshot_file', '')) + call airline#extensions#promptline#init(s:ext) + call add(s:loaded_ext, 'promptline') + endif + + if get(g:, 'airline#extensions#nrrwrgn#enabled', 1) && get(g:, 'loaded_nrrw_rgn', 0) + call airline#extensions#nrrwrgn#init(s:ext) + call add(s:loaded_ext, 'nrrwrgn') + endif + + if get(g:, 'airline#extensions#unicode#enabled', 1) && exists(':UnicodeTable') == 2 + call airline#extensions#unicode#init(s:ext) + call add(s:loaded_ext, 'unicode') + endif + + if (get(g:, 'airline#extensions#capslock#enabled', 1) && exists('*CapsLockStatusline')) + call airline#extensions#capslock#init(s:ext) + call add(s:loaded_ext, 'capslock') + endif + + if (get(g:, 'airline#extensions#gutentags#enabled', 1) && get(g:, 'loaded_gutentags', 0)) + call airline#extensions#gutentags#init(s:ext) + call add(s:loaded_ext, 'gutentags') + endif + + if get(g:, 'airline#extensions#gen_tags#enabled', 1) && (get(g:, 'loaded_gentags#gtags', 0) || get(g:, 'loaded_gentags#ctags', 0)) + call airline#extensions#gen_tags#init(s:ext) + call add(s:loaded_ext, 'gen_tags') + endif + + if (get(g:, 'airline#extensions#grepper#enabled', 1) && get(g:, 'loaded_grepper', 0)) + call airline#extensions#grepper#init(s:ext) + call add(s:loaded_ext, 'grepper') + endif + + if get(g:, 'airline#extensions#xkblayout#enabled', 1) && (exists('g:XkbSwitchLib') || exists('*FcitxCurrentIM')) + call airline#extensions#xkblayout#init(s:ext) + call add(s:loaded_ext, 'xkblayout') + endif + + if (get(g:, 'airline#extensions#keymap#enabled', 1) && has('keymap')) + call airline#extensions#keymap#init(s:ext) + call add(s:loaded_ext, 'keymap') + endif + + if (get(g:, 'airline#extensions#windowswap#enabled', 1) && get(g:, 'loaded_windowswap', 0)) + call airline#extensions#windowswap#init(s:ext) + call add(s:loaded_ext, 'windowswap') + endif + + if (get(g:, 'airline#extensions#obsession#enabled', 1) && exists('*ObsessionStatus')) + call airline#extensions#obsession#init(s:ext) + call add(s:loaded_ext, 'obsession') + endif + + if get(g:, 'airline#extensions#vimtex#enabled', 1) + runtime autoload/vimtex.vim + if exists('*vimtex#init') + call airline#extensions#vimtex#init(s:ext) + call add(s:loaded_ext, 'vimtex') + endif + endif + + if (get(g:, 'airline#extensions#cursormode#enabled', 0)) + call airline#extensions#cursormode#init(s:ext) + call add(s:loaded_ext, 'cursormode') + endif + + if get(g:, 'airline#extensions#searchcount#enabled', 1) && exists('*searchcount') + call airline#extensions#searchcount#init(s:ext) + call add(s:loaded_ext, 'searchcount') + endif + + if get(g:, 'loaded_battery', 0) && get(g:, 'airline#extensions#battery#enabled', 0) + call airline#extensions#battery#init(s:ext) + call add(s:loaded_ext, 'battery') + endif + + if (get(g:, 'airline#extensions#vim9lsp#enabled', 1) && exists('*lsp#lsp#ErrorCount')) + call airline#extensions#vim9lsp#init(s:ext) + call add(s:loaded_ext, 'vim9lsp') + endif + + if !get(g:, 'airline#extensions#disable_rtp_load', 0) + " load all other extensions, which are not part of the default distribution. + " (autoload/airline/extensions/*.vim outside of our s:script_path). + for file in split(globpath(&rtp, 'autoload/airline/extensions/*.vim', 1), "\n") + " we have to check both resolved and unresolved paths, since it's possible + " that they might not get resolved properly (see #187) + if stridx(tolower(resolve(fnamemodify(file, ':p'))), s:script_path) < 0 + \ && stridx(tolower(fnamemodify(file, ':p')), s:script_path) < 0 + let name = fnamemodify(file, ':t:r') + if !get(g:, 'airline#extensions#'.name.'#enabled', 1) || + \ index(s:loaded_ext, name.'*') > -1 + continue + endif + try + call airline#extensions#{name}#init(s:ext) + " mark as external + call add(s:loaded_ext, name.'*') + catch + endtry + endif + endfor + endif + + if exists(':Dirvish') && get(g:, 'airline#extensions#dirvish#enabled', 1) + call airline#extensions#dirvish#init(s:ext) + call add(s:loaded_ext, 'dirvish') + endif + + if (get(g:, 'airline#extensions#omnisharp#enabled', 1) && get(g:, 'OmniSharp_loaded', 0)) + call airline#extensions#omnisharp#init(s:ext) + call add(s:loaded_ext, 'omnisharp') + endif + + if (get(g:, 'airline#extensions#rufo#enabled', 0) && get(g:, 'rufo_loaded', 0)) + call airline#extensions#rufo#init(s:ext) + call add(s:loaded_ext, 'rufo') + endif + +endfunction + +function! airline#extensions#get_loaded_extensions() + return s:loaded_ext +endfunction diff --git a/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/ale.vim b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/ale.vim new file mode 100755 index 0000000..0948ae6 --- /dev/null +++ b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/ale.vim @@ -0,0 +1,138 @@ +" MIT License. Copyright (c) 2013-2021 Bjorn Neergaard, w0rp et al. +" Plugin: https://github.com/dense-analysis/ale +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +if !get(g:, 'loaded_ale_dont_use_this_in_other_plugins_please', 0) + finish +endif + +function! s:airline_ale_count(cnt, symbol) + return a:cnt ? a:symbol. a:cnt : '' +endfunction + +function! s:legacy_airline_ale_get_line_number(cnt, type) abort + " Before ALE introduced the FirstProblem API function, this is how + " airline would get the line numbers: + " 1. Get the whole loclist; 2. Filter it for the desired problem type. + " 3. Return the line number of the first element in the filtered list. + if a:cnt == 0 + return '' + endif + + let buffer = bufnr('') + let problem_type = (a:type ==# 'error') ? 'E' : 'W' + let problems = copy(ale#engine#GetLoclist(buffer)) + + call filter(problems, 'v:val.bufnr is buffer && v:val.type is# problem_type') + + if empty(problems) + return '' + endif + + let open_lnum_symbol = get(g:, 'airline#extensions#ale#open_lnum_symbol', '(L') + let close_lnum_symbol = get(g:, 'airline#extensions#ale#close_lnum_symbol', ')') + + return open_lnum_symbol . problems[0].lnum . close_lnum_symbol +endfunction + +function! s:new_airline_ale_get_line_number(cnt, type) abort + " The FirstProblem call in ALE is a far more efficient way + " of obtaining line number data. If the installed ALE supports + " it, we should use this method of getting line data. + if a:cnt == 0 + return '' + endif + let l:buffer = bufnr('') + + " Try to get the first error from ALE. + let l:result = ale#statusline#FirstProblem(l:buffer, a:type) + if empty(l:result) + " If there are no errors then try and check for style errors. + let l:result = ale#statusline#FirstProblem(l:buffer, 'style_' . a:type) + endif + + if empty(l:result) + return '' + endif + + let l:open_lnum_symbol = + \ get(g:, 'airline#extensions#ale#open_lnum_symbol', '(L') + let l:close_lnum_symbol = + \ get(g:, 'airline#extensions#ale#close_lnum_symbol', ')') + + return open_lnum_symbol . l:result.lnum . close_lnum_symbol +endfunction + +function! s:airline_ale_get_line_number(cnt, type) abort + " Use the new ALE statusline API function if it is available. + if exists("*ale#statusline#FirstProblem") + return s:new_airline_ale_get_line_number(a:cnt, a:type) + endif + + return s:legacy_airline_ale_get_line_number(a:cnt, a:type) +endfunction + +function! airline#extensions#ale#get(type) + if !exists(':ALELint') + return '' + endif + + let error_symbol = get(g:, 'airline#extensions#ale#error_symbol', 'E:') + let warning_symbol = get(g:, 'airline#extensions#ale#warning_symbol', 'W:') + let checking_symbol = get(g:, 'airline#extensions#ale#checking_symbol', '...') + let show_line_numbers = get(g:, 'airline#extensions#ale#show_line_numbers', 1) + + let is_err = a:type ==# 'error' + + if ale#engine#IsCheckingBuffer(bufnr('')) == 1 + return is_err ? '' : checking_symbol + endif + + let symbol = is_err ? error_symbol : warning_symbol + + let counts = ale#statusline#Count(bufnr('')) + if type(counts) == type({}) && has_key(counts, 'error') + " Use the current Dictionary format. + let errors = counts.error + counts.style_error + let num = is_err ? errors : counts.total - errors + else + " Use the old List format. + let num = is_err ? counts[0] : counts[1] + endif + + if show_line_numbers == 1 + return s:airline_ale_count(num, symbol) . airline_ale_get_line_number(num, a:type) + else + return s:airline_ale_count(num, symbol) + endif +endfunction + +function! airline#extensions#ale#get_warning() + return airline#extensions#ale#get('warning') +endfunction + +function! airline#extensions#ale#get_error() + return airline#extensions#ale#get('error') +endfunction + +function! airline#extensions#ale#init(ext) + call airline#parts#define_function('ale_error_count', 'airline#extensions#ale#get_error') + call airline#parts#define_function('ale_warning_count', 'airline#extensions#ale#get_warning') + augroup airline_ale + autocmd! + autocmd CursorHold,BufWritePost * call ale_refresh() + autocmd User ALEJobStarted,ALELintPost call ale_refresh() + augroup END +endfunction + +function! s:ale_refresh() + if !exists('#airline') + " airline disabled + return + endif + if get(g:, 'airline_skip_empty_sections', 0) + exe ':AirlineRefresh!' + endif +endfunction diff --git a/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/battery.vim b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/battery.vim new file mode 100755 index 0000000..baeb764 --- /dev/null +++ b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/battery.vim @@ -0,0 +1,23 @@ +" MIT License. Copyright (c) 2014-2021 Mathias Andersson et al. +" Plugin: https://github.com/lambdalisue/battery.vim +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +if !exists('g:loaded_battery') + finish +endif + +function! airline#extensions#battery#status(...) abort + if !exists('g:battery#update_statusline') + let g:battery#update_statusline = 1 + call battery#update() + endif + + let bat = battery#component() + return bat +endfunction + +function! airline#extensions#battery#init(ext) abort + call airline#parts#define_function('battery', 'airline#extensions#battery#status') +endfunction diff --git a/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/bookmark.vim b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/bookmark.vim new file mode 100755 index 0000000..dde28f9 --- /dev/null +++ b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/bookmark.vim @@ -0,0 +1,30 @@ +" MIT License. Copyright (c) 2021 Bjoern Petri +" Plugin: https://github.com/MattesGroeger/vim-bookmarks +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +if !exists(':BookmarkToggle') + finish +endif + +function! airline#extensions#bookmark#currentbookmark() abort + if get(w:, 'airline_active', 0) + let file = expand('%:p') + if file ==# '' + return + endif + + let current_line = line('.') + let has_bm = bm#has_bookmark_at_line(file, current_line) + let bm = has_bm ? bm#get_bookmark_by_line(file, current_line) : 0 + let annotation = has_bm ? bm['annotation'] : '' + + return annotation + endif + return '' +endfunction + +function! airline#extensions#bookmark#init(ext) abort + call airline#parts#define_function('bookmark', 'airline#extensions#bookmark#currentbookmark') +endfunction diff --git a/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/branch.vim b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/branch.vim new file mode 100755 index 0000000..49c1ffd --- /dev/null +++ b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/branch.vim @@ -0,0 +1,369 @@ +" MIT License. Copyright (c) 2013-2021 Bailey Ling et al. +" Plugin: fugitive, gina, lawrencium and vcscommand +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +" s:vcs_config contains static configuration of VCSes and their status relative +" to the active file. +" 'branch' - The name of currently active branch. This field is empty iff it +" has not been initialized yet or the current file is not in +" an active branch. +" 'untracked' - Cache of untracked files represented as a dictionary with files +" as keys. A file has a not exists symbol set as its value if it +" is untracked. A file is present in this dictionary iff its +" status is considered up to date. +" 'untracked_mark' - used as regexp to test against the output of 'cmd' +let s:vcs_config = { +\ 'git': { +\ 'exe': 'git', +\ 'cmd': 'git status --porcelain -- ', +\ 'dirty': 'git status -uno --porcelain --ignore-submodules', +\ 'untracked_mark': '??', +\ 'exclude': '\.git', +\ 'update_branch': 's:update_git_branch', +\ 'display_branch': 's:display_git_branch', +\ 'branch': '', +\ 'untracked': {}, +\ }, +\ 'mercurial': { +\ 'exe': 'hg', +\ 'cmd': 'hg status -u -- ', +\ 'dirty': 'hg status -mard', +\ 'untracked_mark': '?', +\ 'exclude': '\.hg', +\ 'update_branch': 's:update_hg_branch', +\ 'display_branch': 's:display_hg_branch', +\ 'branch': '', +\ 'untracked': {}, +\ }, +\} + +" Initializes b:buffer_vcs_config. b:buffer_vcs_config caches the branch and +" untracked status of the file in the buffer. Caching those fields is necessary, +" because s:vcs_config may be updated asynchronously and s:vcs_config fields may +" be invalid during those updates. b:buffer_vcs_config fields are updated +" whenever corresponding fields in s:vcs_config are updated or an inconsistency +" is detected during update_* operation. +" +" b:airline_head caches the head string it is empty iff it needs to be +" recalculated. b:airline_head is recalculated based on b:buffer_vcs_config. +function! s:init_buffer() + let b:buffer_vcs_config = {} + for vcs in keys(s:vcs_config) + let b:buffer_vcs_config[vcs] = { + \ 'branch': '', + \ 'untracked': '', + \ 'dirty': 0, + \ } + endfor + unlet! b:airline_head +endfunction + +let s:head_format = get(g:, 'airline#extensions#branch#format', 0) +if s:head_format == 1 + function! s:format_name(name) + return fnamemodify(a:name, ':t') + endfunction +elseif s:head_format == 2 + function! s:format_name(name) + return pathshorten(a:name) + endfunction +elseif type(s:head_format) == type('') + function! s:format_name(name) + return call(s:head_format, [a:name]) + endfunction +else + function! s:format_name(name) + return a:name + endfunction +endif + + +" Fugitive special revisions. call '0' "staging" ? +let s:names = {'0': 'index', '1': 'orig', '2':'fetch', '3':'merge'} +let s:sha1size = get(g:, 'airline#extensions#branch#sha1_len', 7) + +function! s:update_git_branch() + call airline#util#ignore_next_focusgain() + if airline#util#has_fugitive() + call s:config_fugitive_branch() + elseif airline#util#has_gina() + call s:config_gina_branch() + else + let s:vcs_config['git'].branch = '' + return + endif +endfunction + +function! s:config_fugitive_branch() abort + let s:vcs_config['git'].branch = FugitiveHead(s:sha1size) + if s:vcs_config['git'].branch is# 'master' && + \ airline#util#winwidth() < 81 + " Shorten default a bit + let s:vcs_config['git'].branch='mas' + endif +endfunction + +function! s:config_gina_branch() abort + try + let g:gina#component#repo#commit_length = s:sha1size + let s:vcs_config['git'].branch = gina#component#repo#branch() + catch + endtry + if s:vcs_config['git'].branch is# 'master' && + \ airline#util#winwidth() < 81 + " Shorten default a bit + let s:vcs_config['git'].branch='mas' + endif +endfunction + +function! s:display_git_branch() + let name = b:buffer_vcs_config['git'].branch + try + let commit = matchstr(FugitiveParse()[0], '^\x\+') + + if has_key(s:names, commit) + let name = get(s:names, commit)."(".name.")" + elseif !empty(commit) + if exists('*FugitiveExecute') + let ref = FugitiveExecute(['describe', '--all', '--exact-match', commit], bufnr('')).stdout[0] + else + noautocmd let ref = fugitive#repo().git_chomp('describe', '--all', '--exact-match', commit) + if ref =~# ':' + let ref = '' + endif + endif + if !empty(ref) + let name = s:format_name(substitute(ref, '\v\C^%(heads/|remotes/|tags/)=','',''))."(".name.")" + else + let name = matchstr(commit, '.\{'.s:sha1size.'}')."(".name.")" + endif + endif + catch + endtry + return name +endfunction + +function! s:update_hg_branch() + if airline#util#has_lawrencium() + let cmd='LC_ALL=C hg qtop' + let stl=lawrencium#statusline() + let file=expand('%:p') + if !empty(stl) && get(b:, 'airline_do_mq_check', 1) + if g:airline#init#vim_async + noa call airline#async#get_mq_async(cmd, file) + elseif has("nvim") + noa call airline#async#nvim_get_mq_async(cmd, file) + else + " remove \n at the end of the command + let output=system(cmd)[0:-2] + noa call airline#async#mq_output(output, file) + endif + endif + " do not do mq check anymore + let b:airline_do_mq_check = 0 + if exists("b:mq") && !empty(b:mq) + if stl is# 'default' + " Shorten default a bit + let stl='def' + endif + let stl.=' ['.b:mq.']' + endif + let s:vcs_config['mercurial'].branch = stl + else + let s:vcs_config['mercurial'].branch = '' + endif +endfunction + +function! s:display_hg_branch() + return b:buffer_vcs_config['mercurial'].branch +endfunction + +function! s:update_branch() + for vcs in keys(s:vcs_config) + call {s:vcs_config[vcs].update_branch}() + if b:buffer_vcs_config[vcs].branch != s:vcs_config[vcs].branch + let b:buffer_vcs_config[vcs].branch = s:vcs_config[vcs].branch + unlet! b:airline_head + endif + endfor +endfunction + +function! airline#extensions#branch#update_untracked_config(file, vcs) + if !has_key(s:vcs_config[a:vcs].untracked, a:file) + return + elseif s:vcs_config[a:vcs].untracked[a:file] != b:buffer_vcs_config[a:vcs].untracked + let b:buffer_vcs_config[a:vcs].untracked = s:vcs_config[a:vcs].untracked[a:file] + unlet! b:airline_head + endif +endfunction + +function! s:update_untracked() + let file = expand("%:p") + if empty(file) || isdirectory(file) || !empty(&buftype) + return + endif + + let needs_update = 1 + let vcs_checks = get(g:, "airline#extensions#branch#vcs_checks", ["untracked", "dirty"]) + for vcs in keys(s:vcs_config) + if file =~ s:vcs_config[vcs].exclude + " Skip check for files that live in the exclude directory + let needs_update = 0 + endif + if has_key(s:vcs_config[vcs].untracked, file) + let needs_update = 0 + call airline#extensions#branch#update_untracked_config(file, vcs) + endif + endfor + + if !needs_update + return + endif + + for vcs in keys(s:vcs_config) + " only check, for git, if fugitive is installed + " and for 'hg' if lawrencium is installed, else skip + if vcs is# 'git' && (!airline#util#has_fugitive() && !airline#util#has_gina()) + continue + elseif vcs is# 'mercurial' && !airline#util#has_lawrencium() + continue + endif + let config = s:vcs_config[vcs] + " Note that asynchronous update updates s:vcs_config only, and only + " s:update_untracked updates b:buffer_vcs_config. If s:vcs_config is + " invalidated again before s:update_untracked is called, then we lose the + " result of the previous call, i.e. the head string is not updated. It + " doesn't happen often in practice, so we let it be. + if index(vcs_checks, 'untracked') > -1 + call airline#async#vcs_untracked(config, file, vcs) + endif + " Check clean state of repo + if index(vcs_checks, 'dirty') > -1 + call airline#async#vcs_clean(config.dirty, file, vcs) + endif + endfor +endfunction + +function! airline#extensions#branch#head() + if !exists('b:buffer_vcs_config') + call s:init_buffer() + endif + + call s:update_branch() + call s:update_untracked() + + if exists('b:airline_head') && !empty(b:airline_head) + return b:airline_head + endif + + let b:airline_head = '' + let vcs_priority = get(g:, "airline#extensions#branch#vcs_priority", ["git", "mercurial"]) + + let heads = [] + for vcs in vcs_priority + if !empty(b:buffer_vcs_config[vcs].branch) + let heads += [vcs] + endif + endfor + + for vcs in heads + if !empty(b:airline_head) + let b:airline_head .= ' | ' + endif + if len(heads) > 1 + let b:airline_head .= s:vcs_config[vcs].exe .':' + endif + let b:airline_head .= s:format_name({s:vcs_config[vcs].display_branch}()) + let additional = b:buffer_vcs_config[vcs].untracked + if empty(additional) && + \ has_key(b:buffer_vcs_config[vcs], 'dirty') && + \ b:buffer_vcs_config[vcs].dirty + let additional = g:airline_symbols['dirty'] + endif + let b:airline_head .= additional + endfor + + if empty(heads) + if airline#util#has_vcscommand() + noa call VCSCommandEnableBufferSetup() + if exists('b:VCSCommandBufferInfo') + let b:airline_head = s:format_name(get(b:VCSCommandBufferInfo, 0, '')) + endif + endif + endif + + if empty(heads) + if airline#util#has_custom_scm() + try + let Fn = function(g:airline#extensions#branch#custom_head) + let b:airline_head = Fn() + endtry + endif + endif + + if exists("g:airline#extensions#branch#displayed_head_limit") + let w:displayed_head_limit = g:airline#extensions#branch#displayed_head_limit + if strwidth(b:airline_head) > w:displayed_head_limit - 1 + let b:airline_head = + \ airline#util#strcharpart(b:airline_head, 0, w:displayed_head_limit - 1) + \ . (&encoding ==? 'utf-8' ? '…' : '.') + endif + endif + + return b:airline_head +endfunction + +function! airline#extensions#branch#get_head() + let head = airline#extensions#branch#head() + let winwidth = get(airline#parts#get('branch'), 'minwidth', 120) + let minwidth = empty(get(b:, 'airline_hunks', '')) ? 14 : 7 + let head = airline#util#shorten(head, winwidth, minwidth) + let symbol = get(g:, 'airline#extensions#branch#symbol', g:airline_symbols.branch) + return empty(head) + \ ? get(g:, 'airline#extensions#branch#empty_message', '') + \ : printf('%s%s', empty(symbol) ? '' : symbol.(g:airline_symbols.space), head) +endfunction + +function! s:reset_untracked_cache(shellcmdpost) + " shellcmdpost - whether function was called as a result of ShellCmdPost hook + if !exists('#airline') + " airline disabled + return + endif + if !g:airline#init#vim_async && !has('nvim') + if a:shellcmdpost + " Clear cache only if there was no error or the script uses an + " asynchronous interface. Otherwise, cache clearing would overwrite + " v:shell_error with a system() call inside get_*_untracked. + if v:shell_error + return + endif + endif + endif + + let file = expand("%:p") + for vcs in keys(s:vcs_config) + " Dump the value of the cache for the current file. Partially mitigates the + " issue of cache invalidation happening before a call to + " s:update_untracked() + call airline#extensions#branch#update_untracked_config(file, vcs) + let s:vcs_config[vcs].untracked = {} + endfor +endfunction + +function! s:sh_autocmd_handler() + if exists('#airline') + unlet! b:airline_head b:airline_do_mq_check + endif +endfunction + +function! airline#extensions#branch#init(ext) + call airline#parts#define_function('branch', 'airline#extensions#branch#get_head') + + autocmd ShellCmdPost,CmdwinLeave * call s:sh_autocmd_handler() + autocmd User AirlineBeforeRefresh call s:sh_autocmd_handler() + autocmd BufWritePost * call s:reset_untracked_cache(0) + autocmd ShellCmdPost * call s:reset_untracked_cache(1) +endfunction diff --git a/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/bufferline.vim b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/bufferline.vim new file mode 100755 index 0000000..3d6e2eb --- /dev/null +++ b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/bufferline.vim @@ -0,0 +1,28 @@ +" MIT License. Copyright (c) 2013-2021 Bailey Ling et al. +" Plugin: https://github.com/bling/vim-bufferline +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +if !exists('*bufferline#get_status_string') + finish +endif + +function! airline#extensions#bufferline#init(ext) + if get(g:, 'airline#extensions#bufferline#overwrite_variables', 1) + highlight bufferline_selected gui=bold cterm=bold term=bold + highlight link bufferline_selected_inactive airline_c_inactive + let g:bufferline_inactive_highlight = 'airline_c' + let g:bufferline_active_highlight = 'bufferline_selected' + let g:bufferline_active_buffer_left = '' + let g:bufferline_active_buffer_right = '' + let g:bufferline_separator = g:airline_symbols.space + endif + + if exists("+autochdir") && &autochdir == 1 + " if 'acd' is set, vim-airline uses the path section, so we need to redefine this here as well + call airline#parts#define_raw('path', '%{bufferline#refresh_status()}'.bufferline#get_status_string()) + else + call airline#parts#define_raw('file', '%{bufferline#refresh_status()}'.bufferline#get_status_string()) + endif +endfunction diff --git a/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/capslock.vim b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/capslock.vim new file mode 100755 index 0000000..4d6e453 --- /dev/null +++ b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/capslock.vim @@ -0,0 +1,17 @@ +" MIT License. Copyright (c) 2014-2021 Mathias Andersson et al. +" Plugin: https://github.com/tpope/vim-capslock +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +if !exists('*CapsLockStatusline') + finish +endif + +function! airline#extensions#capslock#status() + return tolower(CapsLockStatusline()) ==# '[caps]' ? get(g:, 'airline#extensions#capslock#symbol', 'CAPS') : '' +endfunction + +function! airline#extensions#capslock#init(ext) + call airline#parts#define_function('capslock', 'airline#extensions#capslock#status') +endfunction diff --git a/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/coc.vim b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/coc.vim new file mode 100755 index 0000000..3825964 --- /dev/null +++ b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/coc.vim @@ -0,0 +1,54 @@ +" MIT License. Copyright (c) 2019-2021 Peng Guanwen et al. +" vim: et ts=2 sts=2 sw=2 +" Plugin: https://github.com/neoclide/coc + +scriptencoding utf-8 + +let s:show_coc_status = get(g:, 'airline#extensions#coc#show_coc_status', 1) + +function! airline#extensions#coc#get_warning() abort + return airline#extensions#coc#get('warning') +endfunction + +function! airline#extensions#coc#get_error() abort + return airline#extensions#coc#get('error') +endfunction + +function! airline#extensions#coc#get(type) abort + if !exists(':CocCommand') | return '' | endif + + let is_err = (a:type is# 'error') + let info = get(b:, 'coc_diagnostic_info', {}) + if empty(info) | return '' | endif + + let cnt = get(info, a:type, 0) + if empty(cnt) | return '' | endif + + let error_symbol = get(g:, 'airline#extensions#coc#error_symbol', 'E:') + let warning_symbol = get(g:, 'airline#extensions#coc#warning_symbol', 'W:') + let error_format = get(g:, 'airline#extensions#coc#stl_format_err', '%C(L%L)') + let warning_format = get(g:, 'airline#extensions#coc#stl_format_warn', '%C(L%L)') + + " replace %C with error count and %L with line number + return (is_err ? error_symbol : warning_symbol) . + \ substitute(substitute(is_err ? error_format : warning_format, + \ '%C', cnt, 'g'), + \ '%L', (info.lnums)[is_err ? 0 : 1], 'g') +endfunction + +function! airline#extensions#coc#get_status() abort + " Shorten text for windows < 91 characters + let status = airline#util#shorten(get(g:, 'coc_status', ''), 91, 9) + return (s:show_coc_status ? status : '') +endfunction + +function! airline#extensions#coc#get_current_function() abort + return get(b:, 'coc_current_function', '') +endfunction + +function! airline#extensions#coc#init(ext) abort + call airline#parts#define_function('coc_error_count', 'airline#extensions#coc#get_error') + call airline#parts#define_function('coc_warning_count', 'airline#extensions#coc#get_warning') + call airline#parts#define_function('coc_status', 'airline#extensions#coc#get_status') + call airline#parts#define_function('coc_current_function', 'airline#extensions#coc#get_current_function') +endfunction diff --git a/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/commandt.vim b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/commandt.vim new file mode 100755 index 0000000..1183bcf --- /dev/null +++ b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/commandt.vim @@ -0,0 +1,19 @@ +" MIT License. Copyright (c) 2013-2021 Bailey Ling et al. +" Plugin: https://github.com/wincent/command-t +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +if !get(g:, 'command_t_loaded', 0) + finish +endif + +function! airline#extensions#commandt#apply(...) + if bufname('%') ==# 'GoToFile' + call airline#extensions#apply_left_override('CommandT', '') + endif +endfunction + +function! airline#extensions#commandt#init(ext) + call a:ext.add_statusline_func('airline#extensions#commandt#apply') +endfunction diff --git a/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/csv.vim b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/csv.vim new file mode 100755 index 0000000..694bc8b --- /dev/null +++ b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/csv.vim @@ -0,0 +1,33 @@ +" MIT License. Copyright (c) 2013-2021 Bailey Ling, Christian Brabandt et al. +" Plugin: https://github.com/chrisbra/csv.vim +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +if !get(g:, 'loaded_csv', 0) && !exists(':Table') + finish +endif + +let s:column_display = get(g:, 'airline#extensions#csv#column_display', 'Number') + +function! airline#extensions#csv#get_column() + if exists('*CSV_WCol') + if s:column_display ==# 'Name' + return '['.CSV_WCol('Name').CSV_WCol().']' + else + return '['.CSV_WCol().']' + endif + endif + return '' +endfunction + +function! airline#extensions#csv#apply(...) + if &ft ==# "csv" + call airline#extensions#prepend_to_section('gutter', + \ g:airline_left_alt_sep.' %{airline#extensions#csv#get_column()}') + endif +endfunction + +function! airline#extensions#csv#init(ext) + call a:ext.add_statusline_func('airline#extensions#csv#apply') +endfunction diff --git a/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/ctrlp.vim b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/ctrlp.vim new file mode 100755 index 0000000..136c348 --- /dev/null +++ b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/ctrlp.vim @@ -0,0 +1,82 @@ +" MIT License. Copyright (c) 2013-2021 Bailey Ling et al. +" Plugin: https://github.com/ctrlpvim/ctrlp.vim +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +if !get(g:, 'loaded_ctrlp', 0) + finish +endif + +let s:color_template = get(g:, 'airline#extensions#ctrlp#color_template', 'insert') + +function! airline#extensions#ctrlp#generate_color_map(dark, light, white) + return { + \ 'CtrlPdark' : a:dark, + \ 'CtrlPlight' : a:light, + \ 'CtrlPwhite' : a:white, + \ 'CtrlParrow1' : [ a:light[1] , a:white[1] , a:light[3] , a:white[3] , '' ] , + \ 'CtrlParrow2' : [ a:white[1] , a:light[1] , a:white[3] , a:light[3] , '' ] , + \ 'CtrlParrow3' : [ a:light[1] , a:dark[1] , a:light[3] , a:dark[3] , '' ] , + \ } +endfunction + +function! airline#extensions#ctrlp#load_theme(palette) + if exists('a:palette.ctrlp') + let theme = a:palette.ctrlp + else + let s:color_template = has_key(a:palette, s:color_template) ? s:color_template : 'insert' + let theme = airline#extensions#ctrlp#generate_color_map( + \ a:palette[s:color_template]['airline_c'], + \ a:palette[s:color_template]['airline_b'], + \ a:palette[s:color_template]['airline_a']) + endif + for key in keys(theme) + call airline#highlighter#exec(key, theme[key]) + endfor +endfunction + +" Arguments: focus, byfname, regexp, prv, item, nxt, marked +function! airline#extensions#ctrlp#ctrlp_airline(...) + let b = airline#builder#new({'active': 1}) + if a:2 == 'file' + call b.add_section_spaced('CtrlPlight', 'by fname') + endif + if a:3 + call b.add_section_spaced('CtrlPlight', 'regex') + endif + if get(g:, 'airline#extensions#ctrlp#show_adjacent_modes', 1) + call b.add_section_spaced('CtrlPlight', a:4) + call b.add_section_spaced('CtrlPwhite', a:5) + call b.add_section_spaced('CtrlPlight', a:6) + else + call b.add_section_spaced('CtrlPwhite', a:5) + endif + call b.add_section_spaced('CtrlPdark', a:7) + call b.split() + call b.add_section_spaced('CtrlPdark', a:1) + call b.add_section_spaced('CtrlPdark', a:2) + call b.add_section_spaced('CtrlPlight', '%{getcwd()}') + return b.build() +endfunction + +" Argument: len +function! airline#extensions#ctrlp#ctrlp_airline_status(...) + let len = '%#CtrlPdark# '.a:1 + let dir = '%=%<%#CtrlParrow3#'.g:airline_right_sep.'%#CtrlPlight# '.getcwd().' %*' + return len.dir +endfunction + +function! airline#extensions#ctrlp#apply(...) + " disable statusline overwrite if ctrlp already did it + return match(&statusline, 'CtrlPwhite') >= 0 ? -1 : 0 +endfunction + +function! airline#extensions#ctrlp#init(ext) + let g:ctrlp_status_func = { + \ 'main': 'airline#extensions#ctrlp#ctrlp_airline', + \ 'prog': 'airline#extensions#ctrlp#ctrlp_airline_status', + \ } + call a:ext.add_statusline_func('airline#extensions#ctrlp#apply') + call a:ext.add_theme_func('airline#extensions#ctrlp#load_theme') +endfunction diff --git a/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/ctrlspace.vim b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/ctrlspace.vim new file mode 100755 index 0000000..54800e1 --- /dev/null +++ b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/ctrlspace.vim @@ -0,0 +1,21 @@ +" MIT License. Copyright (c) 2013-2021 Bailey Ling et al. +" Plugin: https://github.com/szw/vim-ctrlspace +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +function! airline#extensions#ctrlspace#statusline(...) abort + let spc = g:airline_symbols.space + let l:padding = spc . spc . spc + let cs = ctrlspace#context#Configuration().Symbols.CS + + let b = airline#builder#new({ 'active': 1 }) + call b.add_section('airline_b', cs . l:padding . ctrlspace#api#StatuslineModeSegment(l:padding)) + call b.split() + call b.add_section('airline_x', spc . ctrlspace#api#StatuslineTabSegment() . spc) + return b.build() +endfunction + +function! airline#extensions#ctrlspace#init(ext) abort + let g:CtrlSpaceStatuslineFunction = "airline#extensions#ctrlspace#statusline()" +endfunction diff --git a/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/cursormode.vim b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/cursormode.vim new file mode 100755 index 0000000..7b25799 --- /dev/null +++ b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/cursormode.vim @@ -0,0 +1,126 @@ +" MIT Licsense. +" Plugin: https://github.com/vheon/vim-cursormode +" Copyright (C) 2014 Andrea Cedraro , +" Copyright (C) 2017 Eduardo Suarez-Santana + +scriptencoding utf-8 + +if exists('g:loaded_cursormode') + finish +endif + +let g:loaded_cursormode = 1 + +let s:is_win = has('win32') || has('win64') +let s:is_iTerm = exists('$TERM_PROGRAM') && $TERM_PROGRAM =~# 'iTerm.app' +let s:is_AppleTerminal = exists('$TERM_PROGRAM') && $TERM_PROGRAM =~# 'Apple_Terminal' + +let s:is_good = !has('gui_running') && !s:is_win && !s:is_AppleTerminal + +let s:last_mode = '' + +if !exists('g:cursormode_exit_mode') + let g:cursormode_exit_mode='n' +endif + +function! airline#extensions#cursormode#tmux_escape(escape) + return '\033Ptmux;'.substitute(a:escape, '\\033', '\\033\\033', 'g').'\033\\' +endfunction + +let s:iTerm_escape_template = '\033]Pl%s\033\\' +let s:xterm_escape_template = '\033]12;%s\007' + +function! s:get_mode() + return call(get(g:, 'cursormode_mode_func', 'mode'), []) +endfunction + +function! airline#extensions#cursormode#set(...) + let mode = s:get_mode() + if mode !=# s:last_mode + let s:last_mode = mode + call s:set_cursor_color_for(mode) + endif + return '' +endfunction + +function! s:set_cursor_color_for(mode) + let mode = a:mode + for mode in [a:mode, a:mode.&background] + if has_key(s:color_map, mode) + try + let save_eventignore = &eventignore + set eventignore=all + let save_shelltemp = &shelltemp + set noshelltemp + + silent call system(s:build_command(s:color_map[mode])) + return + finally + let &shelltemp = save_shelltemp + let &eventignore = save_eventignore + endtry + endif + endfor +endfunction + +function! s:build_command(color) + if s:is_iTerm + let color = substitute(a:color, '^#', '', '') + let escape_template = s:iTerm_escape_template + else + let color = a:color + let escape_template = s:xterm_escape_template + endif + + let escape = printf(escape_template, color) + if exists('$TMUX') + let escape = airline#extensions#cursormode#tmux_escape(escape) + endif + return "printf '".escape."' > /dev/tty" +endfunction + +function! s:get_color_map() + if exists('g:cursormode_color_map') + return g:cursormode_color_map + endif + + try + let map = g:cursormode#{g:colors_name}#color_map + return map + catch + return { + \ "nlight": "#000000", + \ "ndark": "#BBBBBB", + \ "i": "#0000BB", + \ "v": "#FF5555", + \ "V": "#BBBB00", + \ "\": "#BB00BB", + \ } + endtry +endfunction + +augroup airline#extensions#cursormode + autocmd! + autocmd VimLeave * nested call s:set_cursor_color_for(g:cursormode_exit_mode) + " autocmd VimEnter * call airline#extensions#cursormode#activate() + autocmd Colorscheme * call airline#extensions#cursormode#activate() +augroup END + +function! airline#extensions#cursormode#activate() + if !exists('#airline') + " airline disabled + return + endif + let s:color_map = s:get_color_map() + call airline#extensions#cursormode#set() +endfunction + +function! airline#extensions#cursormode#apply(...) + let w:airline_section_a = get(w:, 'airline_section_a', g:airline_section_a) + let w:airline_section_a .= '%{airline#extensions#cursormode#set()}' +endfunction + +function! airline#extensions#cursormode#init(ext) + let s:color_map = s:get_color_map() + call a:ext.add_statusline_func('airline#extensions#cursormode#apply') +endfunction diff --git a/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/default.vim b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/default.vim new file mode 100755 index 0000000..7bfaf21 --- /dev/null +++ b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/default.vim @@ -0,0 +1,97 @@ +" MIT License. Copyright (c) 2013-2021 Bailey Ling et al. +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +let s:section_use_groups = get(g:, 'airline#extensions#default#section_use_groupitems', 1) +let s:section_truncate_width = get(g:, 'airline#extensions#default#section_truncate_width', { + \ 'b': 79, + \ 'x': 60, + \ 'y': 80, + \ 'z': 45, + \ 'warning': 80, + \ 'error': 80, + \ }) +let s:layout = get(g:, 'airline#extensions#default#layout', [ + \ [ 'a', 'b', 'c' ], + \ [ 'x', 'y', 'z', 'warning', 'error' ] + \ ]) + +function! s:get_section(winnr, key, ...) + if has_key(s:section_truncate_width, a:key) + if airline#util#winwidth(a:winnr) < s:section_truncate_width[a:key] + return '' + endif + endif + let spc = g:airline_symbols.space + if !exists('g:airline_section_{a:key}') + return '' + endif + let text = airline#util#getwinvar(a:winnr, 'airline_section_'.a:key, g:airline_section_{a:key}) + let [prefix, suffix] = [get(a:000, 0, '%('.spc), get(a:000, 1, spc.'%)')] + return empty(text) ? '' : prefix.text.suffix +endfunction + +function! s:build_sections(builder, context, keys) + for key in a:keys + if (key == 'warning' || key == 'error') && !a:context.active + continue + endif + call s:add_section(a:builder, a:context, key) + endfor +endfunction + +" There still is a highlighting bug when using groups %(%) in the statusline, +" deactivate it, unless it is fixed (7.4.1511) +if s:section_use_groups && (v:version >= 704 || (v:version >= 703 && has('patch81'))) + function! s:add_section(builder, context, key) + let condition = (a:key is# "warning" || a:key is# "error") && + \ (v:version == 704 && !has("patch1511")) + " i have no idea why the warning section needs special treatment, but it's + " needed to prevent separators from showing up + if ((a:key == 'error' || a:key == 'warning') && empty(s:get_section(a:context.winnr, a:key))) + return + endif + if condition + call a:builder.add_raw('%(') + endif + call a:builder.add_section('airline_'.a:key, s:get_section(a:context.winnr, a:key)) + if condition + call a:builder.add_raw('%)') + endif + endfunction +else + " older version don't like the use of %(%) + function! s:add_section(builder, context, key) + if ((a:key == 'error' || a:key == 'warning') && empty(s:get_section(a:context.winnr, a:key))) + return + endif + if a:key == 'warning' + call a:builder.add_raw('%#airline_warning#'.s:get_section(a:context.winnr, a:key)) + elseif a:key == 'error' + call a:builder.add_raw('%#airline_error#'.s:get_section(a:context.winnr, a:key)) + else + call a:builder.add_section('airline_'.a:key, s:get_section(a:context.winnr, a:key)) + endif + endfunction +endif + +function! airline#extensions#default#apply(builder, context) abort + let winnr = a:context.winnr + let active = a:context.active + + if airline#util#getwinvar(winnr, 'airline_render_left', active || (!active && !g:airline_inactive_collapse)) + call s:build_sections(a:builder, a:context, s:layout[0]) + else + let text = !empty(s:get_section(winnr, 'c')) ? s:get_section(winnr, 'c') : ' %f%m ' + call a:builder.add_section('airline_c'.(a:context.bufnr), text) + endif + + call a:builder.split(s:get_section(winnr, 'gutter', '', '')) + + if airline#util#getwinvar(winnr, 'airline_render_right', 1) + call s:build_sections(a:builder, a:context, s:layout[1]) + endif + + return 1 +endfunction diff --git a/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/denite.vim b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/denite.vim new file mode 100755 index 0000000..014709d --- /dev/null +++ b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/denite.vim @@ -0,0 +1,55 @@ +" MIT License. Copyright (c) 2017-2021 Thomas Dy et al. +" Plugin: https://github.com/Shougo/denite.nvim +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +if !get(g:, 'loaded_denite', 0) + finish +endif + +let s:denite_ver = (exists('*denite#get_status_mode') ? 2 : 3) +" Denite does not use vim's built-in modal editing but has a custom prompt +" that implements its own insert/normal mode so we have to handle changing the +" highlight +function! airline#extensions#denite#check_denite_mode(bufnr) abort + if &filetype !=# 'denite' && &filetype !=# 'denite-filter' + return '' + endif + + if s:denite_ver == 3 + let mode = split(denite#get_status("mode"), ' ') + else + let mode = split(denite#get_status_mode(), ' ') + endif + let mode = tolower(get(mode, 1, '')) + if !exists('b:denite_mode_cache') || mode != b:denite_mode_cache + call airline#highlighter#highlight([mode], a:bufnr) + let b:denite_mode_cache = mode + endif + return '' +endfunction + +function! airline#extensions#denite#apply(...) abort + if &filetype ==# 'denite' || &filetype ==# 'denite-filter' + let w:airline_skip_empty_sections = 0 + call a:1.add_section('airline_a', ' Denite %{airline#extensions#denite#check_denite_mode('.a:2['bufnr'].')}') + if s:denite_ver == 3 + call a:1.add_section('airline_c', ' %{denite#get_status("sources")}') + call a:1.split() + call a:1.add_section('airline_y', ' %{denite#get_status("path")} ') + call a:1.add_section('airline_z', ' %{denite#get_status("linenr")} ') + else + call a:1.add_section('airline_c', ' %{denite#get_status_sources()}') + call a:1.split() + call a:1.add_section('airline_y', ' %{denite#get_status_path()} ') + call a:1.add_section('airline_z', ' %{denite#get_status_linenr()} ') + endif + return 1 + endif +endfunction + +function! airline#extensions#denite#init(ext) abort + call denite#custom#option('_', 'statusline', 0) + call a:ext.add_statusline_func('airline#extensions#denite#apply') +endfunction diff --git a/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/dirvish.vim b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/dirvish.vim new file mode 100755 index 0000000..e1ef0c0 --- /dev/null +++ b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/dirvish.vim @@ -0,0 +1,36 @@ +" MIT Licsense +" Plugin: https://github.com/justinmk/vim-dirvish +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +if !get(g:, 'loaded_dirvish', 0) + finish +endif + +let s:spc = g:airline_symbols.space + +function! airline#extensions#dirvish#init(ext) abort + call a:ext.add_statusline_func('airline#extensions#dirvish#apply') +endfunction + +function! airline#extensions#dirvish#apply(...) abort + if &filetype ==# 'dirvish' && exists('b:dirvish') + let w:airline_section_a = 'Dirvish' + + let w:airline_section_b = exists('*airline#extensions#branch#get_head') + \ ? '%{airline#extensions#branch#get_head()}' + \ : '' + + let w:airline_section_c = '%{b:dirvish._dir}' + + let w:airline_section_x = '' + let w:airline_section_y = '' + + let current_column_regex = ':%\dv' + let w:airline_section_z = join(filter( + \ split(get(w:, 'airline_section_z', g:airline_section_z)), + \ 'v:val !~ current_column_regex' + \ )) + endif +endfunction diff --git a/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/eclim.vim b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/eclim.vim new file mode 100755 index 0000000..b1e0cde --- /dev/null +++ b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/eclim.vim @@ -0,0 +1,62 @@ +" MIT License. Copyright (c) 2013-2021 Bailey Ling et al. +" PLugin: https://eclim.org +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +if !exists(':ProjectCreate') + finish +endif + +function! airline#extensions#eclim#creat_line(...) + if &filetype == "tree" + let builder = a:1 + call builder.add_section('airline_a', ' Project ') + call builder.add_section('airline_b', ' %f ') + call builder.add_section('airline_c', '') + return 1 + endif +endfunction + +function! airline#extensions#eclim#get_warnings() + " Cache vavlues, so that it isn't called too often + if exists("s:eclim_errors") && + \ get(b:, 'airline_changenr', 0) == changenr() + return s:eclim_errors + endif + let eclimList = eclim#display#signs#GetExisting() + let s:eclim_errors = '' + + if !empty(eclimList) + " Remove any non-eclim signs (see eclim#display#signs#Update) + " First check for just errors since they are more important. + " If there are no errors, then check for warnings. + let errorList = filter(copy(eclimList), 'v:val.name =~ "^\\(qf_\\)\\?\\(error\\)$"') + + if (empty(errorList)) + " use the warnings + call filter(eclimList, 'v:val.name =~ "^\\(qf_\\)\\?\\(warning\\)$"') + let type = 'W' + else + " Use the errors + let eclimList = errorList + let type = 'E' + endif + + if !empty(eclimList) + let errorsLine = eclimList[0]['line'] + let errorsNumber = len(eclimList) + let errors = "[Eclim:" . type . " line:".string(errorsLine)." (".string(errorsNumber).")]" + if !exists(':SyntasticCheck') || SyntasticStatuslineFlag() == '' + let s:eclim_errors = errors.(g:airline_symbols.space) + endif + endif + endif + let b:airline_changenr = changenr() + return s:eclim_errors +endfunction + +function! airline#extensions#eclim#init(ext) + call airline#parts#define_function('eclim', 'airline#extensions#eclim#get_warnings') + call a:ext.add_statusline_func('airline#extensions#eclim#creat_line') +endfunction diff --git a/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/example.vim b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/example.vim new file mode 100755 index 0000000..f78c3ea --- /dev/null +++ b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/example.vim @@ -0,0 +1,55 @@ +" MIT License. Copyright (c) 2013-2021 Bailey Ling et al. +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +" we don't actually want this loaded :P +finish + +" Due to some potential rendering issues, the use of the `space` variable is +" recommended. +let s:spc = g:airline_symbols.space + +" Extension specific variables can be defined the usual fashion. +if !exists('g:airline#extensions#example#number_of_cats') + let g:airline#extensions#example#number_of_cats = 42 +endif + +" First we define an init function that will be invoked from extensions.vim +function! airline#extensions#example#init(ext) + + " Here we define a new part for the plugin. This allows users to place this + " extension in arbitrary locations. + call airline#parts#define_raw('cats', '%{airline#extensions#example#get_cats()}') + + " Next up we add a funcref so that we can run some code prior to the + " statusline getting modified. + call a:ext.add_statusline_func('airline#extensions#example#apply') + + " You can also add a funcref for inactive statuslines. + " call a:ext.add_inactive_statusline_func('airline#extensions#example#unapply') +endfunction + +" This function will be invoked just prior to the statusline getting modified. +function! airline#extensions#example#apply(...) + " First we check for the filetype. + if &filetype == "nyancat" + + " Let's say we want to append to section_c, first we check if there's + " already a window-local override, and if not, create it off of the global + " section_c. + let w:airline_section_c = get(w:, 'airline_section_c', g:airline_section_c) + + " Then we just append this extension to it, optionally using separators. + let w:airline_section_c .= s:spc.g:airline_left_alt_sep.s:spc.'%{airline#extensions#example#get_cats()}' + endif +endfunction + +" Finally, this function will be invoked from the statusline. +function! airline#extensions#example#get_cats() + let cats = '' + for i in range(1, g:airline#extensions#example#number_of_cats) + let cats .= ' (,,,)=(^.^)=(,,,) ' + endfor + return cats +endfunction diff --git a/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/fern.vim b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/fern.vim new file mode 100755 index 0000000..8b5562a --- /dev/null +++ b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/fern.vim @@ -0,0 +1,36 @@ +" MIT License. Copyright (c) 2013-2021 +" Plugin: https://github.com/lambdalisue/fern.vim +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 +if !get(g:, 'loaded_fern', 0) + finish +endif + +function! airline#extensions#fern#apply(...) abort + if (&ft =~# 'fern') + let spc = g:airline_symbols.space + let fri = fern#fri#parse(expand('%f')) + + call a:1.add_section('airline_a', spc.'fern'.spc) + if exists('*airline#extensions#branch#get_head') + call a:1.add_section('airline_b', spc.'%{airline#extensions#branch#get_head()}'.spc) + else + call a:1.add_section('airline_b', '') + endif + if !(fri.authority =~# '^drawer') + let abspath = substitute(fri.path, 'file://', '', '') + call a:1.add_section('airline_c', spc.fnamemodify(abspath, ':~')) + call a:1.split() + if len(get(g:, 'fern#comparators', {})) + call a:1.add_section('airline_y', spc.'%{fern#comparator}'.spc) + endif + endif + return 1 + endif +endfunction + +function! airline#extensions#fern#init(ext) abort + let g:fern_force_overwrite_statusline = 0 + call a:ext.add_statusline_func('airline#extensions#fern#apply') +endfunction diff --git a/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/fugitiveline.vim b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/fugitiveline.vim new file mode 100755 index 0000000..8f1c4cb --- /dev/null +++ b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/fugitiveline.vim @@ -0,0 +1,61 @@ +" MIT License. Copyright (c) 2017-2021 Cimbali et al +" Plugin: https://github.com/tpope/vim-fugitive +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +if !airline#util#has_fugitive() + finish +endif + +let s:has_percent_eval = v:version > 802 || (v:version == 802 && has("patch2854")) + +function! airline#extensions#fugitiveline#bufname() abort + if !exists('b:fugitive_name') + let b:fugitive_name = '' + try + if bufname('%') =~? '^fugitive:' && exists('*FugitiveReal') + let b:fugitive_name = FugitiveReal(bufname('%')) + endif + catch + endtry + endif + + let fmod = (exists("+autochdir") && &autochdir) ? ':p' : ':.' + let result='' + if empty(b:fugitive_name) + if empty(bufname('%')) + return &buftype ==# 'nofile' ? '[Scratch]' : '[No Name]' + endif + return s:has_percent_eval ? '%f' : fnamemodify(bufname('%'), fmod) + else + return s:has_percent_eval ? '%f [git]' : (fnamemodify(b:fugitive_name, fmod). " [git]") + endif +endfunction + +function! s:sh_autocmd_handler() + if exists('#airline') + unlet! b:fugitive_name + endif +endfunction + +function! airline#extensions#fugitiveline#init(ext) abort + let prct = s:has_percent_eval ? '%' : '' + + if exists("+autochdir") && &autochdir + " if 'acd' is set, vim-airline uses the path section, so we need to redefine this here as well + if get(g:, 'airline_stl_path_style', 'default') ==# 'short' + call airline#parts#define_raw('path', '%<%{'. prct. 'pathshorten(airline#extensions#fugitiveline#bufname())' . prct . '}%m') + else + call airline#parts#define_raw('path', '%<%{' . prct . 'airline#extensions#fugitiveline#bufname()' . prct . '}%m') + endif + else + if get(g:, 'airline_stl_path_style', 'default') ==# 'short' + call airline#parts#define_raw('file', '%<%{' . prct . 'pathshorten(airline#extensions#fugitiveline#bufname())' . prct . '}%m') + else + call airline#parts#define_raw('file', '%<%{' . prct . 'airline#extensions#fugitiveline#bufname()' . prct . '}%m') + endif + endif + autocmd ShellCmdPost,CmdwinLeave * call s:sh_autocmd_handler() + autocmd User AirlineBeforeRefresh call s:sh_autocmd_handler() +endfunction diff --git a/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/fzf.vim b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/fzf.vim new file mode 100755 index 0000000..760a1cc --- /dev/null +++ b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/fzf.vim @@ -0,0 +1,44 @@ +" MIT License. Copyright (c) 2013-2021 Bailey Ling et al. +" Plugin: https://github.com/junegunn/fzf, https://github.com/junegunn/fzf.vim +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +function! airline#extensions#fzf#init(ext) abort + " Remove the custom statusline that fzf.vim sets by removing its `FileType + " fzf` autocmd. Ideally we'd use `let g:fzf_statusline = 0`, but this + " variable is checked *before* airline#extensions#init() is called. + augroup _fzf_statusline + autocmd! + augroup END + + call a:ext.add_statusline_func('airline#extensions#fzf#apply') + call a:ext.add_inactive_statusline_func('airline#extensions#fzf#inactive_apply') +endfunction + +function! airline#extensions#fzf#statusline(...) abort + let spc = g:airline_symbols.space + + let builder = airline#builder#new({ 'active': 1 }) + call builder.add_section('airline_a', spc.'FZF'.spc) + call builder.add_section('airline_c', '') + return builder.build() +endfunction + +function! airline#extensions#fzf#apply(...) abort + if &filetype ==# 'fzf' + let spc = g:airline_symbols.space + call a:1.add_section('airline_a', spc.'FZF'.spc) + call a:1.add_section('airline_c', '') + return 1 + endif +endfunction + +function! airline#extensions#fzf#inactive_apply(...) abort + if getbufvar(a:2.bufnr, '&filetype') ==# 'fzf' + let spc = g:airline_symbols.space + call a:1.add_section('airline_a', spc.'FZF'.spc) + call a:1.add_section('airline_c', '') + return 1 + endif +endfunction diff --git a/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/gen_tags.vim b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/gen_tags.vim new file mode 100755 index 0000000..ff788bc --- /dev/null +++ b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/gen_tags.vim @@ -0,0 +1,19 @@ +" MIT License. Copyright (c) 2014-2021 Mathias Andersson et al. +" Written by Kamil Cukrowski 2020 +" Plugin: https://github.com/jsfaint/gen_tags.vim +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +if !(get(g:, 'loaded_gentags#gtags', 0) || get(g:, 'loaded_gentags#ctags', 0)) + finish +endif + +function! airline#extensions#gen_tags#status(...) abort + return gen_tags#job#is_running() != 0 ? 'Gen. gen_tags' : '' +endfunction + +function! airline#extensions#gen_tags#init(ext) abort + call airline#parts#define_function('gen_tags', 'airline#extensions#gen_tags#status') +endfunction + diff --git a/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/gina.vim b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/gina.vim new file mode 100755 index 0000000..58a636a --- /dev/null +++ b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/gina.vim @@ -0,0 +1,28 @@ +" MIT License. Copyright (c) 2013-2021 +" Plugin: https://github.com/lambdalisue/gina.vim +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 +if !get(g:, 'loaded_gina', 0) + finish +endif + +function! airline#extensions#gina#apply(...) abort + " gina.vim seems to set b:gina_initialized = 1 in diff buffers it open, + " where get(b:, 'gina_initialized', 0) returns 1. + " In diff buffers not opened by gina.vim b:gina_initialized is not set, + " so get(b:, 'gina_initialized', 0) returns 0. + if (&ft =~# 'gina' && &ft !~# 'blame') || (&ft ==# 'diff' && get(b:, 'gina_initialized', 0)) + call a:1.add_section('airline_a', ' gina ') + call a:1.add_section('airline_b', ' %{gina#component#repo#branch()} ') + call a:1.split() + call a:1.add_section('airline_y', ' staged %{gina#component#status#staged()} ') + call a:1.add_section('airline_z', ' unstaged %{gina#component#status#unstaged()} ') + return 1 + endif +endfunction + +function! airline#extensions#gina#init(ext) abort + let g:gina_force_overwrite_statusline = 0 + call a:ext.add_statusline_func('airline#extensions#gina#apply') +endfunction diff --git a/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/grepper.vim b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/grepper.vim new file mode 100755 index 0000000..2f1d4b3 --- /dev/null +++ b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/grepper.vim @@ -0,0 +1,18 @@ +" MIT License. Copyright (c) 2014-2021 Mathias Andersson et al. +" Plugin: https://github.com/mhinz/vim-grepper +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +if !get(g:, 'loaded_grepper', 0) + finish +endif + +function! airline#extensions#grepper#status() + let msg = grepper#statusline() + return empty(msg) ? '' : 'grepper' +endfunction + +function! airline#extensions#grepper#init(ext) + call airline#parts#define_function('grepper', 'airline#extensions#grepper#status') +endfunction diff --git a/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/gutentags.vim b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/gutentags.vim new file mode 100755 index 0000000..a2a78c7 --- /dev/null +++ b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/gutentags.vim @@ -0,0 +1,18 @@ +" MIT License. Copyright (c) 2014-2021 Mathias Andersson et al. +" Plugin: https://github.com/ludovicchabant/vim-gutentags +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +if !get(g:, 'loaded_gutentags', 0) + finish +endif + +function! airline#extensions#gutentags#status() + let msg = gutentags#statusline() + return empty(msg) ? '' : 'Gen. ' . msg +endfunction + +function! airline#extensions#gutentags#init(ext) + call airline#parts#define_function('gutentags', 'airline#extensions#gutentags#status') +endfunction diff --git a/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/hunks.vim b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/hunks.vim new file mode 100755 index 0000000..29af880 --- /dev/null +++ b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/hunks.vim @@ -0,0 +1,149 @@ +" MIT License. Copyright (c) 2013-2021 Bailey Ling et al. +" Plugin: vim-gitgutter, vim-signify, changesPlugin, quickfixsigns, coc-git, +" gitsigns.nvim +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +if !get(g:, 'loaded_signify', 0) + \ && !get(g:, 'loaded_gitgutter', 0) + \ && !get(g:, 'loaded_changes', 0) + \ && !get(g:, 'loaded_quickfixsigns', 0) + \ && !exists(':Gitsigns') + \ && !exists("*CocAction") + finish +endif + +let s:non_zero_only = get(g:, 'airline#extensions#hunks#non_zero_only', 0) +let s:hunk_symbols = get(g:, 'airline#extensions#hunks#hunk_symbols', ['+', '~', '-']) + +function! s:coc_git_enabled() abort + if !exists("*CocAction") || + \ !get(g:, 'airline#extensions#hunks#coc_git', 0) + " coc-git extension is disabled by default + " unless specifically being enabled by the user + " (as requested from coc maintainer) + return 0 + endif + return 1 +endfunction + +function! s:parse_hunk_status_dict(hunks) abort + let result = [0, 0, 0] + let result[0] = get(a:hunks, 'added', 0) + let result[1] = get(a:hunks, 'changed', 0) + let result[2] = get(a:hunks, 'removed', 0) + return result +endfunction + +function! s:parse_hunk_status_decorated(hunks) abort + if empty(a:hunks) + return [] + endif + let result = [0, 0, 0] + for val in split(a:hunks) + if val[0] is# '+' + let result[0] = val[1:] + 0 + elseif val[0] is# '~' + let result[1] = val[1:] + 0 + elseif val[0] is# '-' + let result[2] = val[1:] + 0 + endif + endfor + return result +endfunction + +function! s:get_hunks_signify() abort + let hunks = sy#repo#get_stats() + if hunks[0] >= 0 + return hunks + endif + return [] +endfunction + +function! s:get_hunks_gitgutter() abort + let hunks = GitGutterGetHunkSummary() + return hunks == [0, 0, 0] ? [] : hunks +endfunction + +function! s:get_hunks_changes() abort + let hunks = changes#GetStats() + return hunks == [0, 0, 0] ? [] : hunks +endfunction + +function! s:get_hunks_gitsigns() abort + let hunks = get(b:, 'gitsigns_status_dict', {}) + return s:parse_hunk_status_dict(hunks) +endfunction + +function! s:get_hunks_coc() abort + let hunks = get(b:, 'coc_git_status', '') + return s:parse_hunk_status_decorated(hunks) +endfunction + +function! s:get_hunks_empty() abort + return '' +endfunction + +function! airline#extensions#hunks#get_raw_hunks() abort + if !exists('b:source_func') || get(b:, 'source_func', '') is# 's:get_hunks_empty' + if get(g:, 'loaded_signify') && sy#buffer_is_active() + let b:source_func = 's:get_hunks_signify' + elseif exists('*GitGutterGetHunkSummary') && get(g:, 'gitgutter_enabled') + let b:source_func = 's:get_hunks_gitgutter' + elseif exists('*changes#GetStats') + let b:source_func = 's:get_hunks_changes' + elseif exists('*quickfixsigns#vcsdiff#GetHunkSummary') + let b:source_func = 'quickfixsigns#vcsdiff#GetHunkSummary' + elseif exists(':Gitsigns') + let b:source_func = 's:get_hunks_gitsigns' + elseif s:coc_git_enabled() + let b:source_func = 's:get_hunks_coc' + else + let b:source_func = 's:get_hunks_empty' + endif + endif + return {b:source_func}() +endfunction + +function! airline#extensions#hunks#get_hunks() abort + if !get(w:, 'airline_active', 0) + return '' + endif + " Cache values, so that it isn't called too often + if exists("b:airline_hunks") && + \ get(b:, 'airline_changenr', 0) == b:changedtick && + \ airline#util#winwidth() == get(s:, 'airline_winwidth', 0) && + \ get(b:, 'source_func', '') isnot# 's:get_hunks_signify' && + \ get(b:, 'source_func', '') isnot# 's:get_hunks_gitgutter' && + \ get(b:, 'source_func', '') isnot# 's:get_hunks_empty' && + \ get(b:, 'source_func', '') isnot# 's:get_hunks_changes' && + \ get(b:, 'source_func', '') isnot# 's:get_hunks_gitsigns' && + \ get(b:, 'source_func', '') isnot# 's:get_hunks_coc' + return b:airline_hunks + endif + let hunks = airline#extensions#hunks#get_raw_hunks() + let string = '' + let winwidth = get(airline#parts#get('hunks'), 'minwidth', 100) + if !empty(hunks) + " hunks should contain [added, changed, deleted] + for i in [0, 1, 2] + if (s:non_zero_only == 0 && airline#util#winwidth() > winwidth) || hunks[i] > 0 + let string .= printf('%s%s ', s:hunk_symbols[i], hunks[i]) + endif + endfor + endif + if index(airline#extensions#get_loaded_extensions(), 'branch') == -1 && string[-1:] == ' ' + " branch extension not loaded, skip trailing whitespace + let string = string[0:-2] + endif + + let b:airline_hunks = string + let b:airline_changenr = b:changedtick + let s:airline_winwidth = airline#util#winwidth() + return string +endfunction + +function! airline#extensions#hunks#init(ext) abort + call airline#parts#define_function('hunks', 'airline#extensions#hunks#get_hunks') +endfunction diff --git a/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/keymap.vim b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/keymap.vim new file mode 100755 index 0000000..c37584a --- /dev/null +++ b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/keymap.vim @@ -0,0 +1,31 @@ +" MIT License. Copyright (c) 2013-2021 Doron Behar, C.Brabandt et al. +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +if !has('keymap') + finish +endif + +function! airline#extensions#keymap#status() + if (get(g:, 'airline#extensions#keymap#enabled', 1) && has('keymap')) + let short_codes = get(g:, 'airline#extensions#keymap#short_codes', {}) + let label = get(g:, 'airline#extensions#keymap#label', g:airline_symbols.keymap) + let default = get(g:, 'airline#extensions#keymap#default', '') + if (label !=# '') + let label .= ' ' + endif + let keymap = &keymap + if has_key(short_codes, keymap) + let keymap = short_codes[keymap] + endif + return printf('%s', (!empty(keymap) && &iminsert ? (label . keymap) : + \ (!empty(default) ? label . default : default))) + else + return '' + endif +endfunction + +function! airline#extensions#keymap#init(ext) + call airline#parts#define_function('keymap', 'airline#extensions#keymap#status') +endfunction diff --git a/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/languageclient.vim b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/languageclient.vim new file mode 100755 index 0000000..c6c13f3 --- /dev/null +++ b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/languageclient.vim @@ -0,0 +1,113 @@ +" MIT License. Copyright (c) 2013-2021 Bjorn Neergaard, hallettj et al. +" Plugin: https://github.com/autozimu/LanguageClient-neovim +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +let s:error_symbol = get(g:, 'airline#extensions#languageclient#error_symbol', 'E:') +let s:warning_symbol = get(g:, 'airline#extensions#languageclient#warning_symbol', 'W:') +let s:show_line_numbers = get(g:, 'airline#extensions#languageclient#show_line_numbers', 1) + +" Severity codes from the LSP spec +let s:severity_error = 1 +let s:severity_warning = 2 +let s:severity_info = 3 +let s:severity_hint = 4 + +" After each LanguageClient state change `s:diagnostics` will be populated with +" a map from file names to lists of errors, warnings, informational messages, +" and hints. +let s:diagnostics = {} + +function! s:languageclient_refresh() + if get(g:, 'airline_skip_empty_sections', 0) + exe ':AirlineRefresh!' + endif +endfunction + +function! s:record_diagnostics(state) + " The returned message might not have the 'result' key + if has_key(a:state, 'result') + let result = json_decode(a:state.result) + let s:diagnostics = result.diagnostics + endif + call s:languageclient_refresh() +endfunction + +function! s:get_diagnostics() + if !exists('#airline') + " airline disabled + return + endif + call LanguageClient#getState(function("s:record_diagnostics")) +endfunction + +function! s:diagnostics_for_buffer() + return get(s:diagnostics, expand('%:p'), []) +endfunction + +function! s:airline_languageclient_count(cnt, symbol) + return a:cnt ? a:symbol. a:cnt : '' +endfunction + +function! s:airline_languageclient_get_line_number(type) abort + let linenumber_of_first_problem = 0 + for d in s:diagnostics_for_buffer() + if has_key(d, 'severity') && d.severity == a:type + let linenumber_of_first_problem = d.range.start.line + break + endif + endfor + + if linenumber_of_first_problem == 0 + return '' + endif + + let open_lnum_symbol = get(g:, 'airline#extensions#languageclient#open_lnum_symbol', '(L') + let close_lnum_symbol = get(g:, 'airline#extensions#languageclient#close_lnum_symbol', ')') + + return open_lnum_symbol . linenumber_of_first_problem . close_lnum_symbol +endfunction + +function! airline#extensions#languageclient#get(type) + if get(b:, 'LanguageClient_isServerRunning', 0) ==# 0 + return '' + endif + + let is_err = a:type == s:severity_error + let symbol = is_err ? s:error_symbol : s:warning_symbol + + let cnt = 0 + for d in s:diagnostics_for_buffer() + if has_key(d, 'severity') && d.severity == a:type + let cnt += 1 + endif + endfor + + if cnt == 0 + return '' + endif + + if s:show_line_numbers == 1 + return s:airline_languageclient_count(cnt, symbol) . airline_languageclient_get_line_number(a:type) + else + return s:airline_languageclient_count(cnt, symbol) + endif +endfunction + +function! airline#extensions#languageclient#get_warning() + return airline#extensions#languageclient#get(s:severity_warning) +endfunction + +function! airline#extensions#languageclient#get_error() + return airline#extensions#languageclient#get(s:severity_error) +endfunction + +function! airline#extensions#languageclient#init(ext) + call airline#parts#define_function('languageclient_error_count', 'airline#extensions#languageclient#get_error') + call airline#parts#define_function('languageclient_warning_count', 'airline#extensions#languageclient#get_warning') + augroup airline_languageclient + autocmd! + autocmd User LanguageClientDiagnosticsChanged call get_diagnostics() + augroup END +endfunction diff --git a/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/localsearch.vim b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/localsearch.vim new file mode 100755 index 0000000..d20b7da --- /dev/null +++ b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/localsearch.vim @@ -0,0 +1,41 @@ +" MIT License. Copyright (c) 2018-2021 mox et al. +" Plugin: https://github.com/mox-mox/vim-localsearch +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +let s:enabled = get(g:, 'airline#extensions#localsearch#enabled', 1) +if !get(g:, 'loaded_localsearch', 0) || !s:enabled || get(g:, 'airline#extensions#localsearch#loaded', 0) + finish +endif +let g:airline#extensions#localsearch#loaded = 001 + +let s:spc = g:airline_symbols.space + +let g:airline#extensions#localsearch#inverted = get(g:, 'airline#extensions#localsearch#inverted', 0) + +function! airline#extensions#localsearch#load_theme(palette) abort + call airline#highlighter#exec('localsearch_dark', [ '#ffffff' , '#000000' , 15 , 1 , '']) +endfunction + + +function! airline#extensions#localsearch#init(ext) abort + call a:ext.add_theme_func('airline#extensions#localsearch#load_theme') + call a:ext.add_statusline_func('airline#extensions#localsearch#apply') +endfunction + + +function! airline#extensions#localsearch#apply(...) abort + " first variable is the statusline builder + let builder = a:1 + + """"" WARNING: the API for the builder is not finalized and may change + if exists('#localsearch#WinEnter') && !g:airline#extensions#localsearch#inverted " If localsearch mode is enabled and 'invert' option is false + call builder.add_section('localsearch_dark', s:spc.airline#section#create('LS').s:spc) + endif + if !exists('#localsearch#WinEnter') && g:airline#extensions#localsearch#inverted " If localsearch mode is disabled and 'invert' option is true + call builder.add_section('localsearch_dark', s:spc.airline#section#create('GS').s:spc) + endif + return 0 +endfunction + diff --git a/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/lsp.vim b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/lsp.vim new file mode 100755 index 0000000..f275ddb --- /dev/null +++ b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/lsp.vim @@ -0,0 +1,111 @@ +" MIT License. Copyright (c) 2013-2021 François-Xavier Carton et al. +" Plugin: https://github.com/prabirshrestha/vim-lsp +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +if !get(g:, 'lsp_loaded', 0) + finish +endif + +function! s:airline_lsp_count(cnt, symbol) abort + return a:cnt ? a:symbol. a:cnt : '' +endfunction + +function! s:airline_lsp_get_line_number(cnt, type) abort + let result = '' + + if a:type ==# 'error' + let result = lsp#get_buffer_first_error_line() + endif + + if empty(result) + return '' + endif + + let open_lnum_symbol = + \ get(g:, 'airline#extensions#lsp#open_lnum_symbol', '(L') + let close_lnum_symbol = + \ get(g:, 'airline#extensions#lsp#close_lnum_symbol', ')') + + return open_lnum_symbol . result . close_lnum_symbol +endfunction + +function! airline#extensions#lsp#get(type) abort + if !exists(':LspDeclaration') + return '' + endif + + let error_symbol = get(g:, 'airline#extensions#lsp#error_symbol', 'E:') + let warning_symbol = get(g:, 'airline#extensions#lsp#warning_symbol', 'W:') + let show_line_numbers = get(g:, 'airline#extensions#lsp#show_line_numbers', 1) + + let is_err = a:type ==# 'error' + + let symbol = is_err ? error_symbol : warning_symbol + + let num = lsp#get_buffer_diagnostics_counts()[a:type] + + if show_line_numbers == 1 + return s:airline_lsp_count(num, symbol) . airline_lsp_get_line_number(num, a:type) + else + return s:airline_lsp_count(num, symbol) + endif +endfunction + +function! airline#extensions#lsp#get_warning() abort + return airline#extensions#lsp#get('warning') +endfunction + +function! airline#extensions#lsp#get_error() abort + return airline#extensions#lsp#get('error') +endfunction + +let s:lsp_progress = [] +function! airline#extensions#lsp#progress() abort + if get(w:, 'airline_active', 0) + if exists('*lsp#get_progress') + let s:lsp_progress = lsp#get_progress() + + if len(s:lsp_progress) == 0 | return '' | endif + + " show only most new progress + let s:lsp_progress = s:lsp_progress[0] + if s:lsp_progress['message'] !=# '' + let percent = '' + if has_key(s:lsp_progress, 'percentage') && s:lsp_progress['percentage'] >= 0 + let percent = ' ' . string(s:lsp_progress['percentage']) . '%' + endif + let s:title = s:lsp_progress['title'] + let message = airline#util#shorten(s:lsp_progress['message'] . percent, 91, 9) + return s:lsp_progress['server'] . ': ' . s:title . ' ' . message + endif + endif + endif + return '' +endfunction + +let s:timer = 0 +let s:ignore_time = 0 +function! airline#extensions#lsp#update() abort + if !exists('#airline') + " airline disabled + return + endif + if reltimefloat(reltime()) - s:ignore_time >= + \ get(g:, 'airline#extensions#lsp#progress_skip_time', 0.3) + \ || len(s:lsp_progress) == 0 + call airline#update_statusline() + let s:ignore_time = reltimefloat(reltime()) + endif +endfunction + +function! airline#extensions#lsp#init(ext) abort + call airline#parts#define_function('lsp_error_count', 'airline#extensions#lsp#get_error') + call airline#parts#define_function('lsp_warning_count', 'airline#extensions#lsp#get_warning') + call airline#parts#define_function('lsp_progress', 'airline#extensions#lsp#progress') + augroup airline_lsp_progress + autocmd! + autocmd User lsp_progress_updated call airline#extensions#lsp#update() + augroup END +endfunction diff --git a/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/neomake.vim b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/neomake.vim new file mode 100755 index 0000000..cf9125f --- /dev/null +++ b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/neomake.vim @@ -0,0 +1,37 @@ +" MIT License. Copyright (c) 2013-2021 Bailey Ling et al. +" Plugin: https://github.com/neomake/neomake +" vim: et ts=2 sts=2 sw=2 + +if !exists(':Neomake') + finish +endif + +let s:error_symbol = get(g:, 'airline#extensions#neomake#error_symbol', 'E:') +let s:warning_symbol = get(g:, 'airline#extensions#neomake#warning_symbol', 'W:') + +function! s:get_counts() + let l:counts = neomake#statusline#LoclistCounts() + + if empty(l:counts) + return neomake#statusline#QflistCounts() + else + return l:counts + endif +endfunction + +function! airline#extensions#neomake#get_warnings() + let counts = s:get_counts() + let warnings = get(counts, 'W', 0) + return warnings ? s:warning_symbol.warnings : '' +endfunction + +function! airline#extensions#neomake#get_errors() + let counts = s:get_counts() + let errors = get(counts, 'E', 0) + return errors ? s:error_symbol.errors : '' +endfunction + +function! airline#extensions#neomake#init(ext) + call airline#parts#define_function('neomake_warning_count', 'airline#extensions#neomake#get_warnings') + call airline#parts#define_function('neomake_error_count', 'airline#extensions#neomake#get_errors') +endfunction diff --git a/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/netrw.vim b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/netrw.vim new file mode 100755 index 0000000..830cb88 --- /dev/null +++ b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/netrw.vim @@ -0,0 +1,35 @@ +" MIT License. Copyright (c) 2013-2021 Bailey Ling et al. +" Plugin: http://www.drchip.org/astronaut/vim/#NETRW +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +if !exists(':NetrwSettings') + finish +endif + +function! airline#extensions#netrw#apply(...) + if &ft == 'netrw' + let spc = g:airline_symbols.space + + call a:1.add_section('airline_a', spc.'netrw'.spc) + if exists('*airline#extensions#branch#get_head') + call a:1.add_section('airline_b', spc.'%{airline#extensions#branch#get_head()}'.spc) + endif + call a:1.add_section('airline_c', spc.'%f'.spc) + call a:1.split() + call a:1.add_section('airline_y', spc.'%{airline#extensions#netrw#sortstring()}'.spc) + return 1 + endif +endfunction + +function! airline#extensions#netrw#init(ext) + let g:netrw_force_overwrite_statusline = 0 + call a:ext.add_statusline_func('airline#extensions#netrw#apply') +endfunction + + +function! airline#extensions#netrw#sortstring() + let order = (get(g:, 'netrw_sort_direction', 'n') =~ 'n') ? '+' : '-' + return get(g:, 'netrw_sort_by', '') . (g:airline_symbols.space) . '[' . order . ']' +endfunction diff --git a/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/nrrwrgn.vim b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/nrrwrgn.vim new file mode 100755 index 0000000..45d1a6e --- /dev/null +++ b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/nrrwrgn.vim @@ -0,0 +1,58 @@ +" MIT License. Copyright (c) 2013-2021 Bailey Ling, Christian Brabandt et al. +" Plugin: https://github.com/chrisbra/NrrwRgn +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +if !get(g:, 'loaded_nrrw_rgn', 0) + finish +endif + +function! airline#extensions#nrrwrgn#apply(...) + if exists(":WidenRegion") == 2 + let spc = g:airline_symbols.space + if !exists("*nrrwrgn#NrrwRgnStatus()") || empty(nrrwrgn#NrrwRgnStatus()) + call a:1.add_section('airline_a', printf('%s[Narrowed%s#%d]', spc, spc, b:nrrw_instn)) + let bufname=(get(b:, 'orig_buf', 0) ? bufname(b:orig_buf) : substitute(bufname('%'), '^Nrrwrgn_\zs.*\ze_\d\+$', submatch(0), '')) + call a:1.add_section('airline_c', spc.bufname.spc) + call a:1.split() + else + let dict=nrrwrgn#NrrwRgnStatus() + let vmode = { 'v': 'Char ', 'V': 'Line ', '': 'Block '} + let mode = dict.visual ? vmode[dict.visual] : vmode['V'] + let winwidth = airline#util#winwidth() + if winwidth < 80 + let mode = mode[0] + endif + let title = (winwidth < 80 ? "Nrrw" : "Narrowed ") + let multi = (winwidth < 80 ? 'M' : 'Multi') + call a:1.add_section('airline_a', printf('[%s%s%s#%d]%s', (dict.multi ? multi : ""), + \ title, mode, b:nrrw_instn, spc)) + let name = dict.fullname + if name !=# '[No Name]' + if winwidth > 100 + " need some space + let name = fnamemodify(dict.fullname, ':~') + if strlen(name) > 8 + " shorten name + let name = substitute(name, '\(.\)[^/\\]*\([/\\]\)', '\1\2', 'g') + endif + else + let name = fnamemodify(dict.fullname, ':t') + endif + endif + let range=(dict.multi ? '' : printf("[%d-%d]", dict.start[1], dict.end[1])) + call a:1.add_section('airline_c', printf("%s %s %s", name, range, + \ dict.enabled ? (&encoding ==? 'utf-8' ? "\u2713" : '') : '!')) + call a:1.split() + call a:1.add_section('airline_x', get(g:, 'airline_section_x').spc) + call a:1.add_section('airline_y', spc.get(g:, 'airline_section_y').spc) + call a:1.add_section('airline_z', spc.get(g:, 'airline_section_z')) + endif + return 1 + endif +endfunction + +function! airline#extensions#nrrwrgn#init(ext) + call a:ext.add_statusline_func('airline#extensions#nrrwrgn#apply') +endfunction diff --git a/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/nvimlsp.vim b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/nvimlsp.vim new file mode 100755 index 0000000..0a63e6f --- /dev/null +++ b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/nvimlsp.vim @@ -0,0 +1,69 @@ +" Apache 2.0 license. Copyright (c) 2019-2021 Copyright Neovim contributors. +" Plugin: https://github.com/neovim/nvim-lsp +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +if !(get(g:, 'airline#extensions#nvimlsp#enabled', 1) + \ && has('nvim') + \ && luaeval('vim.lsp ~= nil')) + finish +endif + +function! s:airline_nvimlsp_count(cnt, symbol) abort + return a:cnt ? a:symbol. a:cnt : '' +endfunction + +function! airline#extensions#nvimlsp#get(type) abort + if luaeval('vim.tbl_isempty(vim.lsp.buf_get_clients(0))') + return '' + endif + + let error_symbol = get(g:, 'airline#extensions#nvimlsp#error_symbol', 'E:') + let warning_symbol = get(g:, 'airline#extensions#nvimlsp#warning_symbol', 'W:') + let show_line_numbers = get(g:, 'airline#extensions#nvimlsp#show_line_numbers', 1) + + let is_err = a:type ==# 'Error' + + let symbol = is_err ? error_symbol : warning_symbol + + if luaeval("pcall(require, 'vim.diagnostic')") + let severity = a:type == 'Warning' ? 'Warn' : a:type + let num = len(v:lua.vim.diagnostic.get(0, { 'severity': severity })) + elseif luaeval("pcall(require, 'vim.lsp.diagnostic')") + let num = v:lua.vim.lsp.diagnostic.get_count(0, a:type) + else + let num = v:lua.vim.lsp.util.buf_diagnostics_count(a:type) + endif + + if show_line_numbers == 1 && luaeval("pcall(require, 'vim.diagnostic')") && num > 0 + return s:airline_nvimlsp_count(num, symbol) . airline_nvimlsp_get_line_number(num, a:type) + else + return s:airline_nvimlsp_count(num, symbol) + endif +endfunction + +function! s:airline_nvimlsp_get_line_number(cnt, type) abort + let severity = a:type == 'Warning' ? 'Warn' : a:type + let num = v:lua.vim.diagnostic.get(0, { 'severity': severity })[0].lnum + + let l:open_lnum_symbol = + \ get(g:, 'airline#extensions#nvimlsp#open_lnum_symbol', '(L') + let l:close_lnum_symbol = + \ get(g:, 'airline#extensions#nvimlsp#close_lnum_symbol', ')') + + return open_lnum_symbol . num . close_lnum_symbol +endfunction + +function! airline#extensions#nvimlsp#get_warning() abort + return airline#extensions#nvimlsp#get('Warning') +endfunction + +function! airline#extensions#nvimlsp#get_error() abort + return airline#extensions#nvimlsp#get('Error') +endfunction + +function! airline#extensions#nvimlsp#init(ext) abort + call airline#parts#define_function('nvimlsp_error_count', 'airline#extensions#nvimlsp#get_error') + call airline#parts#define_function('nvimlsp_warning_count', 'airline#extensions#nvimlsp#get_warning') +endfunction diff --git a/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/obsession.vim b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/obsession.vim new file mode 100755 index 0000000..9b22952 --- /dev/null +++ b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/obsession.vim @@ -0,0 +1,23 @@ +" MIT License. Copyright (c) 2013-2021 Bailey Ling et al. +" Plugin: https://github.com/tpope/vim-obsession +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +if !exists('*ObsessionStatus') + finish +endif + +let s:spc = g:airline_symbols.space + +if !exists('g:airline#extensions#obsession#indicator_text') + let g:airline#extensions#obsession#indicator_text = '$' +endif + +function! airline#extensions#obsession#init(ext) + call airline#parts#define_function('obsession', 'airline#extensions#obsession#get_status') +endfunction + +function! airline#extensions#obsession#get_status() + return ObsessionStatus((g:airline#extensions#obsession#indicator_text . s:spc), '') +endfunction diff --git a/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/omnisharp.vim b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/omnisharp.vim new file mode 100755 index 0000000..92a4acb --- /dev/null +++ b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/omnisharp.vim @@ -0,0 +1,45 @@ +" MIT License +" Plugin: https://github.com/OmniSharp/omnisharp-vim +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +if !get(g:, 'OmniSharp_loaded', 0) + finish +endif + +function! airline#extensions#omnisharp#server_status(...) abort + if !exists(':OmniSharpGotoDefinition') || !get(g:, 'OmniSharp_server_stdio', 0) + return '' + endif + + let host = OmniSharp#GetHost(bufnr('%')) + if type(host.job) != v:t_dict || get(host.job, 'stopped') + return '' + endif + + let sln = fnamemodify(host.sln_or_dir, ':t') + + if get(host.job, 'loaded', 0) + return sln + endif + + try + let projectsloaded = OmniSharp#project#CountLoaded() + let projectstotal = OmniSharp#project#CountTotal() + catch + " The CountLoaded and CountTotal functions are very new - catch the error + " when they don't exist + let projectsloaded = 0 + let projectstotal = 0 + endtry + return printf('%s(%d/%d)', sln, projectsloaded, projectstotal) +endfunction + +function! airline#extensions#omnisharp#init(ext) abort + call airline#parts#define_function('omnisharp', 'airline#extensions#omnisharp#server_status') + augroup airline_omnisharp + autocmd! + autocmd User OmniSharpStarted,OmniSharpReady,OmniSharpStopped AirlineRefresh! + augroup END +endfunction diff --git a/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/po.vim b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/po.vim new file mode 100755 index 0000000..4fc18d8 --- /dev/null +++ b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/po.vim @@ -0,0 +1,105 @@ +" MIT License. Copyright (c) 2013-2021 Bailey Ling, Christian Brabandt et al. +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +function! airline#extensions#po#shorten() + " Format and shorte the output of msgfmt + let b:airline_po_stats = substitute(get(b:, 'airline_po_stats', ''), ' \(message\|translation\)s*\.*', '', 'g') + let b:airline_po_stats = substitute(b:airline_po_stats, ', ', '/', 'g') + if exists("g:airline#extensions#po#displayed_limit") + let w:displayed_po_limit = g:airline#extensions#po#displayed_limit + if len(b:airline_po_stats) > w:displayed_po_limit - 1 + let b:airline_po_stats = b:airline_po_stats[0:(w:displayed_po_limit - 2)].(&encoding==?'utf-8' ? '…' : '.') + endif + endif + if strlen(get(b:, 'airline_po_stats', '')) >= 30 && airline#util#winwidth() < 150 + let fuzzy = '' + let untranslated = '' + let messages = '' + " Shorten [120 translated, 50 fuzzy, 4 untranslated] to [120T/50F/4U] + if b:airline_po_stats =~ 'fuzzy' + let fuzzy = substitute(b:airline_po_stats, '.\{-}\(\d\+\) fuzzy.*', '\1F', '') + if fuzzy == '0F' + let fuzzy = '' + endif + endif + if b:airline_po_stats =~ 'untranslated' + let untranslated = substitute(b:airline_po_stats, '.\{-}\(\d\+\) untranslated.*', '\1U', '') + if untranslated == '0U' + let untranslated = '' + endif + endif + let messages = substitute(b:airline_po_stats, '\(\d\+\) translated.*', '\1T', '') + if messages ==# '0T' + let messages = '' + endif + let b:airline_po_stats = printf('%s%s%s', fuzzy, (empty(fuzzy) || empty(untranslated) ? '' : '/'), untranslated) + if strlen(b:airline_po_stats) < 10 + let b:airline_po_stats = messages. (!empty(b:airline_po_stats) && !empty(messages) ? '/':''). b:airline_po_stats + endif + endif + let b:airline_po_stats = '['.b:airline_po_stats. '] ' +endfunction + +function! airline#extensions#po#on_winenter() + if !exists('#airline') + " airline disabled + return + endif + " only reset cache, if the window size changed + if get(b:, 'airline_winwidth', 0) != airline#util#winwidth() + let b:airline_winwidth = airline#util#winwidth() + " needs re-formatting + unlet! b:airline_po_stats + endif +endfunction + +function! s:autocmd_handler() + if exists('#airline') + unlet! b:airline_po_stats + endif +endfunction + +function! airline#extensions#po#apply(...) + if &ft ==# 'po' + call airline#extensions#prepend_to_section('z', '%{airline#extensions#po#stats()}') + " Also reset the cache variable, if a window has been split, e.g. the winwidth changed + autocmd airline BufWritePost * call s:autocmd_handler() + autocmd airline WinEnter * call airline#extensions#po#on_winenter() + endif +endfunction + +function! airline#extensions#po#stats() + if exists('b:airline_po_stats') && !empty(b:airline_po_stats) + return b:airline_po_stats + endif + + " Write stdout to null because we only want to see warnings. + if g:airline#init#is_windows + let cmd = 'msgfmt --statistics -o /NUL ' + else + let cmd = 'msgfmt --statistics -o /dev/null -- ' + endif + if g:airline#init#vim_async + call airline#async#get_msgfmt_stat(cmd, expand('%:p')) + elseif has("nvim") + call airline#async#nvim_get_msgfmt_stat(cmd, expand('%:p')) + else + let airline_po_stats = system(cmd. shellescape(expand('%:p'))) + if v:shell_error + return '' + endif + try + let b:airline_po_stats = split(airline_po_stats, '\n')[0] + catch + let b:airline_po_stats = '' + endtry + call airline#extensions#po#shorten() + endif + return get(b:, 'airline_po_stats', '') +endfunction + +function! airline#extensions#po#init(ext) + call a:ext.add_statusline_func('airline#extensions#po#apply') +endfunction diff --git a/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/poetv.vim b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/poetv.vim new file mode 100755 index 0000000..3e7c77f --- /dev/null +++ b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/poetv.vim @@ -0,0 +1,32 @@ +" MIT License. Copyright (c) 2013-2021 Bailey Ling et al. +" Plugin: https://github.com/petobens/poet_v +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +let s:spc = g:airline_symbols.space + +function! airline#extensions#poetv#init(ext) + call a:ext.add_statusline_func('airline#extensions#poetv#apply') +endfunction + +function! airline#extensions#poetv#apply(...) + if &filetype =~# 'python' + if get(g:, 'poetv_loaded', 0) + let statusline = poetv#statusline() + else + let statusline = fnamemodify($VIRTUAL_ENV, ':t') + endif + if !empty(statusline) + call airline#extensions#append_to_section('x', + \ s:spc.g:airline_right_alt_sep.s:spc.statusline) + endif + endif +endfunction + +function! airline#extensions#poetv#update() + if &filetype =~# 'python' + call airline#extensions#poetv#apply() + call airline#update_statusline() + endif +endfunction diff --git a/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/promptline.vim b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/promptline.vim new file mode 100755 index 0000000..547bdd1 --- /dev/null +++ b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/promptline.vim @@ -0,0 +1,36 @@ +" MIT License. Copyright (c) 2013-2021 Bailey Ling et al. +" Plugin: https://github.com/edkolev/promptline.vim +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +if !exists(':PromptlineSnapshot') + finish +endif + +if !exists('airline#extensions#promptline#snapshot_file') || !len('airline#extensions#promptline#snapshot_file') + finish +endif + +let s:prompt_snapshot_file = get(g:, 'airline#extensions#promptline#snapshot_file', '') +let s:color_template = get(g:, 'airline#extensions#promptline#color_template', 'normal') + +function! airline#extensions#promptline#init(ext) + call a:ext.add_theme_func('airline#extensions#promptline#set_prompt_colors') +endfunction + +function! airline#extensions#promptline#set_prompt_colors(palette) + let color_template = has_key(a:palette, s:color_template) ? s:color_template : 'normal' + let mode_palette = a:palette[color_template] + + if !has_key(g:, 'promptline_symbols') + let g:promptline_symbols = { + \ 'left' : g:airline_left_sep, + \ 'right' : g:airline_right_sep, + \ 'left_alt' : g:airline_left_alt_sep, + \ 'right_alt' : g:airline_right_alt_sep} + endif + + let promptline_theme = promptline#api#create_theme_from_airline(mode_palette) + call promptline#api#create_snapshot_with_theme(s:prompt_snapshot_file, promptline_theme) +endfunction diff --git a/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/quickfix.vim b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/quickfix.vim new file mode 100755 index 0000000..5f62042 --- /dev/null +++ b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/quickfix.vim @@ -0,0 +1,58 @@ +" MIT License. Copyright (c) 2013-2021 Bailey Ling et al. +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +if !exists('g:airline#extensions#quickfix#quickfix_text') + let g:airline#extensions#quickfix#quickfix_text = 'Quickfix' +endif + +if !exists('g:airline#extensions#quickfix#location_text') + let g:airline#extensions#quickfix#location_text = 'Location' +endif + +function! airline#extensions#quickfix#apply(...) + if &buftype == 'quickfix' + let w:airline_section_a = airline#extensions#quickfix#get_type() + let w:airline_section_b = '%{get(w:, "quickfix_title", "")}' + let w:airline_section_c = '' + let w:airline_section_x = '' + endif +endfunction + +function! airline#extensions#quickfix#init(ext) + call a:ext.add_statusline_func('airline#extensions#quickfix#apply') + call a:ext.add_inactive_statusline_func('airline#extensions#quickfix#inactive_qf_window') +endfunction + +function! airline#extensions#quickfix#inactive_qf_window(...) + if getbufvar(a:2.bufnr, '&filetype') is# 'qf' && !empty(airline#util#getwinvar(a:2.winnr, 'quickfix_title', '')) + call setwinvar(a:2.winnr, 'airline_section_c', '[%{get(w:, "quickfix_title", "")}] %f %m') + endif +endfunction + +function! airline#extensions#quickfix#get_type() + if exists("*win_getid") && exists("*getwininfo") + let dict = getwininfo(win_getid()) + if len(dict) > 0 && get(dict[0], 'quickfix', 0) && !get(dict[0], 'loclist', 0) + return g:airline#extensions#quickfix#quickfix_text + elseif len(dict) > 0 && get(dict[0], 'quickfix', 0) && get(dict[0], 'loclist', 0) + return g:airline#extensions#quickfix#location_text + endif + endif + redir => buffers + silent ls + redir END + + let nr = bufnr('%') + for buf in split(buffers, '\n') + if match(buf, '\v^\s*'.nr) > -1 + if match(buf, '\cQuickfix') > -1 + return g:airline#extensions#quickfix#quickfix_text + else + return g:airline#extensions#quickfix#location_text + endif + endif + endfor + return '' +endfunction diff --git a/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/rufo.vim b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/rufo.vim new file mode 100755 index 0000000..ffd8b12 --- /dev/null +++ b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/rufo.vim @@ -0,0 +1,38 @@ +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +if !exists('g:rufo_loaded') + finish +endif + +let s:spc = g:airline_symbols.space + +if !exists('g:airline#extensions#rufo#symbol') + let g:airline#extensions#rufo#symbol = 'RuFo' +endif + +function! airline#extensions#rufo#init(ext) + call airline#parts#define_raw('rufo', '%{airline#extensions#rufo#get_status}') + call a:ext.add_statusline_func('airline#extensions#rufo#apply') +endfunction + +function! airline#extensions#rufo#get_status() + let out = '' + if &ft == "ruby" && g:rufo_auto_formatting == 1 + let out .= s:spc.g:airline_left_alt_sep.s:spc.g:airline#extensions#rufo#symbol + endif + return out +endfunction + +" This function will be invoked just prior to the statusline getting modified. +function! airline#extensions#rufo#apply(...) + " First we check for the filetype. + if &filetype == "ruby" + " section_z. + let w:airline_section_z = get(w:, 'airline_section_z', g:airline_section_z) + + " Then we just append this extension to it, optionally using separators. + let w:airline_section_z .= '%{airline#extensions#rufo#get_status()}' + endif +endfunction diff --git a/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/scrollbar.vim b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/scrollbar.vim new file mode 100755 index 0000000..3d25a0c --- /dev/null +++ b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/scrollbar.vim @@ -0,0 +1,37 @@ +" MIT License. Copyright (c) 2013-2021 +" vim: et ts=2 sts=2 sw=2 et + +scriptencoding utf-8 + +function! airline#extensions#scrollbar#calculate() abort + if winwidth(0) > get(g:, 'airline#extensions#scrollbar#minwidth', 200) + \ && get(w:, 'airline_active', 0) + let overwrite = 0 + if &encoding ==? 'utf-8' && !get(g:, 'airline_symbols_ascii', 0) + let [left, right, middle] = [ '|', '|', '█'] + let overwrite = 1 + else + let [left, right, middle] = [ '[', ']', '-'] + endif + let spc = get(g:, 'airline_symbols.space', ' ') + let width = 20 " max width, plus one border and indicator + let perc = (line('.') + 0.0) / (line('$') + 0.0) + let before = float2nr(round(perc * width)) + if before >= 0 && line('.') == 1 + let before = 0 + let left = (overwrite ? '' : left) + endif + let after = width - before + if (after <= 1 && line('.') == line('$')) + let after = 0 + let right = (overwrite ? '' : right) + endif + return left . repeat(spc, before) . middle . repeat(spc, after) . right + else + return '' + endif +endfunction + +function! airline#extensions#scrollbar#init(ext) abort + call airline#parts#define_function('scrollbar', 'airline#extensions#scrollbar#calculate') +endfunction diff --git a/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/searchcount.vim b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/searchcount.vim new file mode 100755 index 0000000..4fc5b2a --- /dev/null +++ b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/searchcount.vim @@ -0,0 +1,56 @@ +" MIT License. Copyright (c) 2013-2021 Bailey Ling et al. +" This extension is inspired by vim-anzu . +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +if !exists('*searchcount') + finish +endif + +function! airline#extensions#searchcount#init(ext) abort + call a:ext.add_statusline_func('airline#extensions#searchcount#apply') +endfunction + +function! airline#extensions#searchcount#apply(...) abort + call airline#extensions#append_to_section('y', + \ '%{v:hlsearch ? airline#extensions#searchcount#status() : ""}') +endfunction + +function! s:search_term() + let show_search_term = get(g:, 'airline#extensions#searchcount#show_search_term', 1) + let search_term_limit = get(g:, 'airline#extensions#searchcount#search_term_limit', 8) + + if show_search_term == 0 + return '' + endif + " shorten for all width smaller than 300 (this is just a guess) + " this uses a non-breaking space, because it looks like + " a leading space is stripped :/ + return "\ua0" . '/' . airline#util#shorten(getreg('/'), 300, search_term_limit) +endfunction + +function! airline#extensions#searchcount#status() abort + try + let result = searchcount(#{recompute: 1, maxcount: -1}) + if empty(result) || result.total ==# 0 + return '' + endif + if result.incomplete ==# 1 " timed out + return printf('%s[?/??]', s:search_term()) + elseif result.incomplete ==# 2 " max count exceeded + if result.total > result.maxcount && + \ result.current > result.maxcount + return printf('%s[>%d/>%d]', s:search_term(), + \ result.current, result.total) + elseif result.total > result.maxcount + return printf('%s[%d/>%d]', s:search_term(), + \ result.current, result.total) + endif + endif + return printf('%s[%d/%d]', s:search_term(), + \ result.current, result.total) + catch + return '' + endtry +endfunction diff --git a/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/syntastic.vim b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/syntastic.vim new file mode 100755 index 0000000..831e07e --- /dev/null +++ b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/syntastic.vim @@ -0,0 +1,44 @@ +" MIT License. Copyright (c) 2013-2021 Bailey Ling et al. +" Plugin: https://github.com/vim-syntastic/syntastic +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +if !exists(':SyntasticCheck') + finish +endif + +let s:error_symbol = get(g:, 'airline#extensions#syntastic#error_symbol', 'E:') +let s:warning_symbol = get(g:, 'airline#extensions#syntastic#warning_symbol', 'W:') + +function! airline#extensions#syntastic#get_warning() + return airline#extensions#syntastic#get('warning') +endfunction + +function! airline#extensions#syntastic#get_error() + return airline#extensions#syntastic#get('error') +endfunction + +function! airline#extensions#syntastic#get(type) + let _backup = get(g:, 'syntastic_stl_format', '') + let is_err = (a:type is# 'error') + if is_err + let g:syntastic_stl_format = get(g:, 'airline#extensions#syntastic#stl_format_err', '%E{[%fe(#%e)]}') + else + let g:syntastic_stl_format = get(g:, 'airline#extensions#syntastic#stl_format_warn', '%W{[%fw(#%w)]}') + endif + let cnt = SyntasticStatuslineFlag() + if !empty(_backup) + let g:syntastic_stl_format = _backup + endif + if empty(cnt) + return '' + else + return (is_err ? s:error_symbol : s:warning_symbol).cnt + endif +endfunction + +function! airline#extensions#syntastic#init(ext) + call airline#parts#define_function('syntastic-warn', 'airline#extensions#syntastic#get_warning') + call airline#parts#define_function('syntastic-err', 'airline#extensions#syntastic#get_error') +endfunction diff --git a/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/tabline.vim b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/tabline.vim new file mode 100755 index 0000000..8450161 --- /dev/null +++ b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/tabline.vim @@ -0,0 +1,483 @@ +" MIT License. Copyright (c) 2013-2021 Bailey Ling et al. +" vim: et ts=2 sts=2 sw=2 et + +scriptencoding utf-8 + +let s:taboo = get(g:, 'airline#extensions#taboo#enabled', 1) && get(g:, 'loaded_taboo', 0) +if s:taboo + let g:taboo_tabline = 0 +endif + +let s:ctrlspace = get(g:, 'CtrlSpaceLoaded', 0) +let s:tabws = get(g:, 'tabws_loaded', 0) +let s:current_tabcnt = -1 + +" Dictionary functions are not possible in Vim9 Script, +" so use the legacy Vim Script implementation + +function! airline#extensions#tabline#init(ext) + if has('gui_running') && match(&guioptions, 'e') > -1 + set guioptions-=e + endif + + autocmd User AirlineToggledOn call s:toggle_on() + autocmd User AirlineToggledOff call s:toggle_off() + + call s:toggle_on() + call a:ext.add_theme_func('airline#extensions#tabline#load_theme') +endfunction + +function! airline#extensions#tabline#add_label(dict, type, right) + if get(g:, 'airline#extensions#tabline#show_tab_type', 1) + call a:dict.add_section_spaced('airline_tablabel'. (a:right ? '_right' : ''), + \ get(g:, 'airline#extensions#tabline#'.a:type.'_label', a:type)) + endif +endfunction + +function! airline#extensions#tabline#add_tab_label(dict) + let show_tab_count = get(g:, 'airline#extensions#tabline#show_tab_count', 1) + if show_tab_count == 2 + call a:dict.add_section_spaced('airline_tabmod', printf('%s %d/%d', "tab", tabpagenr(), tabpagenr('$'))) + elseif show_tab_count == 1 && tabpagenr('$') > 1 + call a:dict.add_section_spaced('airline_tabmod', printf('%s %d/%d', "tab", tabpagenr(), tabpagenr('$'))) + endif +endfunction + + +if !exists(":def") || !airline#util#has_vim9_script() + + " Legacy Vim Script Implementation + + function! s:toggle_off() + call airline#extensions#tabline#autoshow#off() + call airline#extensions#tabline#tabs#off() + call airline#extensions#tabline#buffers#off() + if s:ctrlspace + call airline#extensions#tabline#ctrlspace#off() + endif + if s:tabws + call airline#extensions#tabline#tabws#off() + endif + endfunction + + function! s:toggle_on() + if get(g:, 'airline_statusline_ontop', 0) + call airline#extensions#tabline#enable() + let &tabline='%!airline#statusline('.winnr().')' + return + endif + call airline#extensions#tabline#autoshow#on() + call airline#extensions#tabline#tabs#on() + call airline#extensions#tabline#buffers#on() + if s:ctrlspace + call airline#extensions#tabline#ctrlspace#on() + endif + if s:tabws + call airline#extensions#tabline#tabws#on() + endif + + set tabline=%!airline#extensions#tabline#get() + endfunction + + function! airline#extensions#tabline#load_theme(palette) + if pumvisible() + return + endif + let colors = get(a:palette, 'tabline', {}) + let tablabel = get(colors, 'airline_tablabel', a:palette.normal.airline_b) + " Theme for tabs on the left + let tab = get(colors, 'airline_tab', a:palette.inactive.airline_c) + let tabsel = get(colors, 'airline_tabsel', a:palette.normal.airline_a) + let tabtype = get(colors, 'airline_tabtype', a:palette.visual.airline_a) + let tabfill = get(colors, 'airline_tabfill', a:palette.normal.airline_c) + let tabmod = get(colors, 'airline_tabmod', a:palette.insert.airline_a) + let tabhid = get(colors, 'airline_tabhid', a:palette.normal.airline_c) + if has_key(a:palette, 'normal_modified') && has_key(a:palette.normal_modified, 'airline_c') + let tabmodu = get(colors, 'airline_tabmod_unsel', a:palette.normal_modified.airline_c) + let tabmodu_right = get(colors, 'airline_tabmod_unsel_right', a:palette.normal_modified.airline_c) + else + "Fall back to normal airline_c if modified airline_c isn't present + let tabmodu = get(colors, 'airline_tabmod_unsel', a:palette.normal.airline_c) + let tabmodu_right = get(colors, 'airline_tabmod_unsel_right', a:palette.normal.airline_c) + endif + call airline#highlighter#exec('airline_tablabel', tablabel) + call airline#highlighter#exec('airline_tab', tab) + call airline#highlighter#exec('airline_tabsel', tabsel) + call airline#highlighter#exec('airline_tabtype', tabtype) + call airline#highlighter#exec('airline_tabfill', tabfill) + call airline#highlighter#exec('airline_tabmod', tabmod) + call airline#highlighter#exec('airline_tabmod_unsel', tabmodu) + call airline#highlighter#exec('airline_tabhid', tabhid) + + " Theme for tabs on the right + " label on the right + let tablabel_r = get(colors, 'airline_tablabel', a:palette.normal.airline_b) + let tabsel_right = get(colors, 'airline_tabsel_right', a:palette.normal.airline_a) + let tab_right = get(colors, 'airline_tab_right', a:palette.inactive.airline_c) + let tabmod_right = get(colors, 'airline_tabmod_right', a:palette.insert.airline_a) + let tabhid_right = get(colors, 'airline_tabhid_right', a:palette.normal.airline_c) + call airline#highlighter#exec('airline_tablabel_right', tablabel_r) + call airline#highlighter#exec('airline_tab_right', tab_right) + call airline#highlighter#exec('airline_tabsel_right', tabsel_right) + call airline#highlighter#exec('airline_tabmod_right', tabmod_right) + call airline#highlighter#exec('airline_tabhid_right', tabhid_right) + call airline#highlighter#exec('airline_tabmod_unsel_right', tabmodu_right) + endfunction + + function! s:update_tabline(forceit) + if get(g:, 'airline#extensions#tabline#disable_refresh', 0) + return + endif + " loading a session file + " On SessionLoadPost, g:SessionLoad variable is still set :/ + if !a:forceit && get(g:, 'SessionLoad', 0) + return + endif + let match = expand('') + if pumvisible() + return + elseif !get(g:, 'airline#extensions#tabline#enabled', 0) + return + " return, if buffer matches ignore pattern or is directory (netrw) + elseif empty(match) || airline#util#ignore_buf(match) || isdirectory(match) + return + endif + call airline#util#doautocmd('BufMRUChange') + call airline#extensions#tabline#redraw() + endfunction + + function! airline#extensions#tabline#redraw() + " sometimes, the tabline is not correctly updated see #1580 + " so force redraw here + if exists(":redrawtabline") == 2 + redrawtabline + else + " Have to set a property equal to itself to get airline to re-eval. + " Setting `let &tabline=&tabline` destroys the cursor position so we + " need something less invasive. + let &ro = &ro + endif + endfunction + + function! airline#extensions#tabline#enable() + if &lines > 3 + set showtabline=2 + endif + endfunction + + + function! airline#extensions#tabline#get() + let show_buffers = get(g:, 'airline#extensions#tabline#show_buffers', 1) + let show_tabs = get(g:, 'airline#extensions#tabline#show_tabs', 1) + + let curtabcnt = tabpagenr('$') + if curtabcnt != s:current_tabcnt + let s:current_tabcnt = curtabcnt + call airline#extensions#tabline#tabs#invalidate() + call airline#extensions#tabline#buffers#invalidate() + call airline#extensions#tabline#ctrlspace#invalidate() + call airline#extensions#tabline#tabws#invalidate() + endif + + if !exists('#airline#BufAdd#*') + autocmd airline BufAdd * call update_tabline(0) + endif + if !exists('#airline#SessionLoadPost') + autocmd airline SessionLoadPost * call update_tabline(1) + endif + if s:ctrlspace + return airline#extensions#tabline#ctrlspace#get() + elseif s:tabws + return airline#extensions#tabline#tabws#get() + elseif show_buffers && curtabcnt == 1 || !show_tabs + return airline#extensions#tabline#buffers#get() + else + return airline#extensions#tabline#tabs#get() + endif + endfunction + + function! airline#extensions#tabline#title(n) + let title = '' + if s:taboo + let title = TabooTabTitle(a:n) + endif + + if empty(title) && exists('*gettabvar') + let title = gettabvar(a:n, 'title') + endif + + let formatter = get(g:, 'airline#extensions#tabline#tabtitle_formatter') + if empty(title) && formatter !=# '' && exists("*".formatter) + let title = call(formatter, [a:n]) + endif + + if empty(title) + let buflist = tabpagebuflist(a:n) + let winnr = tabpagewinnr(a:n) + let all_buffers = airline#extensions#tabline#buflist#list() + let curbuf = filter(buflist, 'index(all_buffers, v:val) != -1') + if len(curbuf) == 0 + call add(curbuf, tabpagebuflist(a:n)[0]) + endif + " a:n: -> buffer number + " curbuf: list of buffers in current tabpage + " we need the buffername in current tab page. + return airline#extensions#tabline#get_buffer_name(curbuf[0], curbuf) + endif + + return title + endfunction + + function! airline#extensions#tabline#get_buffer_name(nr, ...) + let buffers = a:0 ? a:1 : airline#extensions#tabline#buflist#list() + let formatter = get(g:, 'airline#extensions#tabline#formatter', 'default') + return airline#extensions#tabline#formatters#{formatter}#format(a:nr, buffers) + endfunction + + function! airline#extensions#tabline#new_builder() + let builder_context = { + \ 'active' : 1, + \ 'tabline' : 1, + \ 'right_sep' : get(g:, 'airline#extensions#tabline#right_sep' , g:airline_right_sep), + \ 'right_alt_sep' : get(g:, 'airline#extensions#tabline#right_alt_sep', g:airline_right_alt_sep), + \ } + if get(g:, 'airline_powerline_fonts', 0) + let builder_context.left_sep = get(g:, 'airline#extensions#tabline#left_sep' , g:airline_left_sep) + let builder_context.left_alt_sep = get(g:, 'airline#extensions#tabline#left_alt_sep' , g:airline_left_alt_sep) + else + let builder_context.left_sep = get(g:, 'airline#extensions#tabline#left_sep' , ' ') + let builder_context.left_alt_sep = get(g:, 'airline#extensions#tabline#left_alt_sep' , '|') + endif + + return airline#extensions#tabline#builder#new(builder_context) + endfunction + + function! airline#extensions#tabline#group_of_bufnr(tab_bufs, bufnr) + let cur = bufnr('%') + if cur == a:bufnr + if g:airline_detect_modified && getbufvar(a:bufnr, '&modified') + let group = 'airline_tabmod' + else + let group = 'airline_tabsel' + endif + else + if g:airline_detect_modified && getbufvar(a:bufnr, '&modified') + let group = 'airline_tabmod_unsel' + elseif index(a:tab_bufs, a:bufnr) > -1 + let group = 'airline_tab' + else + let group = 'airline_tabhid' + endif + endif + return group + endfunction + finish +else + def s:toggle_off(): void + airline#extensions#tabline#autoshow#off() + airline#extensions#tabline#tabs#off() + airline#extensions#tabline#buffers#off() + if s:ctrlspace + airline#extensions#tabline#ctrlspace#off() + endif + if s:tabws + airline#extensions#tabline#tabws#off() + endif + enddef + + def s:toggle_on(): void + if get(g:, 'airline_statusline_ontop', 0) + airline#extensions#tabline#enable() + &tabline = '%!airline#statusline(' .. winnr() .. ')' + return + endif + airline#extensions#tabline#autoshow#on() + airline#extensions#tabline#tabs#on() + airline#extensions#tabline#buffers#on() + if s:ctrlspace + airline#extensions#tabline#ctrlspace#on() + endif + if s:tabws + airline#extensions#tabline#tabws#on() + endif + &tabline = '%!airline#extensions#tabline#get()' + enddef + + def airline#extensions#tabline#load_theme(palette: dict): number + # Needs to return a number, because it is implicitly used as extern_funcref + # And funcrefs should return a value (see airline#util#exec_funcrefs()) + if pumvisible() + return 0 + endif + var colors = get(palette, 'tabline', {}) + var tablabel = get(colors, 'airline_tablabel', palette.normal.airline_b) + # Theme for tabs on the left + var tab = get(colors, 'airline_tab', palette.inactive.airline_c) + var tabsel = get(colors, 'airline_tabsel', palette.normal.airline_a) + var tabtype = get(colors, 'airline_tabtype', palette.visual.airline_a) + var tabfill = get(colors, 'airline_tabfill', palette.normal.airline_c) + var tabmod = get(colors, 'airline_tabmod', palette.insert.airline_a) + var tabhid = get(colors, 'airline_tabhid', palette.normal.airline_c) + var tabmodu = tabhid + var tabmodu_right = tabhid + if has_key(palette, 'normal_modified') && has_key(palette.normal_modified, 'airline_c') + tabmodu = get(colors, 'airline_tabmod_unsel', palette.normal_modified.airline_c) + tabmodu_right = get(colors, 'airline_tabmod_unsel_right', palette.normal_modified.airline_c) + else + # Fall back to normal airline_c if modified airline_c isn't present + tabmodu = get(colors, 'airline_tabmod_unsel', palette.normal.airline_c) + tabmodu_right = get(colors, 'airline_tabmod_unsel_right', palette.normal.airline_c) + endif + airline#highlighter#exec('airline_tablabel', tablabel) + airline#highlighter#exec('airline_tab', tab) + airline#highlighter#exec('airline_tabsel', tabsel) + airline#highlighter#exec('airline_tabtype', tabtype) + airline#highlighter#exec('airline_tabfill', tabfill) + airline#highlighter#exec('airline_tabmod', tabmod) + airline#highlighter#exec('airline_tabmod_unsel', tabmodu) + airline#highlighter#exec('airline_tabmod_unsel_right', tabmodu_right) + airline#highlighter#exec('airline_tabhid', tabhid) + # Theme for tabs on the right + var tablabel_r = get(colors, 'airline_tablabel', palette.normal.airline_b) + var tabsel_right = get(colors, 'airline_tabsel_right', palette.normal.airline_a) + var tab_right = get(colors, 'airline_tab_right', palette.inactive.airline_c) + var tabmod_right = get(colors, 'airline_tabmod_right', palette.insert.airline_a) + var tabhid_right = get(colors, 'airline_tabhid_right', palette.normal.airline_c) + airline#highlighter#exec('airline_tablabel_right', tablabel_r) + airline#highlighter#exec('airline_tab_right', tab_right) + airline#highlighter#exec('airline_tabsel_right', tabsel_right) + airline#highlighter#exec('airline_tabmod_right', tabmod_right) + airline#highlighter#exec('airline_tabhid_right', tabhid_right) + return 0 + enddef + + def s:update_tabline(forceit: number): void + if get(g:, 'airline#extensions#tabline#disable_refresh', 0) + return + endif + # loading a session file + # On SessionLoadPost, g:SessionLoad variable is still set :/ + if !forceit && get(g:, 'SessionLoad', 0) + return + endif + var match = expand('') + if pumvisible() + return + elseif !get(g:, 'airline#extensions#tabline#enabled', 0) + return + # return, if buffer matches ignore pattern or is directory (netrw) + elseif empty(match) || airline#util#ignore_buf(match) || isdirectory(match) + return + endif + airline#util#doautocmd('BufMRUChange') + airline#extensions#tabline#redraw() + enddef + + def airline#extensions#tabline#redraw(): void + # redrawtabline should always be available + :redrawtabline + enddef + + def airline#extensions#tabline#enable(): void + if &lines > 3 + &showtabline = 2 + endif + enddef + + def airline#extensions#tabline#get(): string + var show_buffers = get(g:, 'airline#extensions#tabline#show_buffers', 1) + var show_tabs = get(g:, 'airline#extensions#tabline#show_tabs', 1) + + var curtabcnt = tabpagenr('$') + if curtabcnt != s:current_tabcnt + s:current_tabcnt = curtabcnt + airline#extensions#tabline#tabs#invalidate() + airline#extensions#tabline#buffers#invalidate() + airline#extensions#tabline#ctrlspace#invalidate() + airline#extensions#tabline#tabws#invalidate() + endif + + if !exists('#airline#BufAdd#*') + autocmd airline BufAdd * call update_tabline(0) + endif + if !exists('#airline#SessionLoadPost') + autocmd airline SessionLoadPost * call update_tabline(1) + endif + if s:ctrlspace + return airline#extensions#tabline#ctrlspace#get() + elseif s:tabws + return airline#extensions#tabline#tabws#get() + elseif show_buffers && curtabcnt == 1 || !show_tabs + return airline#extensions#tabline#buffers#get() + else + return airline#extensions#tabline#tabs#get() + endif + enddef + + def airline#extensions#tabline#title(n: number): string + var title = '' + if get(g:, 'airline#extensions#taboo#enabled', 1) && + get(g:, 'loaded_taboo', 0) && exists("*TabooTabTitle") + title = call("TabooTabTitle", [n]) + endif + + if empty(title) + title = gettabvar(n, 'title') + endif + + var formatter = get(g:, 'airline#extensions#tabline#tabtitle_formatter', '') + if empty(title) && !empty(formatter) && exists("*" .. formatter) + title = call(formatter, [n]) + endif + + if empty(title) + var buflist = tabpagebuflist(n) + var winnr = tabpagewinnr(n) + var all_buffers = airline#extensions#tabline#buflist#list() + var curbuf = filter(buflist, (_, v) => index(all_buffers, v) != -1) + if len(curbuf) == 0 + add(curbuf, tabpagebuflist(n)[0]) + endif + return airline#extensions#tabline#get_buffer_name(curbuf[0], curbuf) + endif + return title + enddef + + def airline#extensions#tabline#get_buffer_name(nr: number, buffers = airline#extensions#tabline#buflist#list()): string + var Formatter = 'airline#extensions#tabline#formatters#' .. get(g:, 'airline#extensions#tabline#formatter', 'default') .. '#format' + return call(Formatter, [ nr, buffers] ) + enddef + + def airline#extensions#tabline#new_builder(): dict + var builder_context = { + 'active': 1, + 'tabline': 1, + 'right_sep': get(g:, 'airline#extensions#tabline#right_sep', g:airline_right_sep), + 'right_alt_sep': get(g:, 'airline#extensions#tabline#right_alt_sep', g:airline_right_alt_sep), + 'left_sep': get(g:, 'airline#extensions#tabline#left_sep', g:airline_left_sep), + 'left_alt_sep': get(g:, 'airline#extensions#tabline#left_alt_sep', g:airline_left_alt_sep), + } + return airline#extensions#tabline#builder#new(builder_context) + enddef + + def airline#extensions#tabline#group_of_bufnr(tab_bufs: list, bufnr: number): string + var cur = bufnr('%') + var group = '' + if cur == bufnr + if g:airline_detect_modified && getbufvar(bufnr, '&modified') + group = 'airline_tabmod' + else + group = 'airline_tabsel' + endif + else + if g:airline_detect_modified && getbufvar(bufnr, '&modified') + group = 'airline_tabmod_unsel' + elseif index(tab_bufs, bufnr) > -1 + group = 'airline_tab' + else + group = 'airline_tabhid' + endif + endif + return group + enddef +endif diff --git a/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/tabline/autoshow.vim b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/tabline/autoshow.vim new file mode 100755 index 0000000..8df8306 --- /dev/null +++ b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/tabline/autoshow.vim @@ -0,0 +1,53 @@ +" MIT License. Copyright (c) 2013-2021 Bailey Ling et al. +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +let s:show_buffers = get(g:, 'airline#extensions#tabline#show_buffers', 1) +let s:buf_min_count = get(g:, 'airline#extensions#tabline#buffer_min_count', 0) +let s:tab_min_count = get(g:, 'airline#extensions#tabline#tab_min_count', 0) + +function! airline#extensions#tabline#autoshow#off() + if exists('s:original_tabline') + let &tabline = s:original_tabline + let &showtabline = s:original_showtabline + endif + + augroup airline_tabline_autoshow + autocmd! + augroup END +endfunction + +function! airline#extensions#tabline#autoshow#on() + let [ s:original_tabline, s:original_showtabline ] = [ &tabline, &showtabline ] + + augroup airline_tabline_autoshow + autocmd! + if s:buf_min_count <= 0 && s:tab_min_count <= 1 + call airline#extensions#tabline#enable() + else + if s:show_buffers == 1 + autocmd BufEnter * call show_tabline(s:buf_min_count, len(airline#extensions#tabline#buflist#list())) + autocmd BufUnload * call show_tabline(s:buf_min_count, len(airline#extensions#tabline#buflist#list()) - 1) + else + autocmd TabNew,TabClosed * call show_tabline(s:tab_min_count, tabpagenr('$')) + endif + endif + + " Invalidate cache. This has to come after the BufUnload for + " s:show_buffers, to invalidate the cache for BufEnter. + autocmd BufLeave,BufAdd,BufUnload * call airline#extensions#tabline#buflist#invalidate() + augroup END +endfunction + +function! s:show_tabline(min_count, total_count) + if a:total_count >= a:min_count + if &showtabline != 2 && &lines > 3 + set showtabline=2 + endif + else + if &showtabline != 0 + set showtabline=0 + endif + endif +endfunction diff --git a/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/tabline/buffers.vim b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/tabline/buffers.vim new file mode 100755 index 0000000..1eb79f7 --- /dev/null +++ b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/tabline/buffers.vim @@ -0,0 +1,267 @@ +" MIT License. Copyright (c) 2013-2021 Bailey Ling et al. +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +let s:spc = g:airline_symbols.space + +let s:current_bufnr = -1 +let s:current_modified = 0 +let s:current_tabline = '' +let s:current_visible_buffers = [] + +let s:number_map = { + \ '0': '⁰', + \ '1': '¹', + \ '2': '²', + \ '3': '³', + \ '4': '⁴', + \ '5': '⁵', + \ '6': '⁶', + \ '7': '⁷', + \ '8': '⁸', + \ '9': '⁹' + \ } +let s:number_map = &encoding == 'utf-8' + \ ? get(g:, 'airline#extensions#tabline#buffer_idx_format', s:number_map) + \ : {} + +function! airline#extensions#tabline#buffers#off() + augroup airline_tabline_buffers + autocmd! + augroup END +endfunction + +function! airline#extensions#tabline#buffers#on() + let terminal_event = has("nvim") ? 'TermOpen' : 'TerminalOpen' + augroup airline_tabline_buffers + autocmd! + autocmd BufDelete * call airline#extensions#tabline#buflist#clean() + if exists("##".terminal_event) + exe 'autocmd '. terminal_event. ' * call airline#extensions#tabline#buflist#clean()' + endif + autocmd User BufMRUChange call airline#extensions#tabline#buflist#clean() + augroup END +endfunction + +function! airline#extensions#tabline#buffers#invalidate() + let s:current_bufnr = -1 +endfunction + +function! airline#extensions#tabline#buffers#get() + try + call map_keys() + catch + " no-op + endtry + let cur = bufnr('%') + if cur == s:current_bufnr && &columns == s:column_width + if !g:airline_detect_modified || getbufvar(cur, '&modified') == s:current_modified + return s:current_tabline + endif + endif + + let b = airline#extensions#tabline#new_builder() + let tab_bufs = tabpagebuflist(tabpagenr()) + let show_buf_label_first = 0 + + if get(g:, 'airline#extensions#tabline#buf_label_first', 0) + let show_buf_label_first = 1 + endif + if show_buf_label_first + call airline#extensions#tabline#add_label(b, 'buffers', 0) + endif + + let b.tab_bufs = tabpagebuflist(tabpagenr()) + + let b.overflow_group = 'airline_tabhid' + let b.buffers = airline#extensions#tabline#buflist#list() + if get(g:, 'airline#extensions#tabline#current_first', 0) + if index(b.buffers, cur) > -1 + call remove(b.buffers, index(b.buffers, cur)) + endif + let b.buffers = [cur] + b.buffers + endif + + function! b.get_group(i) dict + let bufnum = get(self.buffers, a:i, -1) + if bufnum == -1 + return '' + endif + let group = airline#extensions#tabline#group_of_bufnr(self.tab_bufs, bufnum) + if bufnum == bufnr('%') + let s:current_modified = (group == 'airline_tabmod') ? 1 : 0 + endif + return group + endfunction + + if has("tablineat") + function! b.get_pretitle(i) dict + let bufnum = get(self.buffers, a:i, -1) + return '%'.bufnum.'@airline#extensions#tabline#buffers#clickbuf@' + endfunction + + function! b.get_posttitle(i) dict + return '%X' + endfunction + endif + + function! b.get_title(i) dict + let bufnum = get(self.buffers, a:i, -1) + let group = self.get_group(a:i) + let pgroup = self.get_group(a:i - 1) + " always add a space when powerline_fonts are used + " or for the very first item + if get(g:, 'airline_powerline_fonts', 0) || a:i == 0 + let space = s:spc + else + let space= (pgroup == group ? s:spc : '') + endif + + if get(g:, 'airline#extensions#tabline#buffer_idx_mode', 0) + if len(s:number_map) > 0 + return space. s:get_number(a:i) . '%(%{airline#extensions#tabline#get_buffer_name('.bufnum.')}%)' . s:spc + else + return '['.(a:i+1).s:spc.'%(%{airline#extensions#tabline#get_buffer_name('.bufnum.')}%)'.']' + endif + else + return space.'%(%{airline#extensions#tabline#get_buffer_name('.bufnum.')}%)'.s:spc + endif + endfunction + + let current_buffer = max([index(b.buffers, cur), 0]) + let last_buffer = len(b.buffers) - 1 + call b.insert_titles(current_buffer, 0, last_buffer) + + call b.add_section('airline_tabfill', '') + call b.split() + call b.add_section('airline_tabfill', '') + if !show_buf_label_first + call airline#extensions#tabline#add_label(b, 'buffers', 1) + endif + + call airline#extensions#tabline#add_tab_label(b) + + let s:current_bufnr = cur + let s:column_width = &columns + let s:current_tabline = b.build() + let s:current_visible_buffers = copy(b.buffers) + " Do not remove from s:current_visible_buffers, this breaks s:select_tab() + "if b._right_title <= last_buffer + " call remove(s:current_visible_buffers, b._right_title, last_buffer) + "endif + "if b._left_title > 0 + " call remove(s:current_visible_buffers, 0, b._left_title) + "endif + return s:current_tabline +endfunction + +function! s:get_number(index) + if len(s:number_map) == 0 + return a:index + endif + let bidx_mode = get(g:, 'airline#extensions#tabline#buffer_idx_mode', 0) + let number_format = bidx_mode > 1 ? '%02d' : '%d' + let l:count = bidx_mode == 2 ? a:index+11 : a:index+1 + return join(map(split(printf(number_format, l:count), '\zs'), + \ 'get(s:number_map, v:val, "")'), '') +endfunction + +function! s:select_tab(buf_index) + " no-op when called in 'keymap_ignored_filetypes' + if count(get(g:, 'airline#extensions#tabline#keymap_ignored_filetypes', + \ ['vimfiler', 'nerdtree']), &ft) + return + endif + let idx = a:buf_index + if s:current_visible_buffers[0] == -1 + let idx = idx + 1 + endif + + let buf = get(s:current_visible_buffers, idx, 0) + if buf != 0 + exec 'b!' . buf + endif +endfunction + +function! s:jump_to_tab(offset) + let l = airline#extensions#tabline#buflist#list() + let i = index(l, bufnr('%')) + if i > -1 + exec 'b!' . l[(i + a:offset) % len(l)] + endif +endfunction + +function! s:map_keys() + let bidx_mode = get(g:, 'airline#extensions#tabline#buffer_idx_mode', 1) + if bidx_mode > 0 + if bidx_mode == 1 + for i in range(1, 10) + exe printf('noremap AirlineSelectTab%d :call select_tab(%d)', i%10, i-1) + endfor + else + let start_idx = bidx_mode == 2 ? 11 : 1 + for i in range(start_idx, 99) + exe printf('noremap AirlineSelectTab%02d :call select_tab(%d)', i, i-start_idx) + endfor + endif + noremap AirlineSelectPrevTab :call jump_to_tab(-v:count1) + noremap AirlineSelectNextTab :call jump_to_tab(v:count1) + " Enable this for debugging + " com! AirlineBufferList :echo map(copy(s:current_visible_buffers), {i,k -> k.": ".bufname(k)}) + endif +endfunction + +function! airline#extensions#tabline#buffers#clickbuf(minwid, clicks, button, modifiers) abort + " Clickable buffers + " works only in recent NeoVim with has('tablineat') + + " single mouse button click without modifiers pressed + if a:clicks == 1 && a:modifiers !~# '[^ ]' + if a:button is# 'l' + " left button - switch to buffer + try + silent execute 'buffer' a:minwid + catch + call airline#util#warning("Cannot switch buffer, current buffer is modified! See :h 'hidden'") + endtry + elseif a:button is# 'm' + " middle button - delete buffer + + if get(g:, 'airline#extensions#tabline#middle_click_preserves_windows', 0) == 0 || winnr('$') == 1 + " just simply delete the clicked buffer. This will cause windows + " associated with the clicked buffer to be closed. + silent execute 'bdelete' a:minwid + else + " find windows displaying the clicked buffer and open an new + " buffer in them. + let current_window = bufwinnr("%") + let window_number = bufwinnr(a:minwid) + let last_window_visited = -1 + + " Set to 1 if the clicked buffer was open in any windows. + let buffer_in_window = 0 + + " Find the next window with the clicked buffer open. If bufwinnr() + " returns the same window number, this is because we clicked a new + " buffer, and then tried editing a new buffer. Vim won't create a + " new empty buffer for the same window, so we get the same window + " number from bufwinnr(). In this case we just give up and don't + " delete the buffer. + " This could be made cleaner if we could check if the clicked buffer + " is a new buffer, but I don't know if there is a way to do that. + while window_number != -1 && window_number != last_window_visited + let buffer_in_window = 1 + silent execute window_number . 'wincmd w' + silent execute 'enew' + let last_window_visited = window_number + let window_number = bufwinnr(a:minwid) + endwhile + silent execute current_window . 'wincmd w' + if window_number != last_window_visited || buffer_in_window == 0 + silent execute 'bdelete' a:minwid + endif + endif + endif + endif +endfunction diff --git a/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/tabline/buflist.vim b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/tabline/buflist.vim new file mode 100755 index 0000000..f772201 --- /dev/null +++ b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/tabline/buflist.vim @@ -0,0 +1,85 @@ +" MIT License. Copyright (c) 2013-2021 Bailey Ling et al. +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +function! airline#extensions#tabline#buflist#invalidate() + unlet! s:current_buffer_list +endfunction + +function! airline#extensions#tabline#buflist#clean() + if !exists('#airline') + " airline disabled + return + endif + call airline#extensions#tabline#buflist#invalidate() + call airline#extensions#tabline#buffers#invalidate() +endfunction + +" paths in excludes list +function! s:ExcludePaths(nr, exclude_paths) + let bname = bufname(a:nr) + if empty(bname) + return 0 + endif + let bpath = fnamemodify(bname, ":p") + for f in a:exclude_paths + if bpath =~# f | return 1 | endif + endfor +endfunction + +" other types to exclude +function! s:ExcludeOther(nr, exclude_preview) + if (getbufvar(a:nr, 'current_syntax') == 'qf') || + \ (a:exclude_preview && getbufvar(a:nr, '&bufhidden') == 'wipe' + \ && getbufvar(a:nr, '&buftype') == 'nofile') + return 1 | endif +endfunction + +function! airline#extensions#tabline#buflist#list() + if exists('s:current_buffer_list') + return s:current_buffer_list + endif + + let exclude_buffers = get(g:, 'airline#extensions#tabline#exclude_buffers', []) + let exclude_paths = get(g:, 'airline#extensions#tabline#excludes', []) + let exclude_preview = get(g:, 'airline#extensions#tabline#exclude_preview', 1) + + let list = (exists('g:did_bufmru') && g:did_bufmru) ? BufMRUList() : range(1, bufnr("$")) + + let buffers = [] + " If this is too slow, we can switch to a different algorithm. + " Basically branch 535 already does it, but since it relies on + " BufAdd autocommand, I'd like to avoid this if possible. + for nr in list + if buflisted(nr) + " Do not add to the bufferlist, if either + " 1) bufnr is exclude_buffers list + " 2) buffername matches one of exclude_paths patterns + " 3) buffer is a quickfix buffer + " 4) when excluding preview windows: + " 'bufhidden' == wipe + " 'buftype' == nofile + " 5) ignore buffers matching airline#extensions#tabline#ignore_bufadd_pat + + " check buffer numbers first + if index(exclude_buffers, nr) >= 0 + continue + " check paths second + elseif !empty(exclude_paths) && s:ExcludePaths(nr, exclude_paths) + continue + " ignore buffers matching airline#extensions#tabline#ignore_bufadd_pat + elseif airline#util#ignore_buf(bufname(nr)) + continue + " check other types last + elseif s:ExcludeOther(nr, exclude_preview) + continue + endif + + call add(buffers, nr) + endif + endfor + + let s:current_buffer_list = buffers + return buffers +endfunction diff --git a/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/tabline/builder.vim b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/tabline/builder.vim new file mode 100755 index 0000000..35ebe51 --- /dev/null +++ b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/tabline/builder.vim @@ -0,0 +1,232 @@ +" MIT License. Copyright (c) 2013-2021 Bailey Ling et al. +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +let s:prototype = {} + +" Set the point in the tabline where the builder should insert the titles. +" +" Subsequent calls will overwrite the previous ones, so only the last call +" determines to location to insert titles. +" +" NOTE: The titles are not inserted until |build| is called, so that the +" remaining contents of the tabline can be taken into account. +" +" Callers should define at least |get_title| and |get_group| on the host +" object before calling |build|. +function! s:prototype.insert_titles(current, first, last) dict + let self._first_title = a:first " lowest index + let self._last_title = a:last " highest index + let self._left_title = a:current " next index to add on the left + let self._right_title = a:current + 1 " next index to add on the right + let self._left_position = self.get_position() " left end of titles + let self._right_position = self._left_position " right end of the titles +endfunction + +" Insert a title for entry number |index|, of group |group| at position |pos|, +" if there is space for it. Returns 1 if it is inserted, 0 otherwise +" +" |force| inserts the title even if there isn't enough space left for it. +" |sep_size| adjusts the size change that the title is considered to take up, +" to account for changes to the separators +" +" The title is defined by |get_title| on the hosting object, called with +" |index| as its only argument. +" |get_pretitle| and |get_posttitle| may be defined on the host object to +" insert some formatting before or after the title. These should be 0-width. +" +" This method updates |_right_position| and |_remaining_space| on the host +" object, if the title is inserted. +function! s:prototype.try_insert_title(index, group, pos, sep_size, force) dict + let title = self.get_title(a:index) + let title_size = s:tabline_evaluated_length(title) + a:sep_size + if a:force || self._remaining_space >= title_size + let pos = a:pos + if has_key(self, "get_pretitle") + call self.insert_raw(self.get_pretitle(a:index), pos) + let self._right_position += 1 + let pos += 1 + endif + + call self.insert_section(a:group, title, pos) + let self._right_position += 1 + let pos += 1 + + if has_key(self, "get_posttitle") + call self.insert_raw(self.get_posttitle(a:index), pos) + let self._right_position += 1 + let pos += 1 + endif + + let self._remaining_space -= title_size + return 1 + endif + return 0 +endfunction + +function! s:get_separator_change(new_group, old_group, end_group, sep_size, alt_sep_size) + return s:get_separator_change_with_end(a:new_group, a:old_group, a:end_group, a:end_group, a:sep_size, a:alt_sep_size) +endfunction + +" Compute the change in size of the tabline caused by separators +" +" This should be kept up-to-date with |s:get_transitioned_separator| and +" |s:get_separator| in autoload/airline/builder.vim +function! s:get_separator_change_with_end(new_group, old_group, new_end_group, old_end_group, sep_size, alt_sep_size) + let sep_change = 0 + if !empty(a:new_end_group) " Separator between title and the end + let sep_change += airline#builder#should_change_group(a:new_group, a:new_end_group) ? a:sep_size : a:alt_sep_size + endif + if !empty(a:old_group) " Separator between the title and the one adjacent + let sep_change += airline#builder#should_change_group(a:new_group, a:old_group) ? a:sep_size : a:alt_sep_size + if !empty(a:old_end_group) " Remove mis-predicted separator + let sep_change -= airline#builder#should_change_group(a:old_group, a:old_end_group) ? a:sep_size : a:alt_sep_size + endif + endif + return sep_change +endfunction + +" This replaces the build function of the |airline#builder#new| object, to +" insert titles as specified by the last call to |insert_titles| before +" passing to the original build function. +" +" Callers should define at least |get_title| and |get_group| on the host +" object if |insert_titles| has been called on it. +function! s:prototype.build() dict + if has_key(self, '_left_position') && self._first_title <= self._last_title + let self._remaining_space = &columns - s:tabline_evaluated_length(self._build()) + + let center_active = get(g:, 'airline#extensions#tabline#center_active', 0) + + let sep_size = s:tabline_evaluated_length(self._context.left_sep) + let alt_sep_size = s:tabline_evaluated_length(self._context.left_alt_sep) + + let outer_left_group = airline#builder#get_prev_group(self._sections, self._left_position) + let outer_right_group = airline#builder#get_next_group(self._sections, self._right_position) + + let overflow_marker = get(g:, 'airline#extensions#tabline#overflow_marker', g:airline_symbols.ellipsis) + let overflow_marker_size = s:tabline_evaluated_length(overflow_marker) + " Allow space for the markers before we begin filling in titles. + if self._left_title > self._first_title + let self._remaining_space -= overflow_marker_size + + \ s:get_separator_change(self.overflow_group, "", outer_left_group, sep_size, alt_sep_size) + endif + if self._left_title < self._last_title + let self._remaining_space -= overflow_marker_size + + \ s:get_separator_change(self.overflow_group, "", outer_right_group, sep_size, alt_sep_size) + endif + + " Add the current title + let group = self.get_group(self._left_title) + if self._left_title == self._first_title + let sep_change = s:get_separator_change(group, "", outer_left_group, sep_size, alt_sep_size) + else + let sep_change = s:get_separator_change(group, "", self.overflow_group, sep_size, alt_sep_size) + endif + if self._left_title == self._last_title + let sep_change += s:get_separator_change(group, "", outer_right_group, sep_size, alt_sep_size) + else + let sep_change += s:get_separator_change(group, "", self.overflow_group, sep_size, alt_sep_size) + endif + let left_group = group + let right_group = group + let self._left_title -= + \ self.try_insert_title(self._left_title, group, self._left_position, sep_change, 1) + + if get(g:, 'airline#extensions#tabline#current_first', 0) + " always have current title first + let self._left_position += 1 + endif + + if !center_active && self._right_title <= self._last_title + " Add the title to the right + let group = self.get_group(self._right_title) + if self._right_title == self._last_title + let sep_change = s:get_separator_change_with_end(group, right_group, outer_right_group, self.overflow_group, sep_size, alt_sep_size) - overflow_marker_size + else + let sep_change = s:get_separator_change(group, right_group, self.overflow_group, sep_size, alt_sep_size) + endif + let right_group = group + let self._right_title += + \ self.try_insert_title(self._right_title, group, self._right_position, sep_change, 1) + endif + + while self._remaining_space > 0 + let done = 0 + if self._left_title >= self._first_title + " Insert next title to the left + let group = self.get_group(self._left_title) + if self._left_title == self._first_title + let sep_change = s:get_separator_change_with_end(group, left_group, outer_left_group, self.overflow_group, sep_size, alt_sep_size) - overflow_marker_size + else + let sep_change = s:get_separator_change(group, left_group, self.overflow_group, sep_size, alt_sep_size) + endif + let left_group = group + let done = self.try_insert_title(self._left_title, group, self._left_position, sep_change, 0) + let self._left_title -= done + endif + " If center_active is set, this |if| operates as an independent |if|, + " otherwise as an |elif|. + if self._right_title <= self._last_title && (center_active || !done) + " Insert next title to the right + let group = self.get_group(self._right_title) + if self._right_title == self._last_title + let sep_change = s:get_separator_change_with_end(group, right_group, outer_right_group, self.overflow_group, sep_size, alt_sep_size) - overflow_marker_size + else + let sep_change = s:get_separator_change(group, right_group, self.overflow_group, sep_size, alt_sep_size) + endif + let right_group = group + let done = self.try_insert_title(self._right_title, group, self._right_position, sep_change, 0) + let self._right_title += done + endif + if !done + break + endif + endwhile + + if self._left_title >= self._first_title + if get(g:, 'airline#extensions#tabline#current_first', 0) + let self._left_position -= 1 + endif + call self.insert_section(self.overflow_group, overflow_marker, self._left_position) + let self._right_position += 1 + endif + + if self._right_title <= self._last_title + call self.insert_section(self.overflow_group, overflow_marker, self._right_position) + endif + endif + + return self._build() +endfunction + +let s:prototype.overflow_group = 'airline_tab' + +" Extract the text content a tabline will render. (Incomplete). +" +" See :help 'statusline' for the list of fields. +function! s:evaluate_tabline(tabline) + let tabline = a:tabline + let tabline = substitute(tabline, '%{\([^}]\+\)}', '\=eval(submatch(1))', 'g') + let tabline = substitute(tabline, '%#[^#]\+#', '', 'g') + let tabline = substitute(tabline, '%(\([^)]\+\)%)', '\1', 'g') + let tabline = substitute(tabline, '%\d\+[TX]', '', 'g') + let tabline = substitute(tabline, '%=', '', 'g') + let tabline = substitute(tabline, '%\d*\*', '', 'g') + if has('tablineat') + let tabline = substitute(tabline, '%@[^@]\+@', '', 'g') + endif + return tabline +endfunction + +function! s:tabline_evaluated_length(tabline) + return airline#util#strchars(s:evaluate_tabline(a:tabline)) +endfunction + +function! airline#extensions#tabline#builder#new(context) + let builder = airline#builder#new(a:context) + let builder._build = builder.build + call extend(builder, s:prototype, 'force') + return builder +endfunction diff --git a/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/tabline/ctrlspace.vim b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/tabline/ctrlspace.vim new file mode 100755 index 0000000..feab460 --- /dev/null +++ b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/tabline/ctrlspace.vim @@ -0,0 +1,169 @@ +" MIT License. Copyright (c) 2016-2021 Kevin Sapper et al. +" Plugin: https://github.com/szw/vim-ctrlspace +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +let s:current_bufnr = -1 +let s:current_modified = 0 +let s:current_tabnr = -1 +let s:current_tabline = '' +let s:highlight_groups = ['hid', 0, '', 'sel', 'mod_unsel', 0, 'mod_unsel', 'mod'] + +function! airline#extensions#tabline#ctrlspace#off() + augroup airline_tabline_ctrlspace + autocmd! + augroup END +endfunction + +function! airline#extensions#tabline#ctrlspace#on() + augroup airline_tabline_ctrlspace + autocmd! + autocmd BufDelete * call airline#extensions#tabline#ctrlspace#invalidate() + augroup END +endfunction + +function! airline#extensions#tabline#ctrlspace#invalidate() + if !exists('#airline') + return + endif + let s:current_bufnr = -1 + let s:current_tabnr = -1 +endfunction + +function! airline#extensions#tabline#ctrlspace#add_buffer_section(builder, cur_tab, cur_buf, pull_right) + let pos_extension = (a:pull_right ? '_right' : '') + + let buffer_list = [] + for bufferindex in sort(keys(ctrlspace#api#Buffers(a:cur_tab)), 'N') + for buffer in ctrlspace#api#BufferList(a:cur_tab) + if buffer['index'] == bufferindex + call add(buffer_list, buffer) + endif + endfor + endfor + + " add by tenfy(tenfyzhong@qq.com) + " if the current buffer no in the buffer list + " return false and no redraw tabline. + " Fixes #1515. if there a BufEnter autocmd execute redraw. The tabline may no update. + let bufnr_list = map(copy(buffer_list), 'v:val["index"]') + if index(bufnr_list, a:cur_buf) == -1 && a:cur_tab == s:current_tabnr + return 0 + endif + + let s:current_modified = getbufvar(a:cur_buf, '&modified') + + for buffer in buffer_list + let group = 'airline_tab' + \ .s:highlight_groups[(4 * buffer.modified) + (2 * buffer.visible) + (a:cur_buf == buffer.index)] + \ .pos_extension + + let buf_name = '%(%{airline#extensions#tabline#get_buffer_name('.buffer.index.')}%)' + + if has("tablineat") + let buf_name = '%'.buffer.index.'@airline#extensions#tabline#buffers#clickbuf@'.buf_name.'%X' + endif + + call a:builder.add_section_spaced(group, buf_name) + endfor + + " add by tenfy(tenfyzhong@qq.com) + " if the selected buffer was updated + " return true + return 1 +endfunction + +function! airline#extensions#tabline#ctrlspace#add_tab_section(builder, pull_right) + let pos_extension = (a:pull_right ? '_right' : '') + let tab_list = ctrlspace#api#TabList() + + for tab in tab_list + let group = 'airline_tab' + \ .s:highlight_groups[(4 * tab.modified) + (3 * tab.current)] + \ .pos_extension + + if get(g:, 'airline#extensions#tabline#ctrlspace_show_tab_nr', 0) == 0 + call a:builder.add_section_spaced(group, '%'.tab.index.'T'.tab.title.ctrlspace#api#TabBuffersNumber(tab.index).'%T') + else + call a:builder.add_section_spaced(group, '%'.(tab.index).'T'.(tab.index).(g:airline_symbols.space).(tab.title).ctrlspace#api#TabBuffersNumber(tab.index).'%T') + endif + endfor +endfunction + +function! airline#extensions#tabline#ctrlspace#get() + let cur_buf = bufnr('%') + let buffer_label = get(g:, 'airline#extensions#tabline#buffers_label', 'buffers') + let tab_label = get(g:, 'airline#extensions#tabline#tabs_label', 'tabs') + let switch_buffers_and_tabs = get(g:, 'airline#extensions#tabline#switch_buffers_and_tabs', 0) + + try + call airline#extensions#tabline#tabs#map_keys() + endtry + + let cur_tab = tabpagenr() + + if cur_buf == s:current_bufnr && cur_tab == s:current_tabnr + if !g:airline_detect_modified || getbufvar(cur_buf, '&modified') == s:current_modified + return s:current_tabline + endif + endif + + let builder = airline#extensions#tabline#new_builder() + + let show_buffers = get(g:, 'airline#extensions#tabline#show_buffers', 1) + let show_tabs = get(g:, 'airline#extensions#tabline#show_tabs', 1) + + let AppendBuffers = function('airline#extensions#tabline#ctrlspace#add_buffer_section', [builder, cur_tab, cur_buf]) + let AppendTabs = function('airline#extensions#tabline#ctrlspace#add_tab_section', [builder]) + let AppendLabel = function(builder.add_section_spaced, ['airline_tabtype'], builder) + + " <= 1: |{Tabs} {Buffers} {Tabs} fnametruncate + let _ = airline#util#strcharpart(_, 0, fnametruncate) + endif + endif + + return airline#extensions#tabline#formatters#default#wrap_name(a:bufnr, _) + endfunction + + function! airline#extensions#tabline#formatters#default#wrap_name(bufnr, buffer_name) + let buf_nr_format = get(g:, 'airline#extensions#tabline#buffer_nr_format', '%s: ') + let buf_nr_show = get(g:, 'airline#extensions#tabline#buffer_nr_show', 0) + + let _ = buf_nr_show ? printf(buf_nr_format, a:bufnr) : '' + let _ .= substitute(a:buffer_name, '\\', '/', 'g') + + if getbufvar(a:bufnr, '&modified') == 1 + let _ .= g:airline_symbols.modified + endif + return _ + endfunction + finish +else + " Vim9 Script implementation + def airline#extensions#tabline#formatters#default#format(bufnr: number, buffers: list): string + var fnametruncate = get(g:, 'airline#extensions#tabline#fnametruncate', 0) + var fmod = get(g:, 'airline#extensions#tabline#fnamemod', ':~:.') + var result = '' + + var name = bufname(bufnr) + if empty(name) + result = '[No Name]' + elseif name =~ 'term://' + # Neovim Terminal + result = substitute(name, '\(term:\)//.*:\(.*\)', '\1 \2', '') + else + if get(g:, 'airline#extensions#tabline#fnamecollapse', 1) + result = pathshorten(fnamemodify(name, fmod)) + else + result = fnamemodify(name, fmod) + endif + if bufnr != bufnr('%') && fnametruncate && strlen(result) > fnametruncate + result = airline#util#strcharpart(result, 0, fnametruncate) + endif + endif + return airline#extensions#tabline#formatters#default#wrap_name(bufnr, result) + enddef + + def airline#extensions#tabline#formatters#default#wrap_name(bufnr: number, buffer_name: string): string + var buf_nr_format = get(g:, 'airline#extensions#tabline#buffer_nr_format', '%s: ') + var buf_nr_show = get(g:, 'airline#extensions#tabline#buffer_nr_show', 0) + + var result = buf_nr_show ? printf(buf_nr_format, bufnr) : '' + result ..= substitute(buffer_name, '\\', '/', 'g') + + if getbufvar(bufnr, '&modified') + result ..= g:airline_symbols.modified + endif + return result + enddef +endif diff --git a/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/tabline/formatters/jsformatter.vim b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/tabline/formatters/jsformatter.vim new file mode 100755 index 0000000..6f364ec --- /dev/null +++ b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/tabline/formatters/jsformatter.vim @@ -0,0 +1,15 @@ +" MIT License. Copyright (c) 2013-2021 Bailey Ling et al. +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +function! airline#extensions#tabline#formatters#jsformatter#format(bufnr, buffers) + let buf = bufname(a:bufnr) + let filename = fnamemodify(buf, ':t') + + if filename ==# 'index.js' || filename ==# 'index.jsx' || filename ==# 'index.ts' || filename ==# 'index.tsx' || filename ==# 'index.vue' + return fnamemodify(buf, ':p:h:t') . '/i' + else + return airline#extensions#tabline#formatters#unique_tail_improved#format(a:bufnr, a:buffers) + endif +endfunction diff --git a/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/tabline/formatters/short_path.vim b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/tabline/formatters/short_path.vim new file mode 100755 index 0000000..1cb6027 --- /dev/null +++ b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/tabline/formatters/short_path.vim @@ -0,0 +1,21 @@ +" MIT License. Copyright (c) 2013-2021 Bailey Ling et al. +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +function! airline#extensions#tabline#formatters#short_path#format(bufnr, buffers) + let fmod = get(g:, 'airline#extensions#tabline#fnamemod', ':p:h:t') + let _ = '' + + let name = bufname(a:bufnr) + if empty(name) + let _ .= '[No Name]' + elseif name =~ 'term://' + " Neovim Terminal + let _ = substitute(name, '\(term:\)//.*:\(.*\)', '\1 \2', '') + else + let _ .= fnamemodify(name, fmod) . '/' . fnamemodify(name, ':t') + endif + + return airline#extensions#tabline#formatters#default#wrap_name(a:bufnr, _) +endfunction diff --git a/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/tabline/formatters/short_path_improved.vim b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/tabline/formatters/short_path_improved.vim new file mode 100755 index 0000000..0b00328 --- /dev/null +++ b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/tabline/formatters/short_path_improved.vim @@ -0,0 +1,36 @@ +" MIT License. Copyright (c) 2013-2021 Bailey Ling et al. +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +function! airline#extensions#tabline#formatters#short_path_improved#format(bufnr, buffers) abort + let name = bufname(a:bufnr) + if empty(name) + return airline#extensions#tabline#formatters#default#wrap_name(a:bufnr, '[No Name]') + endif + + let tail = s:tail(a:bufnr) + let tails = s:tails(a:bufnr, a:buffers) + + if has_key(tails, tail) + " Use short path for duplicates + return airline#extensions#tabline#formatters#short_path#format(a:bufnr, a:buffers) + endif + + " Use tail for unique filenames + return airline#extensions#tabline#formatters#default#wrap_name(a:bufnr, tail) +endfunction + +function! s:tails(self, buffers) abort + let tails = {} + for nr in a:buffers + if nr != a:self + let tails[s:tail(nr)] = 1 + endif + endfor + return tails +endfunction + +function! s:tail(bufnr) abort + return fnamemodify(bufname(a:bufnr), ':t') +endfunction diff --git a/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/tabline/formatters/tabnr.vim b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/tabline/formatters/tabnr.vim new file mode 100755 index 0000000..516c3bd --- /dev/null +++ b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/tabline/formatters/tabnr.vim @@ -0,0 +1,20 @@ +" MIT License. Copyright (c) 2017-2021 Christian Brabandt et al. +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +function! airline#extensions#tabline#formatters#tabnr#format(tab_nr, buflist) + let spc=g:airline_symbols.space + let tab_nr_type = get(g:, 'airline#extensions#tabline#tab_nr_type', 0) + if tab_nr_type == 0 " nr of splits + " TODO: This doesn't seem to be the actual number of splits, + " but seems to behave like what users expect. + return spc. len(tabpagebuflist(a:buflist[0])) + elseif tab_nr_type == 1 " tab number + " Return only the current tab number + return spc. a:tab_nr + else " tab_nr_type == 2 splits and tab number + " return the tab number followed by the number of buffers (in the tab) + return spc. a:tab_nr. spc. len(tabpagebuflist(a:buflist[0])) + endif +endfunction diff --git a/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/tabline/formatters/unique_tail.vim b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/tabline/formatters/unique_tail.vim new file mode 100755 index 0000000..4d065f3 --- /dev/null +++ b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/tabline/formatters/unique_tail.vim @@ -0,0 +1,46 @@ +" MIT License. Copyright (c) 2013-2021 Bailey Ling et al. +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +function! airline#extensions#tabline#formatters#unique_tail#format(bufnr, buffers) + let duplicates = {} + let tails = {} + let map = {} + for nr in a:buffers + let name = bufname(nr) + if empty(name) + let map[nr] = airline#extensions#tabline#formatters#default#wrap_name(nr, '[No Name]') + else + if name =~ 'term://' + " Neovim Terminal + let tail = substitute(name, '\(term:\)//.*:\(.*\)', '\1 \2', '') + else + let tail = fnamemodify(name, ':s?/\+$??:t') + endif + if has_key(tails, tail) + let duplicates[nr] = nr + endif + let tails[tail] = 1 + let map[nr] = airline#extensions#tabline#formatters#default#wrap_name(nr, tail) + endif + endfor + + let fmod = get(g:, 'airline#extensions#tabline#fnamemod', ':p:.') + for nr in values(duplicates) + let name = bufname(nr) + let fnamecollapse = get(g:, 'airline#extensions#tabline#fnamecollapse', 1) + if fnamecollapse + let map[nr] = airline#extensions#tabline#formatters#default#wrap_name(nr, substitute(fnamemodify(name, fmod), '\v\w\zs.{-}\ze(\\|/)', '', 'g')) + else + let map[nr] = airline#extensions#tabline#formatters#default#wrap_name(nr, fnamemodify(name, fmod)) + endif + endfor + + if has_key(map, a:bufnr) + return map[a:bufnr] + endif + + " if we get here, the buffer list isn't in sync with the selected buffer yet, fall back to the default + return airline#extensions#tabline#formatters#default#format(a:bufnr, a:buffers) +endfunction diff --git a/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/tabline/formatters/unique_tail_improved.vim b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/tabline/formatters/unique_tail_improved.vim new file mode 100755 index 0000000..e44ac2d --- /dev/null +++ b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/tabline/formatters/unique_tail_improved.vim @@ -0,0 +1,91 @@ +" MIT License. Copyright (c) 2013-2021 Bailey Ling et al. +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +let s:skip_symbol = '…' + +function! airline#extensions#tabline#formatters#unique_tail_improved#format(bufnr, buffers) + if len(a:buffers) <= 1 " don't need to compare bufnames if has less than one buffer opened + return airline#extensions#tabline#formatters#default#format(a:bufnr, a:buffers) + endif + + let curbuf_tail = fnamemodify(bufname(a:bufnr), ':t') + let do_deduplicate = 0 + let path_tokens = {} + + for nr in a:buffers + let name = bufname(nr) + if !empty(name) && nr != a:bufnr && fnamemodify(name, ':t') == curbuf_tail " only perform actions if curbuf_tail isn't unique + let do_deduplicate = 1 + let tokens = reverse(split(substitute(fnamemodify(name, ':p:h'), '\\', '/', 'g'), '/')) + let token_index = 0 + for token in tokens + if token == '' | continue | endif + if token == '.' | break | endif + if !has_key(path_tokens, token_index) + let path_tokens[token_index] = {} + endif + let path_tokens[token_index][token] = 1 + let token_index += 1 + endfor + endif + endfor + + if do_deduplicate == 1 + let path = [] + let token_index = 0 + for token in reverse(split(substitute(fnamemodify(bufname(a:bufnr), ':p:h'), '\\', '/', 'g'), '/')) + if token == '.' | break | endif + let duplicated = 0 + let uniq = 1 + let single = 1 + if has_key(path_tokens, token_index) + let duplicated = 1 + if len(keys(path_tokens[token_index])) > 1 | let single = 0 | endif + if has_key(path_tokens[token_index], token) | let uniq = 0 | endif + endif + call insert(path, {'token': token, 'duplicated': duplicated, 'uniq': uniq, 'single': single}) + let token_index += 1 + endfor + + let buf_name = [curbuf_tail] + let has_uniq = 0 + let has_skipped = 0 + for token1 in reverse(path) + if !token1['duplicated'] && len(buf_name) > 1 + call insert(buf_name, s:skip_symbol) + let has_skipped = 0 + break + endif + + if has_uniq == 1 + call insert(buf_name, s:skip_symbol) + let has_skipped = 0 + break + endif + + if token1['uniq'] == 0 && token1['single'] == 1 + let has_skipped = 1 + else + if has_skipped == 1 + call insert(buf_name, s:skip_symbol) + let has_skipped = 0 + endif + call insert(buf_name, token1['token']) + endif + + if token1['uniq'] == 1 + let has_uniq = 1 + endif + endfor + + if has_skipped == 1 + call insert(buf_name, s:skip_symbol) + endif + + return airline#extensions#tabline#formatters#default#wrap_name(a:bufnr, join(buf_name, '/')) + else + return airline#extensions#tabline#formatters#default#format(a:bufnr, a:buffers) + endif +endfunction diff --git a/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/tabline/tabs.vim b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/tabline/tabs.vim new file mode 100755 index 0000000..f32fd63 --- /dev/null +++ b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/tabline/tabs.vim @@ -0,0 +1,141 @@ +" MIT License. Copyright (c) 2013-2021 Bailey Ling et al. +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +let s:spc = g:airline_symbols.space +let s:current_bufnr = -1 +let s:current_tabnr = -1 +let s:current_modified = 0 + +function! airline#extensions#tabline#tabs#off() + augroup airline_tabline_tabs + autocmd! + augroup END +endfunction + +function! airline#extensions#tabline#tabs#on() + augroup airline_tabline_tabs + autocmd! + autocmd BufDelete * call airline#extensions#tabline#tabs#invalidate() + augroup END +endfunction + +function! airline#extensions#tabline#tabs#invalidate() + if exists('#airline') + let s:current_bufnr = -1 + endif +endfunction + +function! airline#extensions#tabline#tabs#get() + let curbuf = bufnr('%') + let curtab = tabpagenr() + try + call airline#extensions#tabline#tabs#map_keys() + catch + " no-op + endtry + if curbuf == s:current_bufnr && curtab == s:current_tabnr && &columns == s:column_width + if !g:airline_detect_modified || getbufvar(curbuf, '&modified') == s:current_modified + return s:current_tabline + endif + endif + + let s:filtered_buflist = airline#extensions#tabline#buflist#list() + + let b = airline#extensions#tabline#new_builder() + + call airline#extensions#tabline#add_label(b, 'tabs', 0) + + function! b.get_group(i) dict + let curtab = tabpagenr() + let group = 'airline_tab' + if a:i == curtab + let group = 'airline_tabsel' + if g:airline_detect_modified + for bi in tabpagebuflist(curtab) + if index(s:filtered_buflist,bi) != -1 + if getbufvar(bi, '&modified') + let group = 'airline_tabmod' + endif + endif + endfor + endif + let s:current_modified = (group == 'airline_tabmod') ? 1 : 0 + endif + return group + endfunction + + function! b.get_title(i) dict + let val = '%(' + + if get(g:, 'airline#extensions#tabline#show_tab_nr', 1) + let val .= airline#extensions#tabline#tabs#tabnr_formatter(a:i, tabpagebuflist(a:i)) + endif + + return val.'%'.a:i.'T %{airline#extensions#tabline#title('.a:i.')} %)' + endfunction + + call b.insert_titles(curtab, 1, tabpagenr('$')) + + call b.add_section('airline_tabfill', '') + call b.split() + call b.add_section('airline_tabfill', '') + + if get(g:, 'airline#extensions#tabline#show_close_button', 1) + call b.add_section('airline_tab_right', ' %999X'. + \ get(g:, 'airline#extensions#tabline#close_symbol', 'X').'%X ') + endif + + if get(g:, 'airline#extensions#tabline#show_splits', 1) == 1 + let buffers = tabpagebuflist(curtab) + for nr in buffers + if index(s:filtered_buflist,nr) != -1 + let group = airline#extensions#tabline#group_of_bufnr(buffers, nr) . "_right" + call b.add_section_spaced(group, '%(%{airline#extensions#tabline#get_buffer_name('.nr.')}%)') + endif + endfor + if get(g:, 'airline#extensions#tabline#show_buffers', 1) + call airline#extensions#tabline#add_label(b, 'buffers', 1) + endif + endif + call airline#extensions#tabline#add_tab_label(b) + + let s:current_bufnr = curbuf + let s:current_tabnr = curtab + let s:column_width = &columns + let s:current_tabline = b.build() + return s:current_tabline +endfunction + +function! airline#extensions#tabline#tabs#map_keys() + if maparg('AirlineSelectTab1', 'n') is# ':1tabn' + return + endif + let bidx_mode = get(g:, 'airline#extensions#tabline#buffer_idx_mode', 1) + if bidx_mode == 1 + for i in range(1, 10) + exe printf('noremap AirlineSelectTab%d :%dtabn', i%10, i) + endfor + else + for i in range(11, 99) + exe printf('noremap AirlineSelectTab%d :%dtabn', i, i-10) + endfor + endif + noremap AirlineSelectPrevTab gT + " tabn {count} goes to count tab does not go {count} tab pages forward! + noremap AirlineSelectNextTab :exe repeat(':tabn\|', v:count1) +endfunction + +function! airline#extensions#tabline#tabs#tabnr_formatter(nr, i) abort + let formatter = get(g:, 'airline#extensions#tabline#tabnr_formatter', 'tabnr') + try + return airline#extensions#tabline#formatters#{formatter}#format(a:nr, a:i) + catch /^Vim\%((\a\+)\)\=:E117/ " catch E117, unknown function + " Function not found + return call(formatter, [a:nr, a:i]) + catch + " something went wrong, return an empty string + return "" + endtry +endfunction diff --git a/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/tabline/tabws.vim b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/tabline/tabws.vim new file mode 100755 index 0000000..130fc32 --- /dev/null +++ b/install/vim/vimplugin/vim-airline-master/autoload/airline/extensions/tabline/tabws.vim @@ -0,0 +1,156 @@ +" MIT License. Copyright (c) 2016-2021 Kevin Sapper et al. +" PLugin: https://github.com/s1341/vim-tabws +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +let s:current_bufnr = -1 +let s:current_modified = 0 +let s:current_tabnr = -1 +let s:current_tabline = '' +let s:highlight_groups = ['hid', 0, '', 'sel', 'mod_unsel', 0, 'mod_unsel', 'mod'] + +function! airline#extensions#tabline#tabws#off() + augroup airline_tabline_tabws + autocmd! + augroup END +endfunction + +function! airline#extensions#tabline#tabws#on() + augroup airline_tabline_tabws + autocmd! + autocmd BufDelete * call airline#extensions#tabline#tabws#invalidate() + augroup END +endfunction + +function! airline#extensions#tabline#tabws#invalidate() + if exists('#airline') + let s:current_bufnr = -1 + let s:current_tabnr = -1 + endif +endfunction + +function! airline#extensions#tabline#tabws#add_buffer_section(builder, cur_tab, cur_buf, pull_right) + let pos_extension = (a:pull_right ? '_right' : '') + let bufnr_list = tabws#getbuffersfortab(a:cur_tab) + + if index(bufnr_list, a:cur_buf) == -1 && a:cur_tab == s:current_tabnr + return 0 + endif + + let s:current_modified = getbufvar(a:cur_buf, '&modified') + let visible_list = tabpagebuflist(a:cur_tab) + + for buffer in bufnr_list + let group = 'airline_tab' + \ .s:highlight_groups[(4 * getbufvar(buffer, '&modified')) + (2 * (index(visible_list, buffer) != -1)) + (a:cur_buf == buffer)] + \ .pos_extension + + let buf_name = '%(%{airline#extensions#tabline#get_buffer_name('.buffer.')}%)' + + if has("tablineat") + let buf_name = '%'.buffer.'@airline#extensions#tabline#buffers#clickbuf@'.buf_name.'%X' + endif + + call a:builder.add_section_spaced(group, buf_name) + endfor + + " add by tenfy(tenfyzhong@qq.com) + " if the selected buffer was updated + " return true + return 1 +endfunction + +function! airline#extensions#tabline#tabws#add_tab_section(builder, pull_right) + let pos_extension = (a:pull_right ? '_right' : '') + + for tab in range(1, tabpagenr('$')) + let current = tab == tabpagenr() + let group = 'airline_tab' + \ .s:highlight_groups[(3 * current)] + \ .pos_extension + + if get(g:, 'airline#extensions#tabline#tabws_show_tab_nr', 0) == 0 + call a:builder.add_section_spaced(group, '%'.tab.'T'.tabws#gettabname(tab).'%T') + else + call a:builder.add_section_spaced(group, '%'.tab.'T'.tab.(g:airline_symbols.space).tabws#gettabname(tab).'%T') + endif + endfor +endfunction + +function! airline#extensions#tabline#tabws#get() + let cur_buf = bufnr('%') + let buffer_label = get(g:, 'airline#extensions#tabline#buffers_label', 'buffers') + let tab_label = get(g:, 'airline#extensions#tabline#tabs_label', 'tabs') + let switch_buffers_and_tabs = get(g:, 'airline#extensions#tabline#switch_buffers_and_tabs', 0) + + try + call airline#extensions#tabline#tabs#map_keys() + endtry + + let cur_tab = tabpagenr() + + if cur_buf == s:current_bufnr && cur_tab == s:current_tabnr + if !g:airline_detect_modified || getbufvar(cur_buf, '&modified') == s:current_modified + return s:current_tabline + endif + endif + + let builder = airline#extensions#tabline#new_builder() + + let show_buffers = get(g:, 'airline#extensions#tabline#show_buffers', 1) + let show_tabs = get(g:, 'airline#extensions#tabline#show_tabs', 1) + + let AppendBuffers = function('airline#extensions#tabline#tabws#add_buffer_section', [builder, cur_tab, cur_buf]) + let AppendTabs = function('airline#extensions#tabline#tabws#add_tab_section', [builder]) + let AppendLabel = function(builder.add_section_spaced, ['airline_tabtype'], builder) + + " <= 1: |{Tabs} {Buffers} {Tabs} +" tabpagecd: +" expanded version by mg979 +" MIT License Copyright (C) 2012-2013 Kana Natsuno +" MIT License Copyright (C) 2018-2021 Gianmaria Bajo +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + + +function! airline#extensions#tabline#xtabline#init() + + let s:state = 0 + + " initialize mappings + call airline#extensions#tabline#xtabline#maps() + + """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + " Variables + """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + + let g:loaded_xtabline = 1 + let s:most_recent = -1 + let s:xtabline_filtering = 1 + + let t:xtl_excluded = get(g:, 'airline#extensions#tabline#exclude_buffers', []) + let t:xtl_accepted = [] + + let g:xtabline_include_previews = get(g:, 'xtabline_include_previews', 1) + + let g:xtabline_alt_action = get(g:, 'xtabline_alt_action', "buffer #") + + + """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + " Autocommands + """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + + augroup plugin-xtabline + autocmd! + + autocmd TabNew * call s:Do('new') + autocmd TabEnter * call s:Do('enter') + autocmd TabLeave * call s:Do('leave') + autocmd TabClosed * call s:Do('close') + + autocmd BufEnter * if exists('#airline') | let g:xtabline_changing_buffer = 0 | endif + autocmd BufAdd,BufDelete,BufWrite * call airline#extensions#tabline#xtabline#filter_buffers() + augroup END + + + """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + " Commands + """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + + com! XTabReopen call airline#extensions#tabline#xtabline#reopen_last_tab() + +endfunction + + +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" Mappings +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +function! airline#extensions#tabline#xtabline#maps() + + if !exists('g:xtabline_disable_keybindings') + + fun! s:mapkeys(keys, plug) + if empty(mapcheck(a:keys)) && !hasmapto(a:plug) + silent! execute 'nmap '.a:keys.' '.a:plug + endif + endfun + + call s:mapkeys('','XTablineToggleTabs') + call s:mapkeys('','XTablineToggleFiltering') + call s:mapkeys('','XTablineSelectBuffer') + call s:mapkeys(']l','XTablineNextBuffer') + call s:mapkeys('[l','XTablinePrevBuffer') + call s:mapkeys('tr','XTablineReopen') + endif + + nnoremap