├── README ├── .hushlogin ├── .gemrc ├── .zprofile ├── vimfiles ├── ftdetect │ ├── eco.vim │ └── coffee.vim ├── ftplugin │ ├── javascript.vim │ └── coffee.vim ├── after │ └── syntax │ │ ├── haml.vim │ │ └── html.vim ├── compiler │ └── coffee.vim ├── syntax │ ├── eco.vim │ └── coffee.vim ├── doc │ └── coffee-script.txt ├── colors │ ├── molokai.vim │ └── defminus.vim └── indent │ └── coffee.vim ├── .gitignore ├── .gitmodules ├── .zshenv ├── .gvimrc ├── .zshrc └── .vimrc /README: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.hushlogin: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.gemrc: -------------------------------------------------------------------------------- 1 | gem: --no-document 2 | -------------------------------------------------------------------------------- /.zprofile: -------------------------------------------------------------------------------- 1 | eval "$(/opt/homebrew/bin/brew shellenv)" 2 | -------------------------------------------------------------------------------- /vimfiles/ftdetect/eco.vim: -------------------------------------------------------------------------------- 1 | autocmd BufNewFile,BufRead *.eco set filetype=eco 2 | -------------------------------------------------------------------------------- /vimfiles/ftplugin/javascript.vim: -------------------------------------------------------------------------------- 1 | :setlocal expandtab "ソフトtabを有効に 2 | :setlocal tabstop=2 shiftwidth=2 softtabstop=2 "インデント幅を2文字に 3 | :setlocal autoindent "オートインデントを有効に 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /vimfiles/bundle/ 2 | /vimfiles/dein/ 3 | /vimfiles/.netrwhist 4 | /vimfiles/autoload/ 5 | /vimfiles/doc/ 6 | /vimfiles/plugged/ 7 | .DS_Store 8 | .idea 9 | .generators 10 | .rakeTasks 11 | .byebug_history 12 | .vscode 13 | vendor/bundle 14 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "vimfiles/vundle.git"] 2 | path = vimfiles/vundle.git 3 | url = http://github.com/gmarik/vundle.git 4 | [submodule "vimfiles/.vim/bundle/neobundle.vim"] 5 | path = vimfiles/.vim/bundle/neobundle.vim 6 | url = https://github.com/Shougo/neobundle.vim 7 | -------------------------------------------------------------------------------- /vimfiles/ftdetect/coffee.vim: -------------------------------------------------------------------------------- 1 | " Language: CoffeeScript 2 | " Maintainer: Mick Koch 3 | " URL: http://github.com/kchmck/vim-coffee-script 4 | " License: WTFPL 5 | 6 | autocmd BufNewFile,BufRead *.coffee set filetype=coffee 7 | autocmd BufNewFile,BufRead *Cakefile set filetype=coffee 8 | autocmd BufNewFile,BufRead *.coffeekup set filetype=coffee 9 | -------------------------------------------------------------------------------- /vimfiles/after/syntax/haml.vim: -------------------------------------------------------------------------------- 1 | " Language: CoffeeScript 2 | " Maintainer: Sven Felix Oberquelle 3 | " URL: http://github.com/kchmck/vim-coffee-script 4 | " License: WTFPL 5 | 6 | " Inherit coffee from html so coffeeComment isn't redefined and given higher 7 | " priority than hamlInterpolation. 8 | syn cluster hamlCoffeescript contains=@htmlCoffeeScript 9 | syn region hamlCoffeescriptFilter matchgroup=hamlFilter start="^\z(\s*\):coffeescript\s*$" end="^\%(\z1 \| *$\)\@!" contains=@hamlCoffeeScript,hamlInterpolation keepend 10 | -------------------------------------------------------------------------------- /vimfiles/after/syntax/html.vim: -------------------------------------------------------------------------------- 1 | " Language: CoffeeScript 2 | " Maintainer: Mick Koch 3 | " URL: http://github.com/kchmck/vim-coffee-script 4 | " License: WTFPL 5 | 6 | " Syntax highlighting for text/coffeescript script tags 7 | syn include @htmlCoffeeScript syntax/coffee.vim 8 | syn region coffeeScript start=++me=s-1 keepend 10 | \ contains=@htmlCoffeeScript,htmlScriptTag,@htmlPreproc 11 | \ containedin=htmlHead 12 | -------------------------------------------------------------------------------- /.zshenv: -------------------------------------------------------------------------------- 1 | export NVM_DIR="$HOME/.nvm" 2 | [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm 3 | [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion 4 | 5 | # Calling nvm use automatically in a directory with a .nvmrc file 6 | autoload -U add-zsh-hook 7 | load-nvmrc() { 8 | local node_version="$(nvm version)" 9 | local nvmrc_path="$(nvm_find_nvmrc)" 10 | 11 | if [ -n "$nvmrc_path" ]; then 12 | local nvmrc_node_version=$(nvm version "$(cat "${nvmrc_path}")") 13 | 14 | if [ "$nvmrc_node_version" = "N/A" ]; then 15 | nvm install 16 | elif [ "$nvmrc_node_version" != "$node_version" ]; then 17 | nvm use 18 | fi 19 | elif [ "$node_version" != "$(nvm version default)" ]; then 20 | echo "Reverting to nvm default version" 21 | nvm use default 22 | fi 23 | } 24 | add-zsh-hook chpwd load-nvmrc 25 | load-nvmrc 26 | . "$HOME/.cargo/env" 27 | -------------------------------------------------------------------------------- /vimfiles/compiler/coffee.vim: -------------------------------------------------------------------------------- 1 | " Language: CoffeeScript 2 | " Maintainer: Mick Koch 3 | " URL: http://github.com/kchmck/vim-coffee-script 4 | " License: WTFPL 5 | 6 | if exists('current_compiler') 7 | finish 8 | endif 9 | 10 | let current_compiler = 'coffee' 11 | " Pattern to check if coffee is the compiler 12 | let s:pat = '^' . current_compiler 13 | 14 | " Extra options passed to CoffeeMake 15 | if !exists("coffee_make_options") 16 | let coffee_make_options = "" 17 | endif 18 | 19 | " Get a `makeprg` for the current filename. This is needed to support filenames 20 | " with spaces and quotes, but also not break generic `make`. 21 | function! s:GetMakePrg() 22 | return 'coffee -c ' . g:coffee_make_options . ' $* ' . fnameescape(expand('%')) 23 | endfunction 24 | 25 | " Set `makeprg` and return 1 if coffee is still the compiler, else return 0. 26 | function! s:SetMakePrg() 27 | if &l:makeprg =~ s:pat 28 | let &l:makeprg = s:GetMakePrg() 29 | elseif &g:makeprg =~ s:pat 30 | let &g:makeprg = s:GetMakePrg() 31 | else 32 | return 0 33 | endif 34 | 35 | return 1 36 | endfunction 37 | 38 | " Set a dummy compiler so we can check whether to set locally or globally. 39 | CompilerSet makeprg=coffee 40 | call s:SetMakePrg() 41 | 42 | CompilerSet errorformat=Error:\ In\ %f\\,\ %m\ on\ line\ %l, 43 | \Error:\ In\ %f\\,\ Parse\ error\ on\ line\ %l:\ %m, 44 | \SyntaxError:\ In\ %f\\,\ %m, 45 | \%-G%.%# 46 | 47 | " Compile the current file. 48 | command! -bang -bar -nargs=* CoffeeMake make 49 | 50 | " Set `makeprg` on rename since we embed the filename in the setting. 51 | augroup CoffeeUpdateMakePrg 52 | autocmd! 53 | 54 | " Update `makeprg` if coffee is still the compiler, else stop running this 55 | " function. 56 | function! s:UpdateMakePrg() 57 | if !s:SetMakePrg() 58 | autocmd! CoffeeUpdateMakePrg 59 | endif 60 | endfunction 61 | 62 | " Set autocmd locally if compiler was set locally. 63 | if &l:makeprg =~ s:pat 64 | autocmd BufFilePost,BufWritePost call s:UpdateMakePrg() 65 | else 66 | autocmd BufFilePost,BufWritePost call s:UpdateMakePrg() 67 | endif 68 | augroup END 69 | -------------------------------------------------------------------------------- /vimfiles/syntax/eco.vim: -------------------------------------------------------------------------------- 1 | " Vim syntax file 2 | " Language: eco 3 | " Maintainer: Jay Adkisson 4 | " Mostly stolen from eruby.vim 5 | 6 | if !exists("g:eco_default_subtype") 7 | let g:eco_default_subtype = "html" 8 | endif 9 | 10 | if !exists("b:eco_subtype") 11 | let s:lines = getline(1)."\n".getline(2)."\n".getline(3)."\n".getline(4)."\n".getline(5)."\n".getline("$") 12 | let b:eco_subtype = matchstr(s:lines,'eco_subtype=\zs\w\+') 13 | if b:eco_subtype == '' 14 | let b:eco_subtype = matchstr(substitute(expand("%:t"),'\c\%(\.eco\)\+$','',''),'\.\zs\w\+$') 15 | endif 16 | if b:eco_subtype == 'rhtml' 17 | let b:eco_subtype = 'html' 18 | elseif b:eco_subtype == 'jst' 19 | let b:eco_subtype = 'html' 20 | elseif b:eco_subtype == 'rb' 21 | let b:eco_subtype = 'ruby' 22 | elseif b:eco_subtype == 'yml' 23 | let b:eco_subtype = 'yaml' 24 | elseif b:eco_subtype == 'js' || b:eco_subtype == 'json' 25 | let b:eco_subtype = 'javascript' 26 | elseif b:eco_subtype == 'txt' 27 | " Conventional; not a real file type 28 | let b:eco_subtype = 'text' 29 | elseif b:eco_subtype == '' 30 | if exists('b:current_syntax') && b:current_syntax != '' 31 | let b:eco_subtype = b:current_syntax 32 | else 33 | let b:eco_subtype = g:eco_default_subtype 34 | endif 35 | endif 36 | endif 37 | 38 | if exists("b:eco_subtype") && b:eco_subtype != '' && b:eco_subtype != 'eco' 39 | exec "runtime! syntax/".b:eco_subtype.".vim" 40 | syn include @coffeeTop syntax/coffee.vim 41 | endif 42 | 43 | syn cluster ecoRegions contains=ecoBlock,ecoExpression,ecoComment 44 | 45 | syn region ecoBlock matchgroup=ecoDelimiter start=/<%/ end=/%>/ contains=@coffeeTop containedin=ALLBUT,@ecoRegions keepend 46 | syn region ecoExpression matchgroup=ecoDelimiter start=/<%[=\-]/ end=/%>/ contains=@coffeeTop containedin=ALLBUT,@ecoRegions keepend 47 | syn region ecoComment matchgroup=ecoComment start=/<%#/ end=/%>/ contains=@coffeeTodo,@Spell containedin=ALLBUT,@ecoRegions keepend 48 | 49 | " eco features not in coffeescript proper 50 | syn keyword ecoEnd end containedin=@ecoRegions 51 | syn match ecoIndentColon /\s+\w+:/ containedin=@ecoRegions 52 | 53 | " Define the default highlighting. 54 | 55 | hi def link ecoDelimiter Delimiter 56 | hi def link ecoComment Comment 57 | hi def link ecoEnd coffeeConditional 58 | hi def link ecoIndentColon None 59 | 60 | let b:current_syntax = 'eco' 61 | 62 | " vim: nowrap sw=2 sts=2 ts=8: 63 | -------------------------------------------------------------------------------- /.gvimrc: -------------------------------------------------------------------------------- 1 | " System gvimrc file for MacVim 2 | " 3 | " Maintainer: Bjorn Winckler 4 | " Last Change: Sun Aug 29 2009 5 | " 6 | " This is a work in progress. If you feel so inclined, please help me improve 7 | " this file. 8 | 9 | 10 | " Make sure the '<' and 'C' flags are not included in 'cpoptions', otherwise 11 | " would not be recognized. See ":help 'cpoptions'". 12 | let s:cpo_save = &cpo 13 | set cpo&vim 14 | 15 | set backspace+=indent,eol,start 16 | 17 | " 18 | " Global default options 19 | " 20 | 21 | if !exists("syntax_on") 22 | syntax on 23 | endif 24 | 25 | colorscheme desert 26 | " colorscheme defminus 27 | 28 | " For live coding 29 | " colorscheme bluewery-light 30 | " let g:lightline = { 'colorscheme': 'bluewery_light' } 31 | 32 | " To make tabs more readable, the label only contains the tail of the file 33 | " name and the buffer modified flag. 34 | set guitablabel=%M%t 35 | 36 | " Send print jobs to Preview.app. This does not delete the temporary ps file 37 | " that is generated by :hardcopy. 38 | set printexpr=system('open\ -a\ Preview\ '.v:fname_in)\ +\ v:shell_error 39 | 40 | 41 | " This is so that HIG Cmd and Option movement mappings can be disabled by 42 | " adding the line 43 | " let macvim_skip_cmd_opt_movement = 1 44 | " to the user .vimrc 45 | " 46 | if !exists("macvim_skip_cmd_opt_movement") 47 | no 48 | no! 49 | no 50 | no! 51 | 52 | no 53 | no! 54 | no 55 | no! 56 | 57 | no 58 | ino 59 | map { 60 | imap { 61 | 62 | no 63 | ino 64 | map } 65 | imap } 66 | 67 | imap 68 | imap 69 | endif " !exists("macvim_skip_cmd_opt_movement") 70 | 71 | 72 | " This is so that the HIG shift movement related settings can be enabled by 73 | " adding the line 74 | " let macvim_hig_shift_movement = 1 75 | " to the user .vimrc (not .gvimrc!). 76 | " 77 | if exists("macvim_hig_shift_movement") 78 | " Shift + special movement key (, etc.) and mouse starts insert mode 79 | set selectmode=mouse,key 80 | set keymodel=startsel,stopsel 81 | 82 | " HIG related shift + special movement key mappings 83 | nn 84 | vn 85 | ino 86 | nn 87 | vn 88 | ino 89 | 90 | nn 91 | vn 92 | ino 93 | nn 94 | vn 95 | ino 96 | 97 | nn 98 | vn 99 | ino 100 | 101 | nn 102 | vn 103 | ino 104 | endif " exists("macvim_hig_shift_movement") 105 | 106 | 107 | " Restore the previous value of 'cpoptions'. 108 | let &cpo = s:cpo_save 109 | unlet s:cpo_save 110 | 111 | set lsp=2 112 | set guifont=Menlo:h14 113 | set lines=90 columns=200 114 | 115 | " 自動的に日本語入力(IM)をオン/オフにする機能すべてを禁止 116 | set imdisable 117 | -------------------------------------------------------------------------------- /vimfiles/doc/coffee-script.txt: -------------------------------------------------------------------------------- 1 | *coffee-script.txt* For Vim version 7.3 2 | 3 | ============================================================================= 4 | Author: Mick Koch *coffee-script-author* 5 | License: WTFPL (see |coffee-script-license|) 6 | ============================================================================= 7 | 8 | CONTENTS *coffee-script-contents* 9 | 10 | |coffee-script-introduction| Introduction and Feature Summary 11 | |coffee-script-commands| Commands 12 | |coffee-script-settings| Settings 13 | 14 | {Vi does not have any of this} 15 | 16 | ============================================================================= 17 | 18 | INTRODUCTION *coffee-script* 19 | *coffee-script-introduction* 20 | 21 | This plugin adds support for CoffeeScript syntax, indenting, and compiling. 22 | Also included is an eco syntax and support for CoffeeScript in Haml and HTML. 23 | 24 | COMMANDS *coffee-script-commands* 25 | 26 | *:CoffeeMake* 27 | :CoffeeMake[!] {opts} Wrapper around |:make| that also passes options in 28 | |g:coffee_make_options| to the compiler. Use |:silent| 29 | to hide compiler output. See |:make| for more 30 | information about the bang and other helpful commands. 31 | 32 | *:CoffeeCompile* 33 | :[range]CoffeeCompile [vertical] [{win-size}] 34 | Shows how the current file or [range] is compiled 35 | to JavaScript. [vertical] (or vert) splits the 36 | compile buffer vertically instead of horizontally, and 37 | {win-size} sets the initial size of the buffer. It can 38 | be closed quickly with the "q" key. 39 | 40 | :CoffeeCompile {watch} [vertical] [{win-size}] 41 | The watch mode of :CoffeeCompile emulates the "Try 42 | CoffeeScript" live preview on the CoffeeScript web 43 | site. After making changes to the source file, 44 | exiting insert mode will cause the preview buffer to 45 | update automatically. {watch} should be given as 46 | "watch" or "unwatch," where the latter will stop the 47 | automatic updating. [vertical] is recommended, and 48 | 'scrollbind' is useful. 49 | 50 | *:CoffeeRun* 51 | :[range]CoffeeRun Compiles the file or [range] and runs the resulting 52 | JavaScript, displaying the output. 53 | 54 | SETTINGS *coffee-script-settings* 55 | 56 | You can configure plugin behavior using global variables and syntax commands 57 | in your |vimrc|. 58 | 59 | Global Settings~ 60 | 61 | *g:coffee_make_options* 62 | Set default options |CoffeeMake| should pass to the compiler. 63 | > 64 | let coffee_make_options = '--bare' 65 | < 66 | *g:coffee_compile_vert* 67 | Split the CoffeeCompile buffer vertically by default. 68 | > 69 | let coffee_compile_vert = 1 70 | 71 | Syntax Highlighting~ 72 | *ft-coffee-script-syntax* 73 | Trailing whitespace is highlighted as an error by default. This can be 74 | disabled with: 75 | > 76 | hi link coffeeSpaceError NONE 77 | 78 | Trailing semicolons are also considered an error (for help transitioning from 79 | JavaScript.) This can be disabled with: 80 | > 81 | hi link coffeeSemicolonError NONE 82 | 83 | Reserved words like {function} and {var} are highlighted where they're not 84 | allowed in CoffeeScript. This can be disabled with: 85 | > 86 | hi link coffeeReservedError NONE 87 | 88 | COMPILER *compiler-coffee-script* 89 | 90 | A CoffeeScript compiler is provided as a wrapper around {coffee} and can be 91 | loaded with; 92 | > 93 | compiler coffee 94 | 95 | This is done automatically when a CoffeeScript file is opened if no other 96 | compiler is loaded. 97 | 98 | ============================================================================= 99 | 100 | LICENSE *coffee-script-license* 101 | 102 | DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE 103 | Version 2, December 2004 104 | 105 | Copyright (C) 2010 to 2011 Mick Koch 106 | 107 | Everyone is permitted to copy and distribute verbatim or modified 108 | copies of this license document, and changing it is allowed as long 109 | as the name is changed. 110 | 111 | DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE 112 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 113 | 114 | 0. You just DO WHAT THE FUCK YOU WANT TO. 115 | 116 | vim:tw=78:ts=8:ft=help:norl: 117 | -------------------------------------------------------------------------------- /.zshrc: -------------------------------------------------------------------------------- 1 | # If you come from bash you might have to change your $PATH. 2 | # export PATH=$HOME/bin:/usr/local/bin:$PATH 3 | 4 | # Path to your oh-my-zsh installation. 5 | export ZSH="$HOME/.oh-my-zsh" 6 | 7 | # Set name of the theme to load --- if set to "random", it will 8 | # load a random theme each time oh-my-zsh is loaded, in which case, 9 | # to know which specific one was loaded, run: echo $RANDOM_THEME 10 | # See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes 11 | ZSH_THEME="robbyrussell" 12 | 13 | # Set list of themes to pick from when loading at random 14 | # Setting this variable when ZSH_THEME=random will cause zsh to load 15 | # a theme from this variable instead of looking in $ZSH/themes/ 16 | # If set to an empty array, this variable will have no effect. 17 | # ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" ) 18 | 19 | # Uncomment the following line to use case-sensitive completion. 20 | # CASE_SENSITIVE="true" 21 | 22 | # Uncomment the following line to use hyphen-insensitive completion. 23 | # Case-sensitive completion must be off. _ and - will be interchangeable. 24 | # HYPHEN_INSENSITIVE="true" 25 | 26 | # Uncomment one of the following lines to change the auto-update behavior 27 | # zstyle ':omz:update' mode disabled # disable automatic updates 28 | # zstyle ':omz:update' mode auto # update automatically without asking 29 | # zstyle ':omz:update' mode reminder # just remind me to update when it's time 30 | 31 | # Uncomment the following line to change how often to auto-update (in days). 32 | # zstyle ':omz:update' frequency 13 33 | 34 | # Uncomment the following line if pasting URLs and other text is messed up. 35 | # DISABLE_MAGIC_FUNCTIONS="true" 36 | 37 | # Uncomment the following line to disable colors in ls. 38 | # DISABLE_LS_COLORS="true" 39 | 40 | # Uncomment the following line to disable auto-setting terminal title. 41 | # DISABLE_AUTO_TITLE="true" 42 | 43 | # Uncomment the following line to enable command auto-correction. 44 | # ENABLE_CORRECTION="true" 45 | 46 | # Uncomment the following line to display red dots whilst waiting for completion. 47 | # You can also set it to another string to have that shown instead of the default red dots. 48 | # e.g. COMPLETION_WAITING_DOTS="%F{yellow}waiting...%f" 49 | # Caution: this setting can cause issues with multiline prompts in zsh < 5.7.1 (see #5765) 50 | # COMPLETION_WAITING_DOTS="true" 51 | 52 | # Uncomment the following line if you want to disable marking untracked files 53 | # under VCS as dirty. This makes repository status check for large repositories 54 | # much, much faster. 55 | # DISABLE_UNTRACKED_FILES_DIRTY="true" 56 | 57 | # Uncomment the following line if you want to change the command execution time 58 | # stamp shown in the history command output. 59 | # You can set one of the optional three formats: 60 | # "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd" 61 | # or set a custom format using the strftime function format specifications, 62 | # see 'man strftime' for details. 63 | # HIST_STAMPS="mm/dd/yyyy" 64 | 65 | # Would you like to use another custom folder than $ZSH/custom? 66 | # ZSH_CUSTOM=/path/to/new-custom-folder 67 | 68 | # Which plugins would you like to load? 69 | # Standard plugins can be found in $ZSH/plugins/ 70 | # Custom plugins may be added to $ZSH_CUSTOM/plugins/ 71 | # Example format: plugins=(rails git textmate ruby lighthouse) 72 | # Add wisely, as too many plugins slow down shell startup. 73 | plugins=(git notify) 74 | 75 | HISTSIZE=100000 76 | 77 | source $ZSH/oh-my-zsh.sh 78 | 79 | # User configuration 80 | 81 | # export MANPATH="/usr/local/man:$MANPATH" 82 | 83 | # You may need to manually set your language environment 84 | # export LANG=en_US.UTF-8 85 | 86 | # Preferred editor for local and remote sessions 87 | # if [[ -n $SSH_CONNECTION ]]; then 88 | # export EDITOR='vim' 89 | # else 90 | # export EDITOR='mvim' 91 | # fi 92 | 93 | # Compilation flags 94 | # export ARCHFLAGS="-arch x86_64" 95 | 96 | # Set personal aliases, overriding those provided by oh-my-zsh libs, 97 | # plugins, and themes. Aliases can be placed here, though oh-my-zsh 98 | # users are encouraged to define aliases within the ZSH_CUSTOM folder. 99 | # For a full list of active aliases, run `alias`. 100 | # 101 | # Example aliases 102 | # alias zshconfig="mate ~/.zshrc" 103 | # alias ohmyzsh="mate ~/.oh-my-zsh" 104 | 105 | bindkey -v 106 | bindkey "^R" history-incremental-search-backward 107 | 108 | alias be="bundle exec" 109 | alias history='fc -l' 110 | alias plog='tail -f log/development.log' 111 | alias tlog='tail -f log/test.log' 112 | 113 | setopt share_history 114 | 115 | # make diff beautiful 116 | export PATH=$PATH:$(brew --cellar git)'/'$(git --version | sed 's/git version //' | sed 's/ (Apple Git-55)//')/share/git-core/contrib/diff-highlight 117 | 118 | # Avoid GitHub API rate limit error 119 | # http://rcmdnk.github.io/blog/2013/12/05/mac-homebrew/ 120 | if [ -f ~/.brew_api_token ];then 121 | source ~/.brew_api_token 122 | fi 123 | 124 | eval "$(rbenv init - zsh)" 125 | 126 | export PATH="/opt/homebrew/opt/imagemagick@6/bin:$PATH" 127 | 128 | export LOCAL_HOST_IP=`ifconfig en0 | grep inet | grep -v inet6 | sed -E "s/inet ([0-9]{1,3}.[0-9]{1,3}.[0-9].{1,3}.[0-9]{1,3}) .*$/\1/" | tr -d "\t"` 129 | 130 | # https://qiita.com/jnchito/items/f976382726fecf1d9461 131 | export PERLLIB="/Library/Developer/CommandLineTools/usr/share/git-core/perl" 132 | 133 | # for Rust 134 | . "$HOME/.cargo/env" 135 | -------------------------------------------------------------------------------- /vimfiles/ftplugin/coffee.vim: -------------------------------------------------------------------------------- 1 | " Language: CoffeeScript 2 | " Maintainer: Mick Koch 3 | " URL: http://github.com/kchmck/vim-coffee-script 4 | " License: WTFPL 5 | 6 | if exists("b:did_ftplugin") 7 | finish 8 | endif 9 | 10 | let b:did_ftplugin = 1 11 | 12 | setlocal formatoptions-=t formatoptions+=croql 13 | setlocal comments=:# 14 | setlocal commentstring=#\ %s 15 | setlocal omnifunc=javascriptcomplete#CompleteJS 16 | 17 | " Enable CoffeeMake if it won't overwrite any settings. 18 | if !len(&l:makeprg) 19 | compiler coffee 20 | endif 21 | 22 | " Reset the global variables used by CoffeeCompile. 23 | function! s:CoffeeCompileResetVars() 24 | " Position in the source buffer 25 | let s:coffee_compile_src_buf = -1 26 | let s:coffee_compile_src_pos = [] 27 | 28 | " Position in the CoffeeCompile buffer 29 | let s:coffee_compile_buf = -1 30 | let s:coffee_compile_win = -1 31 | let s:coffee_compile_pos = [] 32 | 33 | " If CoffeeCompile is watching a buffer 34 | let s:coffee_compile_watch = 0 35 | endfunction 36 | 37 | " Save the cursor position when moving to and from the CoffeeCompile buffer. 38 | function! s:CoffeeCompileSavePos() 39 | let buf = bufnr('%') 40 | let pos = getpos('.') 41 | 42 | if buf == s:coffee_compile_buf 43 | let s:coffee_compile_pos = pos 44 | else 45 | let s:coffee_compile_src_buf = buf 46 | let s:coffee_compile_src_pos = pos 47 | endif 48 | endfunction 49 | 50 | " Restore the cursor to the source buffer. 51 | function! s:CoffeeCompileRestorePos() 52 | let win = bufwinnr(s:coffee_compile_src_buf) 53 | 54 | if win != -1 55 | exec win 'wincmd w' 56 | call setpos('.', s:coffee_compile_src_pos) 57 | endif 58 | endfunction 59 | 60 | " Close the CoffeeCompile buffer and clean things up. 61 | function! s:CoffeeCompileClose() 62 | silent! autocmd! CoffeeCompileAuPos 63 | silent! autocmd! CoffeeCompileAuWatch 64 | 65 | call s:CoffeeCompileRestorePos() 66 | call s:CoffeeCompileResetVars() 67 | endfunction 68 | 69 | " Update the CoffeeCompile buffer given some input lines. 70 | function! s:CoffeeCompileUpdate(startline, endline) 71 | let input = join(getline(a:startline, a:endline), "\n") 72 | 73 | " Coffee doesn't like empty input. 74 | if !len(input) 75 | return 76 | endif 77 | 78 | " Compile input. 79 | let output = system('coffee -scb 2>&1', input) 80 | 81 | " Move to the CoffeeCompile buffer. 82 | exec s:coffee_compile_win 'wincmd w' 83 | 84 | " Replace buffer contents with new output and delete the last empty line. 85 | setlocal modifiable 86 | exec '% delete _' 87 | put! =output 88 | exec '$ delete _' 89 | setlocal nomodifiable 90 | 91 | " Highlight as JavaScript if there is no compile error. 92 | if v:shell_error 93 | setlocal filetype= 94 | else 95 | setlocal filetype=javascript 96 | endif 97 | 98 | " Restore the cursor in the compiled output. 99 | call setpos('.', s:coffee_compile_pos) 100 | endfunction 101 | 102 | " Update the CoffeeCompile buffer with the whole source buffer and restore the 103 | " cursor. 104 | function! s:CoffeeCompileWatchUpdate() 105 | call s:CoffeeCompileSavePos() 106 | call s:CoffeeCompileUpdate(1, '$') 107 | call s:CoffeeCompileRestorePos() 108 | endfunction 109 | 110 | " Peek at compiled CoffeeScript in a scratch buffer. We handle ranges like this 111 | " to prevent the cursor from being moved (and its position saved) before the 112 | " function is called. 113 | function! s:CoffeeCompile(startline, endline, args) 114 | " Don't compile the CoffeeCompile buffer. 115 | if bufnr('%') == s:coffee_compile_buf 116 | return 117 | endif 118 | 119 | " Parse arguments. 120 | let watch = a:args =~ '\' 121 | let unwatch = a:args =~ '\' 122 | let size = str2nr(matchstr(a:args, '\<\d\+\>')) 123 | 124 | " Determine default split direction. 125 | if exists("g:coffee_compile_vert") 126 | let vert = 1 127 | else 128 | let vert = a:args =~ '\' 129 | endif 130 | 131 | " Remove any watch listeners. 132 | silent! autocmd! CoffeeCompileAuWatch 133 | 134 | " If just unwatching, don't compile. 135 | if unwatch 136 | let s:coffee_compile_watch = 0 137 | return 138 | endif 139 | 140 | if watch 141 | let s:coffee_compile_watch = 1 142 | endif 143 | 144 | call s:CoffeeCompileSavePos() 145 | 146 | " Build the CoffeeCompile buffer if it doesn't exist. 147 | if s:coffee_compile_buf == -1 148 | let src_win = bufwinnr(s:coffee_compile_src_buf) 149 | 150 | " Create the new window and resize it. 151 | if vert 152 | let width = size ? size : winwidth(src_win) / 2 153 | 154 | vertical new 155 | exec 'vertical resize' width 156 | else 157 | " Try to guess the compiled output's height. 158 | let height = size ? size : min([winheight(src_win) / 2, 159 | \ a:endline - a:startline + 2]) 160 | 161 | botright new 162 | exec 'resize' height 163 | endif 164 | 165 | " Set up scratch buffer. 166 | setlocal bufhidden=wipe buftype=nofile 167 | setlocal nobuflisted nomodifiable noswapfile nowrap 168 | 169 | autocmd BufWipeout call s:CoffeeCompileClose() 170 | nnoremap q :hide 171 | 172 | " Save the cursor position on each buffer switch. 173 | augroup CoffeeCompileAuPos 174 | autocmd BufEnter,BufLeave * call s:CoffeeCompileSavePos() 175 | augroup END 176 | 177 | let s:coffee_compile_buf = bufnr('%') 178 | let s:coffee_compile_win = bufwinnr(s:coffee_compile_buf) 179 | endif 180 | 181 | " Go back to the source buffer and do the initial compile. 182 | call s:CoffeeCompileRestorePos() 183 | 184 | if s:coffee_compile_watch 185 | call s:CoffeeCompileWatchUpdate() 186 | 187 | augroup CoffeeCompileAuWatch 188 | autocmd InsertLeave call s:CoffeeCompileWatchUpdate() 189 | augroup END 190 | else 191 | call s:CoffeeCompileUpdate(a:startline, a:endline) 192 | endif 193 | endfunction 194 | 195 | " Complete arguments for the CoffeeCompile command. 196 | function! s:CoffeeCompileComplete(arg, cmdline, cursor) 197 | let args = ['unwatch', 'vertical', 'watch'] 198 | 199 | if !len(a:arg) 200 | return args 201 | endif 202 | 203 | let match = '^' . a:arg 204 | 205 | for arg in args 206 | if arg =~ match 207 | return [arg] 208 | endif 209 | endfor 210 | endfunction 211 | 212 | " Don't let new windows overwrite the CoffeeCompile variables. 213 | if !exists("s:coffee_compile_buf") 214 | call s:CoffeeCompileResetVars() 215 | endif 216 | 217 | " Peek at compiled CoffeeScript. 218 | command! -range=% -bar -nargs=* -complete=customlist,s:CoffeeCompileComplete 219 | \ CoffeeCompile call s:CoffeeCompile(, , ) 220 | " Run some CoffeeScript. 221 | command! -range=% -bar CoffeeRun ,:w !coffee -s 222 | -------------------------------------------------------------------------------- /.vimrc: -------------------------------------------------------------------------------- 1 | " 挙動を vi 互換ではなく、Vim のデフォルト設定にする => .vimrcが存在すれば自動的に有効化されるので設定不要 2 | " set nocompatible 3 | " 一旦ファイルタイプ関連を無効化する => vim-plugでは不要 4 | " filetype off 5 | 6 | """""""""""""""""""""""""""""" 7 | " プラグインのセットアップ 8 | """""""""""""""""""""""""""""" 9 | call plug#begin('~/.vim/plugged') 10 | 11 | " ファイルオープンを便利に 12 | Plug 'Shougo/unite.vim' 13 | " Unite.vimで最近使ったファイルを表示できるようにする 14 | Plug 'Shougo/neomru.vim' 15 | " ファイルをtree表示してくれる 16 | Plug 'scrooloose/nerdtree' 17 | " Gitを便利に使う 18 | Plug 'tpope/vim-fugitive' 19 | 20 | " Rails向けのコマンドを提供する 21 | " Plug 'tpope/vim-rails' 22 | " Ruby向けにendを自動挿入してくれる 23 | Plug 'tpope/vim-endwise' 24 | 25 | " コメントON/OFFを手軽に実行 26 | Plug 'tomtom/tcomment_vim' 27 | " シングルクオートとダブルクオートの入れ替え等 28 | Plug 'tpope/vim-surround' 29 | 30 | " インデントに色を付けて見やすくする 31 | Plug 'nathanaelkane/vim-indent-guides' 32 | let g:indent_guides_enable_on_vim_startup = 1 33 | " ログファイルを色づけしてくれる 34 | Plug 'vim-scripts/AnsiEsc.vim' 35 | " 行末の半角スペースを可視化 36 | Plug 'bronson/vim-trailing-whitespace' 37 | " less用のsyntaxハイライト 38 | " Plug 'KohPoll/vim-less' 39 | 40 | " RubyMineのように自動保存する 41 | Plug '907th/vim-auto-save' 42 | let g:auto_save = 1 43 | 44 | " CSVをカラム単位に色分けする 45 | Plug 'mechatroner/rainbow_csv' 46 | 47 | " ブロック移動の拡張 48 | Plug 'andymass/vim-matchup' 49 | 50 | " GitHub Copilot 51 | Plug 'github/copilot.vim' 52 | 53 | " For live coding 54 | " Plug 'relastle/bluewery.vim' 55 | 56 | " 余談: neocompleteは合わなかった。ctrl+pで補完するのが便利 57 | 58 | call plug#end() 59 | 60 | " filetypeの検出を有効化する => vim-plugでは不要 61 | " filetype plugin indent on 62 | """""""""""""""""""""""""""""" 63 | 64 | """""""""""""""""""""""""""""" 65 | " 各種オプションの設定 66 | """""""""""""""""""""""""""""" 67 | " タグファイルの指定(でもタグジャンプは使ったことがない) 68 | set tags=~/.tags 69 | " スワップファイルは使わない(ときどき面倒な警告が出るだけで役に立ったことがない) 70 | set noswapfile 71 | " undoファイルは作成しない 72 | set noundofile 73 | " カーソルが何行目の何列目に置かれているかを表示する 74 | set ruler 75 | " コマンドラインに使われる画面上の行数 76 | set cmdheight=2 77 | " エディタウィンドウの末尾から2行目にステータスラインを常時表示させる 78 | set laststatus=2 79 | " ステータス行に表示させる情報の指定(どこからかコピペしたので細かい意味はわかっていない) 80 | set statusline=%<%f\ %m%r%h%w%{'['.(&fenc!=''?&fenc:&enc).']['.&ff.']'}%=%l,%c%V%8P 81 | " ステータス行に現在のgitブランチを表示する 82 | set statusline+=%{fugitive#statusline()} 83 | " ウインドウのタイトルバーにファイルのパス情報等を表示する 84 | set title 85 | " コマンドラインモードでキーによるファイル名補完を有効にする 86 | set wildmenu 87 | " 入力中のコマンドを表示する 88 | set showcmd 89 | " バックアップディレクトリの指定(でもバックアップは使ってない) 90 | set backupdir=$HOME/.vimbackup 91 | " バッファで開いているファイルのディレクトリでエクスクローラを開始する(でもエクスプローラって使ってない) 92 | set browsedir=buffer 93 | " 小文字のみで検索したときに大文字小文字を無視する 94 | set smartcase 95 | " 検索結果をハイライト表示する 96 | set hlsearch 97 | " 暗い背景色に合わせた配色にする 98 | set background=dark 99 | " タブ入力を複数の空白入力に置き換える 100 | set expandtab 101 | " 検索ワードの最初の文字を入力した時点で検索を開始する 102 | set incsearch 103 | " 保存されていないファイルがあるときでも別のファイルを開けるようにする 104 | set hidden 105 | " 不可視文字を表示する 106 | set list 107 | " タブと行の続きを可視化する 108 | set listchars=tab:>\ ,extends:< 109 | " 行番号を表示する 110 | set number 111 | " 対応する括弧やブレースを表示する 112 | set showmatch 113 | " 改行時に前の行のインデントを継続する 114 | set autoindent 115 | " 改行時に入力された行の末尾に合わせて次の行のインデントを増減する 116 | set smartindent 117 | " タブ文字の表示幅 118 | set tabstop=2 119 | " Vimが挿入するインデントの幅 120 | set shiftwidth=2 121 | " 行頭の余白内で Tab を打ち込むと、'shiftwidth' の数だけインデントする 122 | set smarttab 123 | " カーソルを行頭、行末で止まらないようにする 124 | set whichwrap=b,s,h,l,<,>,[,] 125 | " 構文毎に文字色を変化させる 126 | syntax on 127 | " カラースキーマの指定 128 | colorscheme desert 129 | 130 | " 行番号の色 131 | highlight LineNr ctermfg=darkyellow 132 | " 勝手に改行するのを防ぐ 133 | " set textwidth=0 134 | set formatoptions=q 135 | " textwidthでフォーマットさせたくない 136 | set formatoptions=q 137 | " クラッシュ防止(http://superuser.com/questions/810622/vim-crashes-freezes-on-specific-files-mac-osx-mavericks) 138 | set synmaxcol=200 139 | " G押下時にカラム位置を保持 140 | set nostartofline 141 | """""""""""""""""""""""""""""" 142 | 143 | " grep検索の実行後にQuickFix Listを表示する 144 | autocmd QuickFixCmdPost *grep* cwindow 145 | 146 | " markdownで => を入力したときのエラー音を無効化する 147 | " https://twitter.com/nabe11234/status/1372425739463618561 148 | autocmd BufRead,BufNewFile *.md set showmatch! 149 | 150 | " http://blog.remora.cx/2010/12/vim-ref-with-unite.html 151 | """""""""""""""""""""""""""""" 152 | " Unite.vimの設定 153 | """""""""""""""""""""""""""""" 154 | " 入力モードで開始する 155 | let g:unite_enable_start_insert=1 156 | " バッファ一覧 157 | noremap :Unite buffer 158 | " ファイル一覧 159 | noremap :Unite -buffer-name=file file 160 | " 最近使ったファイルの一覧 161 | noremap :Unite file_mru 162 | " sourcesを「今開いているファイルのディレクトリ」とする 163 | noremap :uff :UniteWithBufferDir file -buffer-name=file 164 | " ウィンドウを分割して開く 165 | au FileType unite nnoremap unite#do_action('split') 166 | au FileType unite inoremap unite#do_action('split') 167 | " ウィンドウを縦に分割して開く 168 | au FileType unite nnoremap unite#do_action('vsplit') 169 | au FileType unite inoremap unite#do_action('vsplit') 170 | " ESCキーを2回押すと終了する 171 | au FileType unite nnoremap :q 172 | au FileType unite inoremap :q 173 | """""""""""""""""""""""""""""" 174 | 175 | " http://inari.hatenablog.com/entry/2014/05/05/231307 176 | """""""""""""""""""""""""""""" 177 | " 全角スペースの表示 178 | """""""""""""""""""""""""""""" 179 | function! ZenkakuSpace() 180 | highlight ZenkakuSpace cterm=underline ctermfg=lightblue guibg=darkgray 181 | endfunction 182 | 183 | if has('syntax') 184 | augroup ZenkakuSpace 185 | autocmd! 186 | autocmd ColorScheme * call ZenkakuSpace() 187 | autocmd VimEnter,WinEnter,BufRead * let w:m1=matchadd('ZenkakuSpace', ' ') 188 | augroup END 189 | call ZenkakuSpace() 190 | endif 191 | """""""""""""""""""""""""""""" 192 | 193 | " https://sites.google.com/site/fudist/Home/vim-nihongo-ban/-vimrc-sample 194 | """""""""""""""""""""""""""""" 195 | " 挿入モード時、ステータスラインの色を変更 196 | """""""""""""""""""""""""""""" 197 | let g:hi_insert = 'highlight StatusLine guifg=darkblue guibg=darkyellow gui=none ctermfg=blue ctermbg=yellow cterm=none' 198 | 199 | if has('syntax') 200 | augroup InsertHook 201 | autocmd! 202 | autocmd InsertEnter * call s:StatusLine('Enter') 203 | autocmd InsertLeave * call s:StatusLine('Leave') 204 | augroup END 205 | endif 206 | 207 | let s:slhlcmd = '' 208 | function! s:StatusLine(mode) 209 | if a:mode == 'Enter' 210 | silent! let s:slhlcmd = 'highlight ' . s:GetHighlight('StatusLine') 211 | silent exec g:hi_insert 212 | else 213 | highlight clear StatusLine 214 | silent exec s:slhlcmd 215 | endif 216 | endfunction 217 | 218 | function! s:GetHighlight(hi) 219 | redir => hl 220 | exec 'highlight '.a:hi 221 | redir END 222 | let hl = substitute(hl, '[\r\n]', '', 'g') 223 | let hl = substitute(hl, 'xxx', '', '') 224 | return hl 225 | endfunction 226 | """""""""""""""""""""""""""""" 227 | 228 | """""""""""""""""""""""""""""" 229 | " 最後のカーソル位置を復元する 230 | """""""""""""""""""""""""""""" 231 | if has("autocmd") 232 | autocmd BufReadPost * 233 | \ if line("'\"") > 0 && line ("'\"") <= line("$") | 234 | \ exe "normal! g'\"" | 235 | \ endif 236 | endif 237 | """""""""""""""""""""""""""""" 238 | 239 | """""""""""""""""""""""""""""" 240 | " 自動的に閉じ括弧を入力 241 | """""""""""""""""""""""""""""" 242 | imap { {} 243 | imap [ [] 244 | imap ( () 245 | """""""""""""""""""""""""""""" 246 | 247 | " filetypeの自動検出(最後の方に書いた方がいいらしい) 248 | filetype on 249 | -------------------------------------------------------------------------------- /vimfiles/colors/molokai.vim: -------------------------------------------------------------------------------- 1 | " Vim color file 2 | " 3 | " Author: Tomas Restrepo 4 | " 5 | " Note: Based on the monokai theme for textmate 6 | " by Wimer Hazenberg and its darker variant 7 | " by Hamish Stuart Macpherson 8 | " 9 | 10 | hi clear 11 | 12 | set background=dark 13 | if version > 580 14 | " no guarantees for version 5.8 and below, but this makes it stop 15 | " complaining 16 | hi clear 17 | if exists("syntax_on") 18 | syntax reset 19 | endif 20 | endif 21 | let g:colors_name="molokai" 22 | 23 | if exists("g:molokai_original") 24 | let s:molokai_original = g:molokai_original 25 | else 26 | let s:molokai_original = 0 27 | endif 28 | 29 | 30 | hi Boolean guifg=#AE81FF 31 | hi Character guifg=#E6DB74 32 | hi Number guifg=#AE81FF 33 | hi String guifg=#E6DB74 34 | hi Conditional guifg=#F92672 gui=bold 35 | hi Constant guifg=#AE81FF gui=bold 36 | hi Cursor guifg=#000000 guibg=#F8F8F0 37 | hi Debug guifg=#BCA3A3 gui=bold 38 | hi Define guifg=#66D9EF 39 | hi Delimiter guifg=#8F8F8F 40 | hi DiffAdd guibg=#13354A 41 | hi DiffChange guifg=#89807D guibg=#4C4745 42 | hi DiffDelete guifg=#960050 guibg=#1E0010 43 | hi DiffText guibg=#4C4745 gui=italic,bold 44 | 45 | hi Directory guifg=#A6E22E gui=bold 46 | hi Error guifg=#960050 guibg=#1E0010 47 | hi ErrorMsg guifg=#F92672 guibg=#232526 gui=bold 48 | hi Exception guifg=#A6E22E gui=bold 49 | hi Float guifg=#AE81FF 50 | hi FoldColumn guifg=#465457 guibg=#000000 51 | hi Folded guifg=#465457 guibg=#000000 52 | hi Function guifg=#A6E22E 53 | hi Identifier guifg=#FD971F 54 | hi Ignore guifg=#808080 guibg=bg 55 | hi IncSearch guifg=#C4BE89 guibg=#000000 56 | 57 | hi Keyword guifg=#F92672 gui=bold 58 | hi Label guifg=#E6DB74 gui=none 59 | hi Macro guifg=#C4BE89 gui=italic 60 | hi SpecialKey guifg=#66D9EF gui=italic 61 | 62 | hi MatchParen guifg=#000000 guibg=#FD971F gui=bold 63 | hi ModeMsg guifg=#E6DB74 64 | hi MoreMsg guifg=#E6DB74 65 | hi Operator guifg=#F92672 66 | 67 | " complete menu 68 | hi Pmenu guifg=#66D9EF guibg=#000000 69 | hi PmenuSel guibg=#808080 70 | hi PmenuSbar guibg=#080808 71 | hi PmenuThumb guifg=#66D9EF 72 | 73 | hi PreCondit guifg=#A6E22E gui=bold 74 | hi PreProc guifg=#A6E22E 75 | hi Question guifg=#66D9EF 76 | hi Repeat guifg=#F92672 gui=bold 77 | hi Search guifg=#FFFFFF guibg=#455354 78 | " marks column 79 | hi SignColumn guifg=#A6E22E guibg=#232526 80 | hi SpecialChar guifg=#F92672 gui=bold 81 | hi SpecialComment guifg=#465457 gui=bold 82 | hi Special guifg=#66D9EF guibg=bg gui=italic 83 | hi SpecialKey guifg=#888A85 gui=italic 84 | if has("spell") 85 | hi SpellBad guisp=#FF0000 gui=undercurl 86 | hi SpellCap guisp=#7070F0 gui=undercurl 87 | hi SpellLocal guisp=#70F0F0 gui=undercurl 88 | hi SpellRare guisp=#FFFFFF gui=undercurl 89 | endif 90 | hi Statement guifg=#F92672 gui=bold 91 | hi StatusLine guifg=#455354 guibg=fg 92 | hi StatusLineNC guifg=#808080 guibg=#080808 93 | hi StorageClass guifg=#FD971F gui=italic 94 | hi Structure guifg=#66D9EF 95 | hi Tag guifg=#F92672 gui=italic 96 | hi Title guifg=#ef5939 97 | hi Todo guifg=#FFFFFF guibg=bg gui=bold 98 | 99 | hi Typedef guifg=#66D9EF 100 | hi Type guifg=#66D9EF gui=none 101 | hi Underlined guifg=#808080 gui=underline 102 | 103 | hi VertSplit guifg=#808080 guibg=#080808 gui=bold 104 | hi VisualNOS guibg=#403D3D 105 | hi Visual guibg=#403D3D 106 | hi WarningMsg guifg=#FFFFFF guibg=#333333 gui=bold 107 | hi WildMenu guifg=#66D9EF guibg=#000000 108 | 109 | if s:molokai_original == 1 110 | hi Normal guifg=#F8F8F2 guibg=#272822 111 | hi Comment guifg=#75715E 112 | hi CursorLine guibg=#3E3D32 113 | hi CursorColumn guibg=#3E3D32 114 | hi LineNr guifg=#BCBCBC guibg=#3B3A32 115 | hi NonText guifg=#BCBCBC guibg=#3B3A32 116 | else 117 | hi Normal guifg=#F8F8F2 guibg=#1B1D1E 118 | hi Comment guifg=#465457 119 | hi CursorLine guibg=#293739 120 | hi CursorColumn guibg=#293739 121 | hi LineNr guifg=#BCBCBC guibg=#232526 122 | hi NonText guifg=#BCBCBC guibg=#232526 123 | end 124 | 125 | " 126 | " Support for 256-color terminal 127 | " 128 | if &t_Co > 255 129 | hi Boolean ctermfg=135 130 | hi Character ctermfg=144 131 | hi Number ctermfg=135 132 | hi String ctermfg=144 133 | hi Conditional ctermfg=161 cterm=bold 134 | hi Constant ctermfg=135 cterm=bold 135 | hi Cursor ctermfg=16 ctermbg=253 136 | hi Debug ctermfg=225 cterm=bold 137 | hi Define ctermfg=81 138 | hi Delimiter ctermfg=241 139 | 140 | hi DiffAdd ctermbg=24 141 | hi DiffChange ctermfg=181 ctermbg=239 142 | hi DiffDelete ctermfg=162 ctermbg=53 143 | hi DiffText ctermbg=102 cterm=bold 144 | 145 | hi Directory ctermfg=118 cterm=bold 146 | hi Error ctermfg=219 ctermbg=89 147 | hi ErrorMsg ctermfg=199 ctermbg=16 cterm=bold 148 | hi Exception ctermfg=118 cterm=bold 149 | hi Float ctermfg=135 150 | hi FoldColumn ctermfg=67 ctermbg=16 151 | hi Folded ctermfg=67 ctermbg=16 152 | hi Function ctermfg=118 153 | hi Identifier ctermfg=208 154 | hi Ignore ctermfg=244 ctermbg=232 155 | hi IncSearch ctermfg=193 ctermbg=16 156 | 157 | hi Keyword ctermfg=161 cterm=bold 158 | hi Label ctermfg=229 cterm=none 159 | hi Macro ctermfg=193 160 | hi SpecialKey ctermfg=81 161 | 162 | hi MatchParen ctermfg=16 ctermbg=208 cterm=bold 163 | hi ModeMsg ctermfg=229 164 | hi MoreMsg ctermfg=229 165 | hi Operator ctermfg=161 166 | 167 | " complete menu 168 | hi Pmenu ctermfg=81 ctermbg=16 169 | hi PmenuSel ctermbg=244 170 | hi PmenuSbar ctermbg=232 171 | hi PmenuThumb ctermfg=81 172 | 173 | hi PreCondit ctermfg=118 cterm=bold 174 | hi PreProc ctermfg=118 175 | hi Question ctermfg=81 176 | hi Repeat ctermfg=161 cterm=bold 177 | hi Search ctermfg=253 ctermbg=66 178 | 179 | " marks column 180 | hi SignColumn ctermfg=118 ctermbg=235 181 | hi SpecialChar ctermfg=161 cterm=bold 182 | hi SpecialComment ctermfg=245 cterm=bold 183 | hi Special ctermfg=81 ctermbg=232 184 | hi SpecialKey ctermfg=245 185 | 186 | hi Statement ctermfg=161 cterm=bold 187 | hi StatusLine ctermfg=238 ctermbg=253 188 | hi StatusLineNC ctermfg=244 ctermbg=232 189 | hi StorageClass ctermfg=208 190 | hi Structure ctermfg=81 191 | hi Tag ctermfg=161 192 | hi Title ctermfg=166 193 | hi Todo ctermfg=231 ctermbg=232 cterm=bold 194 | 195 | hi Typedef ctermfg=81 196 | hi Type ctermfg=81 cterm=none 197 | hi Underlined ctermfg=244 cterm=underline 198 | 199 | hi VertSplit ctermfg=244 ctermbg=232 cterm=bold 200 | hi VisualNOS ctermbg=238 201 | hi Visual ctermbg=235 202 | hi WarningMsg ctermfg=231 ctermbg=238 cterm=bold 203 | hi WildMenu ctermfg=81 ctermbg=16 204 | 205 | hi Normal ctermfg=252 ctermbg=233 206 | hi Comment ctermfg=59 207 | hi CursorLine ctermbg=234 cterm=none 208 | hi CursorColumn ctermbg=234 209 | hi LineNr ctermfg=250 ctermbg=234 210 | hi NonText ctermfg=250 ctermbg=234 211 | end 212 | -------------------------------------------------------------------------------- /vimfiles/syntax/coffee.vim: -------------------------------------------------------------------------------- 1 | " Language: CoffeeScript 2 | " Maintainer: Mick Koch 3 | " URL: http://github.com/kchmck/vim-coffee-script 4 | " License: WTFPL 5 | 6 | " Bail if our syntax is already loaded. 7 | if exists('b:current_syntax') && b:current_syntax == 'coffee' 8 | finish 9 | endif 10 | 11 | " Include JavaScript for coffeeEmbed. 12 | syn include @coffeeJS syntax/javascript.vim 13 | 14 | " Highlight long strings. 15 | syn sync minlines=100 16 | 17 | " CoffeeScript identifiers can have dollar signs. 18 | setlocal isident+=$ 19 | 20 | " These are `matches` instead of `keywords` because vim's highlighting 21 | " priority for keywords is higher than matches. This causes keywords to be 22 | " highlighted inside matches, even if a match says it shouldn't contain them -- 23 | " like with coffeeAssign and coffeeDot. 24 | syn match coffeeStatement /\<\%(return\|break\|continue\|throw\)\>/ display 25 | hi def link coffeeStatement Statement 26 | 27 | syn match coffeeRepeat /\<\%(for\|while\|until\|loop\)\>/ display 28 | hi def link coffeeRepeat Repeat 29 | 30 | syn match coffeeConditional /\<\%(if\|else\|unless\|switch\|when\|then\)\>/ 31 | \ display 32 | hi def link coffeeConditional Conditional 33 | 34 | syn match coffeeException /\<\%(try\|catch\|finally\)\>/ display 35 | hi def link coffeeException Exception 36 | 37 | syn match coffeeKeyword /\<\%(new\|in\|of\|by\|and\|or\|not\|is\|isnt\|class\|extends\|super\|do\)\>/ 38 | \ display 39 | " The `own` keyword is only a keyword after `for`. 40 | syn match coffeeKeyword /\/ contained containedin=coffeeRepeat 41 | \ display 42 | hi def link coffeeKeyword Keyword 43 | 44 | syn match coffeeOperator /\<\%(instanceof\|typeof\|delete\)\>/ display 45 | hi def link coffeeOperator Operator 46 | 47 | " The first case matches symbol operators only if they have an operand before. 48 | syn match coffeeExtendedOp /\%(\S\s*\)\@<=[+\-*/%&|\^=!<>?.]\+\|[-=]>\|--\|++\|:/ 49 | \ display 50 | syn match coffeeExtendedOp /\<\%(and\|or\)=/ display 51 | hi def link coffeeExtendedOp coffeeOperator 52 | 53 | " This is separate from `coffeeExtendedOp` to help differentiate commas from 54 | " dots. 55 | syn match coffeeSpecialOp /[,;]/ display 56 | hi def link coffeeSpecialOp SpecialChar 57 | 58 | syn match coffeeBoolean /\<\%(true\|on\|yes\|false\|off\|no\)\>/ display 59 | hi def link coffeeBoolean Boolean 60 | 61 | syn match coffeeGlobal /\<\%(null\|undefined\)\>/ display 62 | hi def link coffeeGlobal Type 63 | 64 | " A special variable 65 | syn match coffeeSpecialVar /\<\%(this\|prototype\|arguments\)\>/ display 66 | " An @-variable 67 | syn match coffeeSpecialVar /@\%(\I\i*\)\?/ display 68 | hi def link coffeeSpecialVar Special 69 | 70 | " A class-like name that starts with a capital letter 71 | syn match coffeeObject /\<\u\w*\>/ display 72 | hi def link coffeeObject Structure 73 | 74 | " A constant-like name in SCREAMING_CAPS 75 | syn match coffeeConstant /\<\u[A-Z0-9_]\+\>/ display 76 | hi def link coffeeConstant Constant 77 | 78 | " A variable name 79 | syn cluster coffeeIdentifier contains=coffeeSpecialVar,coffeeObject, 80 | \ coffeeConstant 81 | 82 | " A non-interpolated string 83 | syn cluster coffeeBasicString contains=@Spell,coffeeEscape 84 | " An interpolated string 85 | syn cluster coffeeInterpString contains=@coffeeBasicString,coffeeInterp 86 | 87 | " Regular strings 88 | syn region coffeeString start=/"/ skip=/\\\\\|\\"/ end=/"/ 89 | \ contains=@coffeeInterpString 90 | syn region coffeeString start=/'/ skip=/\\\\\|\\'/ end=/'/ 91 | \ contains=@coffeeBasicString 92 | hi def link coffeeString String 93 | 94 | " A integer, including a leading plus or minus 95 | syn match coffeeNumber /\i\@/ display 98 | syn match coffeeNumber /\<0b[01]\+\>/ display 99 | hi def link coffeeNumber Number 100 | 101 | " A floating-point number, including a leading plus or minus 102 | syn match coffeeFloat /\i\@/ 109 | \ display 110 | hi def link coffeeReservedError Error 111 | endif 112 | 113 | " A normal object assignment 114 | syn match coffeeObjAssign /@\?\I\i*\s*\ze::\@!/ contains=@coffeeIdentifier display 115 | hi def link coffeeObjAssign Identifier 116 | 117 | syn keyword coffeeTodo TODO FIXME XXX contained 118 | hi def link coffeeTodo Todo 119 | 120 | syn match coffeeComment /#.*/ contains=@Spell,coffeeTodo 121 | hi def link coffeeComment Comment 122 | 123 | syn region coffeeBlockComment start=/####\@!/ end=/###/ 124 | \ contains=@Spell,coffeeTodo 125 | hi def link coffeeBlockComment coffeeComment 126 | 127 | " A comment in a heregex 128 | syn region coffeeHeregexComment start=/#/ end=/\ze\/\/\/\|$/ contained 129 | \ contains=@Spell,coffeeTodo 130 | hi def link coffeeHeregexComment coffeeComment 131 | 132 | " Embedded JavaScript 133 | syn region coffeeEmbed matchgroup=coffeeEmbedDelim 134 | \ start=/`/ skip=/\\\\\|\\`/ end=/`/ 135 | \ contains=@coffeeJS 136 | hi def link coffeeEmbedDelim Delimiter 137 | 138 | syn region coffeeInterp matchgroup=coffeeInterpDelim start=/#{/ end=/}/ contained 139 | \ contains=@coffeeAll 140 | hi def link coffeeInterpDelim PreProc 141 | 142 | " A string escape sequence 143 | syn match coffeeEscape /\\\d\d\d\|\\x\x\{2\}\|\\u\x\{4\}\|\\./ contained display 144 | hi def link coffeeEscape SpecialChar 145 | 146 | " A regex -- must not follow a parenthesis, number, or identifier, and must not 147 | " be followed by a number 148 | syn region coffeeRegex start=/\%(\%()\|\i\@ 3 | " URL: http://github.com/kchmck/vim-coffee-script 4 | " License: WTFPL 5 | 6 | if exists("b:did_indent") 7 | finish 8 | endif 9 | 10 | let b:did_indent = 1 11 | 12 | setlocal autoindent 13 | setlocal indentexpr=GetCoffeeIndent(v:lnum) 14 | " Make sure GetCoffeeIndent is run when these are typed so they can be 15 | " indented or outdented. 16 | setlocal indentkeys+=0],0),0.,=else,=when,=catch,=finally 17 | 18 | " Only define the function once. 19 | if exists("*GetCoffeeIndent") 20 | finish 21 | endif 22 | 23 | " Keywords to indent after 24 | let s:INDENT_AFTER_KEYWORD = '^\%(if\|unless\|else\|for\|while\|until\|' 25 | \ . 'loop\|switch\|when\|try\|catch\|finally\|' 26 | \ . 'class\)\>' 27 | 28 | " Operators to indent after 29 | let s:INDENT_AFTER_OPERATOR = '\%([([{:=]\|[-=]>\)$' 30 | 31 | " Keywords and operators that continue a line 32 | let s:CONTINUATION = '\<\%(is\|isnt\|and\|or\)\>$' 33 | \ . '\|' 34 | \ . '\%(-\@\|\*\|/\@' 45 | 46 | " A compound assignment like `... = if ...` 47 | let s:COMPOUND_ASSIGNMENT = '[:=]\s*\%(if\|unless\|for\|while\|until\|' 48 | \ . 'switch\|try\|class\)\>' 49 | 50 | " A postfix condition like `return ... if ...`. 51 | let s:POSTFIX_CONDITION = '\S\s\+\zs\<\%(if\|unless\)\>' 52 | 53 | " A single-line else statement like `else ...` but not `else if ... 54 | let s:SINGLE_LINE_ELSE = '^else\s\+\%(\<\%(if\|unless\)\>\)\@!' 55 | 56 | " Max lines to look back for a match 57 | let s:MAX_LOOKBACK = 50 58 | 59 | " Syntax names for strings 60 | let s:SYNTAX_STRING = 'coffee\%(String\|AssignString\|Embed\|Regex\|Heregex\|' 61 | \ . 'Heredoc\)' 62 | 63 | " Syntax names for comments 64 | let s:SYNTAX_COMMENT = 'coffee\%(Comment\|BlockComment\|HeregexComment\)' 65 | 66 | " Syntax names for strings and comments 67 | let s:SYNTAX_STRING_COMMENT = s:SYNTAX_STRING . '\|' . s:SYNTAX_COMMENT 68 | 69 | " Get the linked syntax name of a character. 70 | function! s:SyntaxName(linenum, col) 71 | return synIDattr(synID(a:linenum, a:col, 1), 'name') 72 | endfunction 73 | 74 | " Check if a character is in a comment. 75 | function! s:IsComment(linenum, col) 76 | return s:SyntaxName(a:linenum, a:col) =~ s:SYNTAX_COMMENT 77 | endfunction 78 | 79 | " Check if a character is in a string. 80 | function! s:IsString(linenum, col) 81 | return s:SyntaxName(a:linenum, a:col) =~ s:SYNTAX_STRING 82 | endfunction 83 | 84 | " Check if a character is in a comment or string. 85 | function! s:IsCommentOrString(linenum, col) 86 | return s:SyntaxName(a:linenum, a:col) =~ s:SYNTAX_STRING_COMMENT 87 | endfunction 88 | 89 | " Check if a whole line is a comment. 90 | function! s:IsCommentLine(linenum) 91 | " Check the first non-whitespace character. 92 | return s:IsComment(a:linenum, indent(a:linenum) + 1) 93 | endfunction 94 | 95 | " Repeatedly search a line for a regex until one is found outside a string or 96 | " comment. 97 | function! s:SmartSearch(linenum, regex) 98 | " Start at the first column. 99 | let col = 0 100 | 101 | " Search until there are no more matches, unless a good match is found. 102 | while 1 103 | call cursor(a:linenum, col + 1) 104 | let [_, col] = searchpos(a:regex, 'cn', a:linenum) 105 | 106 | " No more matches. 107 | if !col 108 | break 109 | endif 110 | 111 | if !s:IsCommentOrString(a:linenum, col) 112 | return 1 113 | endif 114 | endwhile 115 | 116 | " No good match found. 117 | return 0 118 | endfunction 119 | 120 | " Skip a match if it's in a comment or string, is a single-line statement that 121 | " isn't adjacent, or is a postfix condition. 122 | function! s:ShouldSkip(startlinenum, linenum, col) 123 | if s:IsCommentOrString(a:linenum, a:col) 124 | return 1 125 | endif 126 | 127 | " Check for a single-line statement that isn't adjacent. 128 | if s:SmartSearch(a:linenum, '\') && a:startlinenum - a:linenum > 1 129 | return 1 130 | endif 131 | 132 | if s:SmartSearch(a:linenum, s:POSTFIX_CONDITION) && 133 | \ !s:SmartSearch(a:linenum, s:COMPOUND_ASSIGNMENT) 134 | return 1 135 | endif 136 | 137 | return 0 138 | endfunction 139 | 140 | " Find the farthest line to look back to, capped to line 1 (zero and negative 141 | " numbers cause bad things). 142 | function! s:MaxLookback(startlinenum) 143 | return max([1, a:startlinenum - s:MAX_LOOKBACK]) 144 | endfunction 145 | 146 | " Get the skip expression for searchpair(). 147 | function! s:SkipExpr(startlinenum) 148 | return "s:ShouldSkip(" . a:startlinenum . ", line('.'), col('.'))" 149 | endfunction 150 | 151 | " Search for pairs of text. 152 | function! s:SearchPair(start, end) 153 | " The cursor must be in the first column for regexes to match. 154 | call cursor(0, 1) 155 | 156 | let startlinenum = line('.') 157 | 158 | " Don't need the W flag since MaxLookback caps the search to line 1. 159 | return searchpair(a:start, '', a:end, 'bcn', 160 | \ s:SkipExpr(startlinenum), 161 | \ s:MaxLookback(startlinenum)) 162 | endfunction 163 | 164 | " Try to find a previous matching line. 165 | function! s:GetMatch(curline) 166 | let firstchar = a:curline[0] 167 | 168 | if firstchar == '}' 169 | return s:SearchPair('{', '}') 170 | elseif firstchar == ')' 171 | return s:SearchPair('(', ')') 172 | elseif firstchar == ']' 173 | return s:SearchPair('\[', '\]') 174 | elseif a:curline =~ '^else\>' 175 | return s:SearchPair('\<\%(if\|unless\|when\)\>', '\') 176 | elseif a:curline =~ '^catch\>' 177 | return s:SearchPair('\', '\') 178 | elseif a:curline =~ '^finally\>' 179 | return s:SearchPair('\', '\') 180 | endif 181 | 182 | return 0 183 | endfunction 184 | 185 | " Get the nearest previous line that isn't a comment. 186 | function! s:GetPrevNormalLine(startlinenum) 187 | let curlinenum = a:startlinenum 188 | 189 | while curlinenum > 0 190 | let curlinenum = prevnonblank(curlinenum - 1) 191 | 192 | if !s:IsCommentLine(curlinenum) 193 | return curlinenum 194 | endif 195 | endwhile 196 | 197 | return 0 198 | endfunction 199 | 200 | " Try to find a comment in a line. 201 | function! s:FindComment(linenum) 202 | let col = 0 203 | 204 | while 1 205 | call cursor(a:linenum, col + 1) 206 | let [_, col] = searchpos('#', 'cn', a:linenum) 207 | 208 | if !col 209 | break 210 | endif 211 | 212 | if s:IsComment(a:linenum, col) 213 | return col 214 | endif 215 | endwhile 216 | 217 | return 0 218 | endfunction 219 | 220 | " Get a line without comments or surrounding whitespace. 221 | function! s:GetTrimmedLine(linenum) 222 | let comment = s:FindComment(a:linenum) 223 | let line = getline(a:linenum) 224 | 225 | if comment 226 | " Subtract 1 to get to the column before the comment and another 1 for 227 | " zero-based indexing. 228 | let line = line[:comment - 2] 229 | endif 230 | 231 | return substitute(substitute(line, '^\s\+', '', ''), 232 | \ '\s\+$', '', '') 233 | endfunction 234 | 235 | function! s:GetCoffeeIndent(curlinenum) 236 | let prevlinenum = s:GetPrevNormalLine(a:curlinenum) 237 | 238 | " Don't do anything if there's no previous line. 239 | if !prevlinenum 240 | return -1 241 | endif 242 | 243 | let curline = s:GetTrimmedLine(a:curlinenum) 244 | 245 | " Try to find a previous matching statement. This handles outdenting. 246 | let matchlinenum = s:GetMatch(curline) 247 | 248 | if matchlinenum 249 | return indent(matchlinenum) 250 | endif 251 | 252 | " Try to find a matching `when`. 253 | if curline =~ '^when\>' && !s:SmartSearch(prevlinenum, '\') 254 | let linenum = a:curlinenum 255 | 256 | while linenum > 0 257 | let linenum = s:GetPrevNormalLine(linenum) 258 | 259 | if getline(linenum) =~ '^\s*when\>' 260 | return indent(linenum) 261 | endif 262 | endwhile 263 | 264 | return -1 265 | endif 266 | 267 | let prevline = s:GetTrimmedLine(prevlinenum) 268 | let previndent = indent(prevlinenum) 269 | 270 | " Always indent after these operators. 271 | if prevline =~ s:INDENT_AFTER_OPERATOR 272 | return previndent + &shiftwidth 273 | endif 274 | 275 | " Indent after a continuation if it's the first. 276 | if prevline =~ s:CONTINUATION 277 | " If the line ends in a slash, make sure it isn't a regex. 278 | if prevline =~ '/$' 279 | " Move to the line so we can get the last column. 280 | call cursor(prevlinenum) 281 | 282 | if s:IsString(prevlinenum, col('$') - 1) 283 | return -1 284 | endif 285 | endif 286 | 287 | let prevprevlinenum = s:GetPrevNormalLine(prevlinenum) 288 | 289 | " If the continuation is the first in the file, don't run the other checks. 290 | if !prevprevlinenum 291 | return previndent + &shiftwidth 292 | endif 293 | 294 | let prevprevline = s:GetTrimmedLine(prevprevlinenum) 295 | 296 | if prevprevline !~ s:CONTINUATION && prevprevline !~ s:CONTINUATION_BLOCK 297 | return previndent + &shiftwidth 298 | endif 299 | 300 | return -1 301 | endif 302 | 303 | " Indent after these keywords and compound assignments if they aren't a 304 | " single-line statement. 305 | if prevline =~ s:INDENT_AFTER_KEYWORD || prevline =~ s:COMPOUND_ASSIGNMENT 306 | if !s:SmartSearch(prevlinenum, '\') && prevline !~ s:SINGLE_LINE_ELSE 307 | return previndent + &shiftwidth 308 | endif 309 | 310 | return -1 311 | endif 312 | 313 | " Indent a dot access if it's the first. 314 | if curline =~ s:DOT_ACCESS && prevline !~ s:DOT_ACCESS 315 | return previndent + &shiftwidth 316 | endif 317 | 318 | " Outdent after these keywords if they don't have a postfix condition or are 319 | " a single-line statement. 320 | if prevline =~ s:OUTDENT_AFTER 321 | if !s:SmartSearch(prevlinenum, s:POSTFIX_CONDITION) || 322 | \ s:SmartSearch(prevlinenum, '\') 323 | return previndent - &shiftwidth 324 | endif 325 | endif 326 | 327 | " No indenting or outdenting is needed. 328 | return -1 329 | endfunction 330 | 331 | " Wrap s:GetCoffeeIndent to keep the cursor position. 332 | function! GetCoffeeIndent(curlinenum) 333 | let oldcursor = getpos('.') 334 | let indent = s:GetCoffeeIndent(a:curlinenum) 335 | call setpos('.', oldcursor) 336 | 337 | return indent 338 | endfunction 339 | -------------------------------------------------------------------------------- /vimfiles/colors/defminus.vim: -------------------------------------------------------------------------------- 1 | " defminus.vim -- a GVim colorscheme 2 | " 3 | " Name: defminus 4 | " Maintainer: Maxim Kim 5 | " License: MIT, but who cares? This is colorscheme. 6 | " 7 | " Description: 8 | " 9 | " White background colorscheme. 10 | " There are tons of awesome `dark background` colorschemes and I use them for 11 | " terminal vim but... 12 | " 13 | " I do really like white backgrounds. Not gray, not "light" -- just plane 14 | " simple white background. The one default GVim provides. 15 | " 16 | " Hmm... Default GVim colors are too colorful. And bold. 17 | " 18 | " This has to be fixed. Because why not? 19 | " 20 | " 21 | " Helpers: 22 | " 23 | " :h 'hl' 24 | " or 25 | " :h highlight-default 26 | " to get vim default highlight group names 27 | " 28 | " :h group-name 29 | " to see current syntax highlight of default syntax groups 30 | 31 | set background=light 32 | 33 | hi clear 34 | if exists('syntax_on') 35 | syntax reset 36 | endif 37 | 38 | let g:colors_name = 'defminus' 39 | 40 | "" Helper color groups 41 | hi DefMinusBold guibg=NONE guifg=#000000 gui=bold ctermfg=16 ctermbg=NONE cterm=bold 42 | 43 | "" General 44 | hi Normal guibg=#ffffff guifg=#000000 gui=NONE ctermbg=15 ctermfg=16 45 | hi Cursor guibg=#000000 ctermbg=0 46 | hi lCursor guibg=#ff0000 ctermfg=12 47 | hi NonText guibg=NONE guifg=#c0c0c0 gui=NONE ctermfg=250 cterm=NONE 48 | hi! link SpecialKey NonText 49 | hi Visual guibg=#add6ff guifg=NONE ctermbg=110 ctermfg=NONE 50 | 51 | hi! link Directory DefMinusBold 52 | hi Title guibg=NONE guifg=#3554df gui=bold ctermfg=12 cterm=bold 53 | hi! link Todo Title 54 | 55 | "" UI 56 | hi Statusline guibg=#3c3c3c guifg=#ffffff gui=NONE ctermbg=237 ctermfg=15 cterm=NONE 57 | hi StatuslineNC guibg=#8c8c8c guifg=#ffffff gui=NONE ctermbg=7 ctermfg=255 cterm=NONE 58 | hi VertSplit guibg=#8c8c8c guifg=#8c8c8c gui=NONE ctermbg=7 ctermfg=241 cterm=NONE 59 | hi! link TabLine StatusLineNC 60 | hi! link TabLineFill TabLine 61 | hi! link TabLineSel Normal 62 | 63 | hi WildMenu guibg=#ffff00 guifg=#000000 gui=NONE ctermbg=11 ctermfg=16 64 | hi Folded guibg=#f5f5f5 guifg=#505050 gui=NONE ctermbg=255 ctermfg=238 cterm=NONE 65 | hi! link FoldColumn Folded 66 | hi CursorLine guibg=#eaeaea ctermbg=254 cterm=NONE 67 | hi! link CursorColumn CursorLine 68 | hi LineNr guibg=NONE guifg=#909090 ctermbg=NONE ctermfg=245 69 | hi CursorLineNr guibg=NONE guifg=#000000 gui=NONE ctermbg=NONE ctermfg=16 cterm=NONE 70 | hi SignColumn guibg=NONE ctermbg=NONE 71 | hi Pmenu guibg=#eaeaea guifg=#505050 gui=NONE ctermbg=254 ctermfg=239 72 | hi PmenuSel guibg=#c0c0c0 guifg=#505050 gui=bold ctermbg=250 ctermfg=16 73 | 74 | 75 | "" Syntax 76 | 77 | " generic group-names 78 | hi Comment guifg=#909090 gui=NONE ctermfg=246 79 | 80 | hi Constant guifg=#a04327 gui=NONE ctermfg=130 81 | hi String guifg=#399030 gui=NONE ctermfg=2 82 | " hi! link Character Constant 83 | " hi! link Number Constant 84 | " hi! link Boolean Constant 85 | " hi! link Float Constant 86 | 87 | hi Identifier guifg=#505050 gui=NONE ctermfg=darkgrey 88 | hi! link Function Identifier 89 | 90 | hi Statement guifg=#af00db gui=NONE ctermfg=128 91 | " hi! link Conditional Statement 92 | " hi! link Repeat Statement 93 | " hi! link Label Statement 94 | " hi! link Operator Statement 95 | " hi! link Keyword Statement 96 | " hi! link Exception Statement 97 | 98 | hi PreProc guifg=#000000 gui=NONE ctermfg=16 cterm=NONE 99 | " hi! link Include PreProc 100 | " hi! link Define PreProc 101 | " hi! link Macro PreProc 102 | " hi! link PreCondit PreProc 103 | 104 | hi Type guifg=#000000 gui=NONE ctermfg=16 term=NONE 105 | " hi! link StorageClass Type 106 | " hi! link Structure Type 107 | " hi! link Typedef Type 108 | 109 | hi Special guifg=#00737b gui=NONE ctermfg=darkcyan 110 | " hi! link SpecialChar Special 111 | " hi! link Tag Special 112 | " hi! link Delimiter Special 113 | " hi! link SpecialComment Special 114 | " hi! link Debug Special 115 | 116 | hi Underlined guifg=#5050c0 gui=underline ctermbg=15 ctermfg=61 cterm=underline 117 | 118 | " vim 119 | hi link vimFuncName Statement 120 | hi link vimVar Normal 121 | hi link vimOper Normal 122 | hi link vimParenSep Normal 123 | hi link vimMapModKey Special 124 | hi link vimMapMod vimMapModKey 125 | hi link vimAutoEvent Constant 126 | hi link vimHiAttrib Constant 127 | hi link vimHiCtermColor Constant 128 | hi link vimCommentTitle Constant 129 | 130 | " python 131 | hi link pythonInclude Statement 132 | hi link pythonBuiltin Statement 133 | hi link pythonConditional Statement 134 | hi link pythonRepeat Statement 135 | hi link pythonOperator Statement 136 | hi link pythonException Statement 137 | 138 | " ruby 139 | hi link rubyInclude Statement 140 | hi link rubyModule Statement 141 | hi link rubyClass Statement 142 | hi link rubyMacro Statement 143 | hi link rubyStringDelimiter String 144 | hi link rubyDefine Statement 145 | hi link rubyMethodName Normal 146 | 147 | " lua 148 | hi link luaFunction Statement 149 | 150 | " elixir 151 | hi link elixirModuleDefine Statement 152 | hi link elixirPrivateDefine Statement 153 | hi link elixirMacroDefine Statement 154 | hi link elixirInclude Statement 155 | hi link elixirDefine Statement 156 | hi link elixirAtom Constant 157 | hi link elixirExUnitMacro Statement 158 | hi link elixirBlockDefinition Statement 159 | hi link elixirFunctionDeclaration Normal 160 | hi link elixirStringDelimiter String 161 | hi link elixirMapDelimiter Special 162 | hi link elixirOperator Identifier 163 | hi link elixirDocString Comment 164 | hi link elixirDocStringDelimiter Comment 165 | hi link elixirDocTest Identifier 166 | hi link elixirVariable Constant 167 | hi link elixirUnusedVariable Comment 168 | hi link elixirKeyword Statement 169 | hi link elixirId Normal 170 | 171 | " properties 172 | hi link jpropertiesIdentifier Statement 173 | hi link jpropertiesString Normal 174 | 175 | " kotlin 176 | hi link ktStructure Statement 177 | hi link ktModifier Statement 178 | 179 | " Go 180 | hi link goDirective Statement 181 | hi link goDeclaration Statement 182 | hi link goType Statement 183 | hi link goDeclType Statement 184 | hi link goSignedInts Statement 185 | hi link goConstants Constant 186 | hi link goBuiltins Statement 187 | 188 | " C 189 | hi link cInclude Constant 190 | hi link cPreCondit Constant 191 | hi link cDefine Constant 192 | hi link cType Statement 193 | hi link cStructure Statement 194 | hi link cStorageClass Statement 195 | 196 | " Cpp 197 | hi link cppStructure Statement 198 | hi link cppModifier Statement 199 | hi link cppType Statement 200 | 201 | " TCL 202 | hi link tclProcCommand Statement 203 | hi link tclVarRef Identifier 204 | hi link tcltkWidgetColor Statement 205 | 206 | " xml 207 | hi link xmlTagName Statement 208 | hi link xmlTagN Statement 209 | hi link xmlTag Statement 210 | hi link xmlEndTag Statement 211 | hi link xmlEntity Statement 212 | hi link xmlEntityPunct Statement 213 | hi link xmlAttrib Constant 214 | 215 | " html 216 | hi link htmlTagName Statement 217 | hi link htmlTag Identifier 218 | hi link htmlEndTag Identifier 219 | hi link htmlArg Constant 220 | hi link htmlSpecialTagName Statement 221 | hi link htmlSpecialChar SpecialChar 222 | 223 | " css 224 | hi link cssColor Constant 225 | hi link cssPseudoClassId Identifier 226 | hi link cssClassName Identifier 227 | hi link cssIdentifier Identifier 228 | hi link cssAtRule Identifier 229 | 230 | " javascript 231 | hi link javaScriptIdentifier Statement 232 | hi link javaScriptFunction Statement 233 | hi link javaScriptOperator Statement 234 | hi link javaScriptType Identifier 235 | hi link javaScriptNumber Constant 236 | 237 | " yaml 238 | hi link yamlBlockMappingKey Statement 239 | hi link yamlKeyValueDelimiter Statement 240 | hi link yamlDocumentStart Comment 241 | 242 | " json 243 | hi link jsonKeyword Statement 244 | hi link jsonKeywordMatch Statement 245 | hi link jsonString String 246 | hi link jsonQuote Normal 247 | hi link yamlKeyValueDelimiter Statement 248 | 249 | " sql 250 | hi link sqlKeyword Statement 251 | 252 | " java 253 | hi javaCommentTitle guifg=#909090 gui=bold ctermfg=246 254 | hi link javaExternal Statement 255 | hi link javaScopeDecl Statement 256 | hi link javaClassDecl Statement 257 | hi link javaStorageClass Statement 258 | hi link javaType Statement 259 | hi link javaOperator Statement 260 | hi link javaConstant Constant 261 | hi link javaDocTags String 262 | hi link javaDocParam Constant 263 | hi link javaDocSeeTagParam Constant 264 | 265 | " c# 266 | hi link csUnspecifiedStatement Statement 267 | hi link csStorage Statement 268 | hi link csModifier Statement 269 | hi link csClass Statement 270 | hi link csType Statement 271 | hi link csOpSymbols Normal 272 | hi link csLogicSymbols Normal 273 | 274 | " clojure 275 | hi link clojureMacro Statement 276 | hi link clojureDefine Statement 277 | hi link clojureFunc Statement 278 | 279 | " php 280 | hi link phpDocTags String 281 | hi link phpDocCustomTags String 282 | hi link phpStructure Statement 283 | hi link phpInclude Statement 284 | hi link phpStorageClass Statement 285 | hi link phpDefine Statement 286 | hi link phpVarSelector Identifier 287 | hi link phpSpecialFunction Identifier 288 | hi link phpOperator Normal 289 | hi link phpComparison Normal 290 | hi link phpType Constant 291 | 292 | " dos batch 293 | hi link dosbatchImplicit Statement 294 | 295 | " sh 296 | hi link shSet Statement 297 | hi link shQuote Identifier 298 | 299 | " R 300 | hi link rFunction Statement 301 | hi link rType Statement 302 | hi link rOperator Normal 303 | hi link rAssign Normal 304 | 305 | " markdown 306 | hi link markdownH1 Title 307 | hi link markdownH2 Title 308 | hi link markdownH3 Title 309 | hi link markdownH4 Title 310 | hi link markdownH5 Title 311 | hi link markdownH6 Title 312 | hi link markdownHeadingDelimiter Special 313 | hi link markdownHeadingRule Special 314 | hi link markdownUrl Underlined 315 | hi link markdownLinkText String 316 | hi link markdownLinkTextDelimiter Identifier 317 | hi link markdownLinkDelimiter Identifier 318 | hi link markdownUrlDelimiter Identifier 319 | hi link markdownListMarker Special 320 | hi link markdownCode Constant 321 | hi link markdownCodeDelimiter markdownCode 322 | 323 | " asciidoctor 324 | hi link asciidoctorListMarker Special 325 | 326 | "" Diff 327 | hi diffAdd guibg=#c9f9c9 ctermbg=194 328 | hi diffChange guibg=#f9f9c9 ctermbg=230 329 | hi diffText guibg=#f9d999 guifg=NONE gui=NONE ctermbg=223 ctermfg=NONE cterm=NONE 330 | hi diffDelete guibg=#f9c9c9 guifg=#707070 gui=NONE ctermbg=224 ctermfg=243 cterm=NONE 331 | 332 | "" fugitive 333 | hi! link fugitiveHeader DefMinusBold 334 | hi! link fugitiveHeading DefMinusBold 335 | hi! link gitKeyword DefMinusBold 336 | hi link gitIdentityKeyword gitKeyword 337 | hi link fugitiveModifier Statement 338 | hi link fugitiveSymbolicRef Constant 339 | hi link diffIndexLine Identifier 340 | hi link diffFile Title 341 | hi link diffNewFile Title 342 | hi link diffLine fugitiveHeading 343 | hi link diffSubName diffLine 344 | hi diffAdded guibg=NONE guifg=#009000 ctermfg=darkgreen 345 | hi diffRemoved guibg=NONE guifg=#c00000 ctermfg=darkred 346 | hi link gitCommitSummary Title 347 | hi link gitCommitHeader fugitiveHeader 348 | hi link gitCommitSelectedType Constant 349 | hi link gitCommitSelectedFile Normal 350 | 351 | "" Flog 352 | hi! link flogDate Identifier 353 | hi! link flogHash Constant 354 | hi! link flogAuthor String 355 | hi! link flogGraphEdge0 Special 356 | hi! link flogGraphEdge1 Constant 357 | hi! link flogGraphEdge2 String 358 | hi! link flogGraphEdge3 Statement 359 | hi! link flogGraphEdge4 Special 360 | hi! link flogGraphEdge5 Constant 361 | hi! link flogGraphEdge6 String 362 | hi! link flogGraphEdge7 Statement 363 | hi! link flogGraphEdge8 Special 364 | hi! link flogGraphEdge9 Constant 365 | 366 | "" minpac 367 | hi link minpacName Statement 368 | 369 | "" UltiSnips 370 | hi link snipSnippetTrigger Normal 371 | hi link snipMirror Special 372 | hi link snipTabStop Special 373 | 374 | "" help 375 | hi link helpHeader Title 376 | hi link helpHeadLine Title 377 | hi link helpHyperTextEntry Statement 378 | hi link helpHyperTextJump Underlined 379 | hi link helpExample Constant 380 | hi link helpURL Underlined 381 | hi helpSectionDelim guifg=#909090 ctermfg=246 382 | hi link helpOption Constant 383 | 384 | "" netrw 385 | hi link netrwDateSep Normal 386 | hi link netrwTimeSep Normal 387 | hi link netrwExe Constant 388 | hi link netrwDir Directory 389 | hi link netrwClassify Directory 390 | hi link netrwTreeBar Delimiter 391 | 392 | "" quickfix 393 | hi link qfFilename Comment 394 | hi link qfSeparator Special 395 | hi link qfLineNr Special 396 | 397 | "" LeaderF 398 | " separators have an issue -- they are changed by LeaderF 399 | let s:leaderf_modes = [ 400 | \'File', 'Buffer', 'Mru', 'Help', 'Rg', 401 | \'Line', 'BufTag', 'Function', 'Cmd_History', 402 | \'Colorscheme', 'Self' 403 | \] 404 | for lf_mode in s:leaderf_modes 405 | execute 'hi Lf_hl_'.lf_mode.'_stlName guibg=#3c3c3c guifg=#c0c0c0 gui=NONE ctermbg=237 ctermfg=250' 406 | execute 'hi Lf_hl_'.lf_mode.'_stlMode guibg=#3c3c3c guifg=#c0c0c0 gui=NONE ctermbg=237 ctermfg=250' 407 | execute 'hi Lf_hl_'.lf_mode.'_stlCategory guibg=#3c3c3c guifg=#c0c0c0 gui=NONE ctermbg=237 ctermfg=250' 408 | execute 'hi Lf_hl_'.lf_mode.'_stlCwd guibg=#3c3c3c guifg=#ffffff gui=NONE ctermbg=237 ctermfg=15' 409 | execute 'hi Lf_hl_'.lf_mode.'_stlSeparator0 guibg=#3c3c3c guifg=#c0c0c0 gui=NONE ctermbg=237 ctermfg=250' 410 | execute 'hi Lf_hl_'.lf_mode.'_stlSeparator1 guibg=#3c3c3c guifg=#c0c0c0 gui=NONE ctermbg=237 ctermfg=250' 411 | execute 'hi Lf_hl_'.lf_mode.'_stlSeparator2 guibg=#3c3c3c guifg=#c0c0c0 gui=NONE ctermbg=237 ctermfg=250' 412 | execute 'hi Lf_hl_'.lf_mode.'_stlSeparator3 guibg=#3c3c3c guifg=#c0c0c0 gui=NONE ctermbg=237 ctermfg=250' 413 | execute 'hi Lf_hl_'.lf_mode.'_stlSeparator4 guibg=#3c3c3c guifg=#c0c0c0 gui=NONE ctermbg=237 ctermfg=250' 414 | execute 'hi Lf_hl_'.lf_mode.'_stlSeparator5 guibg=#3c3c3c guifg=#c0c0c0 gui=NONE ctermbg=237 ctermfg=250' 415 | execute 'hi Lf_hl_'.lf_mode.'_stlLineInfo guibg=#3c3c3c guifg=#ffffff gui=NONE ctermbg=237 ctermfg=250' 416 | execute 'hi Lf_hl_'.lf_mode.'_stlNameOnlyMode guibg=#3c3c3c guifg=#c0c0c0 gui=NONE ctermbg=237 ctermfg=250' 417 | execute 'hi Lf_hl_'.lf_mode.'_stlRegexMode guibg=#3c3c3c guifg=#c0c0c0 gui=NONE ctermbg=237 ctermfg=250' 418 | execute 'hi Lf_hl_'.lf_mode.'_stlFullPathMode guibg=#3c3c3c guifg=#c0c0c0 gui=NONE ctermbg=237 ctermfg=250' 419 | execute 'hi Lf_hl_'.lf_mode.'_stlFuzzyMode guibg=#3c3c3c guifg=#c0c0c0 gui=NONE ctermbg=237 ctermfg=250' 420 | execute 'hi Lf_hl_'.lf_mode.'_stlTotal guibg=#3c3c3c guifg=#ffffff gui=NONE ctermbg=237 ctermfg=15' 421 | execute 'hi Lf_hl_'.lf_mode.'_stlBlank guibg=#3c3c3c guifg=#ffffff gui=NONE ctermbg=237 ctermfg=15' 422 | endfor 423 | 424 | hi link Lf_hl_bufDirname Comment 425 | hi link Lf_hl_funcDirname Comment 426 | hi link Lf_hl_rgFilename Comment 427 | hi link Lf_hl_rgTagFile Comment 428 | 429 | "" fzf 430 | hi fzfFg ctermfg=8 431 | hi fzfFgPlus ctermfg=4 432 | hi fzfHl ctermfg=5 433 | hi fzfPrompt ctermfg=4 434 | let g:fzf_colors = { 435 | \ 'fg': ['fg', 'fzfFg'], 436 | \ 'fg+': ['fg', 'fzfFgPlus'], 437 | \ 'pointer': ['fg', 'fzfFgPlus'], 438 | \ 'prompt': ['fg', 'fzfPrompt'], 439 | \ 'hl': ['fg', 'fzfHl'], 440 | \ 'hl+': ['fg', 'fzfHl'] } 441 | 442 | 443 | "" CtrlP 444 | " hi CtrlPMatch guifg=#1540AD gui=bold 445 | 446 | "" ALE 447 | hi link ALEWarningSign SignColumn 448 | hi link ALEErrorSign WarningMsg 449 | 450 | "" Rest console 451 | hi! link restHost Underlined 452 | hi! link restKeyword Statement 453 | 454 | "" Plantuml https://github.com/aklt/plantuml-syntax 455 | hi link plantumlPreProc Statement 456 | hi link plantumlKeyword Statement 457 | hi link plantumlTypeKeyword Statement 458 | hi link plantumlColonLine String 459 | hi link plantumlActivityLabel Normal 460 | hi link plantumlHorizontalArrow Special 461 | hi link plantumlDirectedOrVerticalArrowLR Special 462 | hi link plantumlDirectedOrVerticalArrowRL Special 463 | --------------------------------------------------------------------------------