├── .gitignore ├── other-tools └── agignore ├── tmux ├── README.md └── tmux.conf ├── zsh ├── zplug.zsh ├── zshrc ├── aliases.zsh └── extras.zsh ├── nvim ├── snippets │ ├── elixir_custom.snippets │ ├── html_hbs.snip │ ├── javascript_ember.snip │ └── ruby.snippets ├── projections │ ├── phoenix.json │ └── ember.json ├── auto_cmd.vim ├── colors │ ├── beekai.vim │ ├── railscasts.vim │ ├── smyck.vim │ ├── lucario.vim │ ├── monokai.vim │ ├── flatui.vim │ ├── molokai.vim │ ├── Tomorrow-Night-Bright.vim │ ├── Tomorrow-Night.vim │ ├── jellybeans.vim │ └── gruvbox.vim ├── bundles.vim ├── fzf.vim ├── init.vim └── plugin_config.vim ├── README.md └── .dir_colours /.gitignore: -------------------------------------------------------------------------------- 1 | *.swp 2 | *~ 3 | nvim/autoload 4 | -------------------------------------------------------------------------------- /other-tools/agignore: -------------------------------------------------------------------------------- 1 | tmp/ 2 | node_modules/ 3 | dist/ 4 | bower_components/ 5 | /bower_components 6 | /node_modules 7 | cache/ 8 | *.sql 9 | *.sqlite3 10 | *.tags* 11 | *.gemtags* 12 | *.tmp* 13 | *.old 14 | tags 15 | Session.vim 16 | -------------------------------------------------------------------------------- /tmux/README.md: -------------------------------------------------------------------------------- 1 | #### About 2 | 3 | Usage: 4 | 5 | ``` 6 | ln -s ~/dotfiles/tmux/tmux.conf ~/.tmux.conf 7 | ``` 8 | 9 | Worth mentioning is the `tmux-plugins` project which I've used and found it quite useful. 10 | (used only few plugins). 11 | 12 | - [tmux-plugins](https://github.com/tmux-plugins/tpm) 13 | -------------------------------------------------------------------------------- /zsh/zplug.zsh: -------------------------------------------------------------------------------- 1 | source ~/.zplug/zplug 2 | 3 | zplug "zsh-users/zsh-syntax-highlighting" 4 | zplug "zsh-users/zsh-history-substring-search" 5 | 6 | zplug "junegunn/fzf-bin", \ 7 | as:command, \ 8 | from:gh-r, \ 9 | file:fzf 10 | 11 | # Support oh-my-zsh plugins and the like 12 | zplug "plugins/git", from:oh-my-zsh 13 | zplug "plugins/command-not-found", from:oh-my-zsh 14 | zplug "plugins/extract", from:oh-my-zsh 15 | zplug "themes/robbyrussell", from:oh-my-zsh 16 | 17 | if ! zplug check --verbose; then 18 | printf "Install? [y/N]: " 19 | if read -q; then 20 | echo; zplug install 21 | fi 22 | fi 23 | -------------------------------------------------------------------------------- /zsh/zshrc: -------------------------------------------------------------------------------- 1 | PATH=$PATH:/home/vysakh/.local/bin:/home/vysakh/.rbenv/shims:/home/vysakh/.rbenv/bin:/home/vysakh/github/node-v4.1.1-linux-x86/bin:/home/vysakh/github/elixir/bin 2 | export PATH 3 | 4 | export NODE_PATH=/home/vysakh/github/node-v4.1.1-linux-x86/lib/node_modules 5 | BASE="$HOME/dotfiles/zsh" 6 | source $BASE/aliases.zsh 7 | #DISABLE_CORRECTION=”true” 8 | unsetopt correct_all 9 | export EDITOR='vim' 10 | export VISUAL=vim 11 | #open tmux with utf-8 support instead of relying on local, got from dhruvsagar post 12 | alias tmux="tmux -u" 13 | xhost local:vysakh > /dev/null 14 | 15 | export TERM=xterm-256color 16 | #[ -n "$TMUX" ] && export TERM=screen-256color 17 | eval `gnome-keyring-daemon --start` 18 | 19 | LISTMAX=0 # ask to complete if top of list would scroll off screen 20 | 21 | source $BASE/zplug.zsh 22 | zplug load 23 | source $BASE/extras.zsh 24 | [ -f ~/.fzf.zsh ] && source ~/.fzf.zsh 25 | 26 | export FZF_DEFAULT_COMMAND='(git ls-tree -r --name-only HEAD || 27 | find * -name ".*" -prune -o -type f -print -o -type l -print) 2> /dev/null' 28 | export ENHANCD_FILTER="fzf" 29 | 30 | source ~/secrets.zsh 31 | . $HOME/.asdf/asdf.sh 32 | export ANDROID_HOME=/home/vysakh/Android/Sdk 33 | -------------------------------------------------------------------------------- /nvim/snippets/elixir_custom.snippets: -------------------------------------------------------------------------------- 1 | snippet fnn 2 | fn 3 | ${1:args} -> ${0} 4 | end 5 | 6 | snippet tec 7 | test "${1:test_name}", %{conn: conn} do 8 | conn = ${2:type} conn, ${3:resource}_path(conn, ${4:action}), ${5:attrs} 9 | resp = json_response(conn, ${6:status}) 10 | assert ${7:assertion} 11 | end 12 | 13 | snippet tea 14 | test "${1:test_name}" do 15 | assert ${2:`substitute(substitute(vim_snippets#Filename(), '_test$', '', ''), '\(_\|^\)\(.\)', '\u\2', 'g')`}.${3:method_name} == ${4:result} 16 | end 17 | 18 | snippet ass 19 | assert ${1:`substitute(substitute(vim_snippets#Filename(), '_test$', '', ''), '\(_\|^\)\(.\)', '\u\2', 'g')`}.${2:method_name} == ${3:result} 20 | 21 | snippet @mdoc 22 | @moduledoc """ 23 | ${1:#:Print the FizzBuzz sequence from 1 to n#} 24 | 25 | ## Example 26 | 27 | ${2: }iex> ${3:`substitute(substitute(vim_snippets#Filename(), '_test$', '', ''), '\(_\|^\)\(.\)', '\u\2', 'g')`}.${4:method_name} 28 | $2${5:#:1 2 Fizz 4 Buzz :#} 29 | 30 | """ 31 | ${6} 32 | snippet @doc 33 | @doc """ 34 | ${1:#:Print the FizzBuzz sequence from 1 to n#} 35 | 36 | ## Example 37 | 38 | ${2: }iex> ${3:`substitute(substitute(vim_snippets#Filename(), '_test$', '', ''), '\(_\|^\)\(.\)', '\u\2', 'g')`}.${4:method_name} 39 | $2${5:#:1 2 Fizz 4 Buzz :#} 40 | 41 | """ 42 | ${6} 43 | 44 | snippet eat 45 | alter table(:${1:tablename}) do 46 | ${2:"add_or_modify_or_remove"} 47 | end 48 | 49 | snippet eai 50 | create index(:${1:table}, [:${2:columns}], name: ${3:name}, unique: true) 51 | -------------------------------------------------------------------------------- /nvim/snippets/html_hbs.snip: -------------------------------------------------------------------------------- 1 | #ember handle bar related snippets, to load this see auto_config.vim 2 | snippet lit 3 | abbr #link-to 4 | options head 5 | {{#link-to '${1}' ${2}}} ${3} {{/link-to}} 6 | 7 | snippet e 8 | abbr #each 9 | options head 10 | {{#each ${1}}} 11 | ${2} 12 | {{/each}} 13 | 14 | snippet ea 15 | abbr #each in 16 | options head 17 | {{#each ${1} as |${2}|}} 18 | ${3} 19 | {{/each}} 20 | 21 | snippet eai 22 | abbr #each as index 23 | options head 24 | {{#each ${1} as |${2} ${3}|}} 25 | ${4} 26 | {{/each}} 27 | 28 | snippet out 29 | abbr outlet 30 | options head 31 | {{outlet}} 32 | 33 | snippet #if 34 | abbr ifblock 35 | options head 36 | {{#if ${1}}} 37 | ${2} 38 | {{/if}} 39 | 40 | snippet #ife 41 | abbr ifblock 42 | options head 43 | {{#if ${1}}} 44 | ${2} 45 | {{else}} 46 | ${3} 47 | {{/if}} 48 | 49 | 50 | snippet #unless 51 | abbr unlessblock 52 | options head 53 | {{#unless ${1}}} 54 | ${2} 55 | {{/unless}} 56 | 57 | snippet act 58 | abbr action 59 | options head 60 | {{action "${1}" ${2}}} 61 | 62 | 63 | snippet #in 64 | abbr input 65 | options head 66 | {{input type="${1}" value=${2}}} 67 | 68 | snippet #es 69 | abbr select 70 | options head 71 | {{view Ember.Select content=${1} name="${2}" optionLabelPath="${3}" value=${4} prompt="Select ${5}"}} 72 | 73 | snippet hbs 74 | 77 | -------------------------------------------------------------------------------- /nvim/projections/phoenix.json: -------------------------------------------------------------------------------- 1 | { 2 | "web/models/*.ex": { 3 | "command": "model", 4 | "alternate": "test/models/{}_test.exs", 5 | "template": [ 6 | ] 7 | }, 8 | 9 | "web/controllers/*_controller.ex": { 10 | "command": "controller", 11 | "alternate": "test/controllers/{}_controller_test.exs", 12 | "template": [ 13 | "defmodule <`1`>.{camelcase|capitalize}Controller do", 14 | " use <`1`>.Web, :controller", 15 | "", 16 | " <`2`>", 17 | "end" 18 | ] 19 | }, 20 | 21 | "web/channels/*.ex": { 22 | "command": "channel", 23 | "alternate": "test/channels/{}_test.exs", 24 | "template": [ 25 | ] 26 | }, 27 | "web/styles/*.css": { 28 | "command": "style", 29 | "template": [ 30 | "/* {}.css */", 31 | "", 32 | ] 33 | }, 34 | 35 | "web/templates/*.html.eex": { 36 | "command": "template", 37 | "alternate": "web/components/{}.ex" 38 | }, 39 | 40 | "web/utils/*.ex": { 41 | "command": "util" 42 | }, 43 | 44 | "web/views/*.ex": { 45 | "command": "view", 46 | "template": [ 47 | ] 48 | }, 49 | 50 | "web/*.ex": { 51 | "alternate": "test/{}_test.exs", 52 | "type": "source" 53 | }, 54 | 55 | "test/controllers/*_controller_test.exs":{ 56 | "alternate": "web/controllers/{}_controller.ex", 57 | "type": "test", 58 | "template": [ 59 | "defmodule <`1`>.{camelcase|capitalize}ControllerTest do", 60 | " use <`2`>.ConnCase", 61 | "", 62 | " setup do", 63 | " conn = conn() |> put_req_header(\"accept\", \"application/json\")", 64 | " {:ok, conn: conn}", 65 | " end", 66 | "", 67 | " <`2`>", 68 | "end" 69 | ] 70 | }, 71 | 72 | "test/models/*_test.exs":{ 73 | "alternate": "web/models/{}.ex", 74 | }, 75 | "test/channels/*_test.exs":{ 76 | "alternate": "web/channels/{}.ex", 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /nvim/auto_cmd.vim: -------------------------------------------------------------------------------- 1 | " Save when losing focus 2 | set autowriteall " Auto-save files when switching buffers or leaving vim. 3 | au FocusLost * silent! :wa 4 | au TabLeave * silent! :wa 5 | 6 | " on every change of text in the file, autosaves 7 | set updatetime=1000 8 | "autocmd CursorHoldI * silent w 9 | "autocmd TextChanged,TextChangedI silent! :wa 10 | autocmd CursorHold * update 11 | autocmd CursorHold,CursorHoldI * update 12 | 13 | let g:mustache_abbreviations = 1 14 | " Resize splits when the window is resized 15 | au VimResized * exe "normal! \=" 16 | 17 | "remove whitespace on writing 18 | autocmd FileType * autocmd BufWritePre * :%s/\s\+$//e 19 | 20 | " Ruby Configurations 21 | """"""""""""""""""""" 22 | autocmd filetype ruby setlocal shiftwidth=2 tabstop=2 23 | autocmd FileType ruby setlocal colorcolumn=80 24 | autocmd filetype ruby iabbr rmi require 'minitest/autorun' 25 | autocmd filetype ruby iabbr rmp require 'minitest/pride' 26 | autocmd FileType ruby setlocal colorcolumn=80 27 | if !exists('g:neocomplete#force_omni_input_patterns') 28 | let g:neocomplete#force_omni_input_patterns = {} 29 | endif 30 | let g:neocomplete#force_omni_input_patterns.ruby = '[^. *\t]\.\w*\|\h\w*::' 31 | 32 | "" HTML configurations 33 | """""""""""""""""""""" 34 | autocmd FileType html setlocal shiftwidth=2 tabstop=2 35 | autocmd FileType eruby setlocal shiftwidth=2 tabstop=2 36 | 37 | """""""""""""""""""""""""""""" 38 | "au BufNewFile,BufReadPost *.coffee setlocal foldmethod=indent 39 | au BufNewFile,BufReadPost *.coffee setlocal shiftwidth=2 expandtab 40 | 41 | " Javascript configurations 42 | """"""""""""""""""""""""""" 43 | autocmd FileType javascript.jsx setlocal shiftwidth=2 tabstop=2 44 | 45 | au BufNewFile,BufReadPost *.js setl sw=2 sts=2 et 46 | autocmd FileType javascript setlocal colorcolumn=80 47 | 48 | " Enable omni completion. 49 | autocmd FileType css setlocal omnifunc=csscomplete#CompleteCSS 50 | autocmd FileType html,markdown setlocal omnifunc=htmlcomplete#CompleteTags 51 | autocmd FileType javascript setlocal omnifunc=javascriptcomplete#CompleteJS 52 | 53 | " change filetypes 54 | au BufNewFile,BufRead *.erb set filetype=eruby.html 55 | au BufNewFile,BufRead *.eex set filetype=eruby.html 56 | au BufNewFile,BufRead *.es6 set filetype=javascript 57 | -------------------------------------------------------------------------------- /nvim/projections/ember.json: -------------------------------------------------------------------------------- 1 | { 2 | "app/adapters/*.js": { 3 | "command": "adapter", 4 | "template": [ 5 | "// export default DS.{capitalize}Adapter.extend();", 6 | ] 7 | }, 8 | 9 | "app/components/*.js": { 10 | "command": "component", 11 | "alternate": "tests/unit/components/{}-test.js", 12 | "template": [ 13 | "export default Ember.Component.extend({", 14 | "", 15 | "});", 16 | ] 17 | }, 18 | 19 | "app/helpers/*.js": { 20 | "command": "helper", 21 | "template": [ 22 | "// Please note that Handlebars helpers will only be found automatically by the", 23 | "// resolver if their name contains a dash (reverse-word, translate-text, etc.)", 24 | "// For more details: http://stefanpenner.github.io/ember-app-kit/guides/using-modules.html", 25 | "", 26 | "export default Ember.Handlebars.makeBoundHelper(function() {", 27 | "", 28 | "});", 29 | ] 30 | }, 31 | 32 | "app/models/*.js": { 33 | "command": "model", 34 | "alternate": "tests/unit/models/{}-test.js", 35 | "template": [ 36 | "export default DS.Model.extend({", 37 | "", 38 | "});", 39 | ] 40 | }, 41 | 42 | "app/router.js": { 43 | "command": "router" 44 | }, 45 | 46 | "app/routes/*.js": { 47 | "command": "route", 48 | "template": [ 49 | "export default Ember.Route.extend({", 50 | "", 51 | "});", 52 | ] 53 | 54 | }, 55 | 56 | "app/styles/*.scss": { 57 | "command": "stylesheet", 58 | "template": [ 59 | "/* {}.scss */", 60 | "", 61 | ] 62 | }, 63 | 64 | "app/templates/*.hbs": { 65 | "command": "template", 66 | "alternate": "app/components/{}.js" 67 | }, 68 | 69 | "app/utils/*.js": { 70 | "command": "util" 71 | }, 72 | 73 | "app/views/*.js": { 74 | "command": "view", 75 | "template": [ 76 | "export default Ember.View.extend({", 77 | "", 78 | "});", 79 | ] 80 | }, 81 | 82 | "app/*.js": { 83 | "alternate": "tests/unit/{}-test.js", 84 | "type": "source" 85 | }, 86 | 87 | "tests/unit/*-test.js":{ 88 | "alternate": "app/{}.js", 89 | "type": "unit" 90 | }, 91 | "tests/acceptance/*-test.js":{ 92 | "alternate": "app/templates/{}.hbs", 93 | "type": "acceptance" 94 | } 95 | 96 | } 97 | -------------------------------------------------------------------------------- /nvim/colors/beekai.vim: -------------------------------------------------------------------------------- 1 | " Maintainer: Stephane Demotte 2 | " Version: 1.0 3 | " Last Change: April, 2015 4 | " Credits: This is a modification of BusyBee color scheme 5 | 6 | set background=dark 7 | 8 | hi clear 9 | 10 | if exists("syntax_on") 11 | syntax reset 12 | endif 13 | 14 | let colors_name = "beekai" 15 | 16 | " Vim >= 7.0 specific colors 17 | if version >= 700 18 | hi CursorLine guibg=#111111 ctermbg=234 19 | hi CursorColumn guibg=#111111 ctermbg=234 20 | hi MatchParen guifg=#d0ffc0 guibg=#111111 gui=bold ctermfg=157 ctermbg=237 cterm=bold 21 | hi Pmenu guifg=#ffffff guibg=#111111 ctermfg=255 ctermbg=238 22 | hi PmenuSel guifg=#000000 guibg=#b1d631 ctermfg=0 ctermbg=148 23 | endif 24 | 25 | " General colors 26 | hi Cursor guifg=NONE guibg=#626262 gui=none ctermbg=241 27 | hi Normal guifg=#e2e2e5 guibg=#111111 gui=none ctermfg=253 ctermbg=234 28 | hi NonText guifg=#808080 guibg=#111111 gui=none ctermfg=244 ctermbg=235 29 | hi LineNr guifg=#303030 guibg=#111111 gui=none ctermfg=244 ctermbg=232 30 | hi StatusLine guifg=#d3d3d5 guibg=#303030 gui=none ctermfg=253 ctermbg=238 31 | hi StatusLineNC guifg=#939395 guibg=#303030 gui=none ctermfg=246 ctermbg=238 32 | hi VertSplit guifg=#444444 guibg=#303030 gui=none ctermfg=238 ctermbg=238 33 | hi Folded guibg=#384048 guifg=#a0a8b0 gui=none ctermbg=4 ctermfg=248 34 | hi Title guifg=#f6f3e8 guibg=NONE gui=bold ctermfg=254 cterm=bold 35 | hi Visual guifg=#faf4c6 guibg=#3c414c gui=none ctermfg=254 ctermbg=4 36 | hi SpecialKey guifg=#808080 guibg=#343434 gui=none ctermfg=244 ctermbg=236 37 | 38 | " Syntax highlighting 39 | hi Comment guifg=#3f3f3f gui=italic ctermfg=244 40 | hi Todo guifg=#8f8f8f gui=none ctermfg=245 41 | hi Boolean guifg=#b1d631 gui=none ctermfg=148 42 | hi String guifg=#606060 gui=none ctermfg=148 43 | hi Identifier guifg=#b1d631 gui=none ctermfg=148 44 | hi Function guifg=#ffff00 gui=none ctermfg=255 45 | hi Type guifg=#7e8aa2 gui=none ctermfg=103 46 | hi Statement guifg=#7e8aa2 gui=none ctermfg=103 47 | hi Keyword guifg=#ff68a1 gui=none ctermfg=208 48 | hi Constant guifg=#ff68a1 gui=none ctermfg=208 49 | hi Number guifg=#ff68a1 gui=none ctermfg=208 50 | hi Special guifg=#ff68a1 gui=none ctermfg=208 51 | hi PreProc guifg=#faf4c6 gui=none ctermfg=230 52 | hi Todo guifg=#ff68a1 guibg=#111111 gui=none 53 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | THE DOTFILES 2 | =========== 3 | 4 | #### Vim 5 | 6 | Vim (Neovim) is my favorite text editor. This repo has the custom mappings, plugins etc I use, 7 | still making it more productive. [This a post i wrote about Vim](http://vysakh0.github.io/learning-vim-steering-hacking/) 8 | 9 | ##### Directory structure 10 | 11 | - init (has all the custom settings and configuration) 12 | - auto_config.vim (all the configuration settings related to specific file extensions) 13 | - bundles.vim (all the plugins that can be installed using vundle plugin) 14 | - plugin_config.vim (plugin configuration, mappings) 15 | 16 | #### Zsh 17 | 18 | I have used very less of my own customization(except for zsh/aliases.zsh) and used oh-my-zsh, its plugin. 19 | [This is a small post I wrote about zsh](vysakh0.github.io/flying-start-with-zsh-shell/) 20 | 21 | ##### Files and dirs 22 | 23 | - zshrc (plugins of oh-my-zsh that i use) 24 | - aliases.zsh (aliases that are not in oh-my-zsh, but suitable to workflow) 25 | 26 | 27 | ##### Other command line tools 28 | 29 | - [fzf](https://github.com/junegunn/fzf) - Used for file searches 30 | - [ranger](https://github.com/hut/ranger) - Used as file explorer 31 | 32 | 33 | #### Neovim installation 34 | 35 | ```bash 36 | git clone https://github.com/neovim/neovim 37 | cd neovim 38 | git checkout v0.1.4 39 | make 40 | sudo make install 41 | ``` 42 | 43 | For more or different installation, refer [neovim installation](https://github.com/neovim/neovim/wiki/Installing-Neovim#install-from-source) 44 | 45 | #### Install Zsh and oh-my-zsh 46 | 47 | ``` bash 48 | sudo apt-get update && sudo apt-get install zsh # for ubuntu 49 | curl -L https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh | sh 50 | chsh -s /bin/zsh 51 | ``` 52 | logout or Reboot 53 | 54 | ### Install the settings from the repo 55 | 56 | ```bash 57 | git clone git@github.com:vysakh0/dotfiles.git 58 | 59 | # VIM 60 | ln -s ~/dotfiles/nvim ~/config/.nvim 61 | 62 | # install Vim-Plug which is a plugin manager 63 | curl -fLo ~/.config/nvim/autoload/plug.vim --create-dirs \ 64 | https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim 65 | 66 | # Install plugins using vim-plug 67 | nvim +PlugInstall 68 | 69 | #zsh 70 | ln -s dotfiles/zsh/zshrc ~/.zshrc 71 | 72 | # tmux 73 | ln -s ~/dotfiles/tmux/tmux.conf ~/.tmux.conf 74 | 75 | # ag (silver search) 76 | ln -s ~/dotfiles/other-tools/agignore ~/.agignore 77 | ``` 78 | 79 | ##### Support for other language plugins: 80 | 81 | Neovim makes the support with language easier. Refer [this python support](https://github.com/neovim/python-client) which 82 | one of the plugin in this repo (`deoplete`) uses. 83 | 84 | Begin your code :boom: Bonne Chance :metal: 85 | -------------------------------------------------------------------------------- /nvim/bundles.vim: -------------------------------------------------------------------------------- 1 | call plug#begin('~/.vim/plugged') 2 | 3 | "Tpope's awesomeness 4 | 5 | Plug 'tpope/vim-fugitive' 6 | Plug 'tpope/vim-surround' 7 | Plug 'tpope/vim-endwise' 8 | "Plug 'tpope/vim-rails' 9 | "Plug 'tpope/vim-rake' 10 | Plug 'tpope/vim-dispatch' 11 | Plug 'tpope/vim-markdown' 12 | Plug 'tpope/vim-abolish' 13 | Plug 'tpope/vim-eunuch' 14 | Plug 'tpope/vim-obsession' 15 | Plug 'tpope/vim-projectile' 16 | Plug 'tpope/vim-repeat' 17 | 18 | ""Junegunn's awesomeness 19 | Plug 'junegunn/vim-easy-align' 20 | Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': 'yes \| ./install' } 21 | Plug 'junegunn/fzf.vim' 22 | "Plug 'junegunn/goyo.vim' 23 | 24 | "Shougo's awesomeness 25 | 26 | Plug 'Shougo/deoplete.nvim' 27 | Plug 'Shougo/neosnippet' 28 | Plug 'Shougo/neosnippet-snippets' 29 | 30 | 31 | "Scoorloose" 32 | Plug 'scrooloose/nerdcommenter' 33 | Plug 'scrooloose/syntastic' 34 | 35 | "Osyo-manga 36 | Plug 'osyo-manga/vim-over' 37 | Plug 'osyo-manga/vim-anzu' 38 | 39 | Plug 'Lokaltog/vim-easymotion' 40 | Plug 'christoomey/vim-tmux-navigator' 41 | Plug 'myusuf3/numbers.vim' 42 | Plug 'mustache/vim-mustache-handlebars' 43 | 44 | "Plug 'vim-ruby/vim-ruby' 45 | "Plug 'Keithbsmiley/rspec.vim' 46 | 47 | Plug 'mhinz/vim-startify' 48 | Plug 'altercation/vim-colors-solarized' 49 | Plug 'honza/vim-snippets' 50 | 51 | Plug 'tomtom/tlib_vim' 52 | Plug 'dhruvasagar/vim-table-mode' 53 | Plug 'jiangmiao/auto-pairs' 54 | Plug 'Yggdroot/indentLine' 55 | 56 | Plug 'sickill/vim-pasta' 57 | 58 | Plug 'kshenoy/vim-signature' 59 | 60 | " for git 61 | Plug 'gregsexton/gitv' 62 | Plug 'mhinz/vim-signify' 63 | 64 | Plug 'othree/html5.vim' 65 | Plug 'ap/vim-css-color' 66 | "color picker" 67 | Plug 'pangloss/vim-javascript' 68 | "Plug 'kchmck/vim-coffee-script' 69 | 70 | Plug 'bling/vim-airline' 71 | 72 | "Plug 'koron/nyancat-vim' 73 | 74 | Plug 'nelstrom/vim-textobj-rubyblock' 75 | Plug 'kana/vim-textobj-user' 76 | 77 | "Plug "wookiehangover/jshint.vim" 78 | Plug 'wellle/targets.vim' 79 | Plug 'chriskempson/base16' 80 | 81 | "Plug 'wting/rust.vim' 82 | Plug 'gcmt/wildfire.vim' 83 | Plug 'AndrewRadev/splitjoin.vim' 84 | 85 | Plug 'terryma/vim-multiple-cursors' 86 | 87 | Plug 'junegunn/seoul256.vim' 88 | "Plug 'wellle/tmux-complete.vim' 89 | Plug 'elixir-lang/vim-elixir' 90 | 91 | "Plug 'dahu/vim-asciidoc' 92 | "Plug 'dahu/Asif' 93 | "Plug 'dahu/vimple' 94 | 95 | Plug 'haya14busa/incsearch.vim' 96 | 97 | "Plug 'pgdouyon/vim-accio' 98 | Plug 'benekastah/neomake' 99 | Plug 'janko-m/vim-test' 100 | "Plug 'lambdatoast/elm.vim' 101 | 102 | Plug 'airodactyl/neovim-ranger' 103 | Plug 'justinj/vim-react-snippets' 104 | Plug 'mxw/vim-jsx' 105 | 106 | " Should checkout 107 | "Plug 'sheerun/vim-polyglot' 108 | "Plug 'cohama/lexima.vim' 109 | " 110 | Plug 'pmsorhaindo/syntastic-local-eslint.vim' 111 | call plug#end() 112 | -------------------------------------------------------------------------------- /tmux/tmux.conf: -------------------------------------------------------------------------------- 1 | # command prefix: 2 | set-option -g prefix C-b 3 | bind-key C-b send-prefix 4 | 5 | # OPTIONS 6 | set -g mode-keys vi 7 | 8 | set-option -g default-shell /bin/zsh 9 | # '0' is at the wrong end of the keyboard 10 | set -g base-index 1 11 | 12 | #set clear screen to a different bind key 13 | bind C-l send-keys 'C-l' 14 | 15 | set-window-option -g pane-base-index 1 16 | set-window-option -g automatic-rename on 17 | 18 | # STATUS BAR 19 | set -g status-bg black 20 | set -g status-fg white 21 | set -g window-status-current-fg 'yellow' 22 | set -g status-left '#[fg=green]#{session_name} #[fg=white]|' 23 | set -g status-right-length 60 24 | set -g status-right '| %a %h-%d %H:%M ' 25 | 26 | # Smart pane switching with awareness of vim splits 27 | bind -n C-h run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-h) || tmux select-pane -L" 28 | bind -n C-j run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-j) || tmux select-pane -D" 29 | bind -n C-k run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-k) || tmux select-pane -U" 30 | bind -n C-l run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-l) || tmux select-pane -R" 31 | bind -n C-\ run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys 'C-\\') || tmux select-pane -l" 32 | 33 | # open window from the current pane path 34 | bind '"' split-window -c "#{pane_current_path}" 35 | bind % split-window -h -c "#{pane_current_path}" 36 | bind c new-window -c "#{pane_current_path}""'"' 37 | 38 | # kill-server 39 | bind k confirm kill-server 40 | 41 | # copycat saved searches 42 | # rails request 43 | set -g @copycat_search_C-e '^Processing[[:space:]]by[[:space:]][^[:space:]]*' 44 | # digital ocean instance id select 45 | set -g @copycat_search_D '^[[:digit:]]+' 46 | 47 | set -g @resurrect-processes 'ssh mosh psql mysql sqlite3 "~ember server->ems" pry iex memcached "~mix phoenix.server->mps" "~rails server->rs" "~rails console" "git log" "~grip"' 48 | set -g @resurrect-strategy-vim 'session' 49 | set -g @resurrect-strategy-nvim 'session' 50 | set -g @resurrect-capture-pane-contents 'on' 51 | set -g @resurrect-pane-contents-area 'full' 52 | 53 | set -g @continuum-restore 'on' 54 | set -g @continuum-boot 'on' 55 | set -g @continuum-boot-options 'fullscreen' 56 | 57 | # tmux plugin manager - http://git.io/lRjjWQ 58 | set -g @tpm_plugins ' \ 59 | tmux-plugins/tpm \ 60 | tmux-plugins/tmux-sessionist \ 61 | tmux-plugins/tmux-copycat \ 62 | tmux-plugins/tmux-yank \ 63 | tmux-plugins/tmux-sensible \ 64 | tmux-plugins/tmux-open \ 65 | tmux-plugins/tmux-resurrect \ 66 | tmux-plugins/tmux-continuum \ 67 | tmux-plugins/tmux-sidebar \ 68 | ' 69 | run-shell '~/.tmux/plugins/tpm/tpm' 70 | -------------------------------------------------------------------------------- /nvim/snippets/javascript_ember.snip: -------------------------------------------------------------------------------- 1 | snippet import 2 | import Ember from "ember"; 3 | 4 | snippet export 5 | export default ${1:#:Component}.extend({ 6 | ${2:#:body} 7 | }); 8 | 9 | snippet service 10 | ${1:#:service_name}: service(), 11 | ${2} 12 | 13 | snippet conste 14 | const { ${1:#:Component, computed} } = ${2:Ember}; 15 | ${3} 16 | 17 | snippet fne 18 | ${1:#:functionName} (${2:#:params}) { 19 | } 20 | 21 | snippet eg 22 | ${1:this.}get('${2:#:property}'); 23 | 24 | snippet es 25 | ${1:this}.set('${2:#:property}', ${3:#:value}); 26 | 27 | # Computed properties 28 | 29 | snippet ep 30 | ${1:#:property_name}: computed(${1:#:args}, function() { 31 | ${0:#://body...} 32 | } 33 | 34 | snippet moc 35 | model() { 36 | return this.store.createRecord('${1:#:modelName}'); 37 | } 38 | 39 | snippet mof 40 | model() { 41 | return this.store.find('${1:#:modelName}'); 42 | } 43 | 44 | snippet scr 45 | this.store.createRecord('${1:#:modelName}', { 46 | ${2:#:param} 47 | }); 48 | 49 | snippet ssr 50 | ${1:#:_name}.save().then((${2:#:resp}) => 51 | ${2:#://body...} 52 | }).catch((errors) => { 53 | // show error 54 | }); 55 | 56 | snippet tr 57 | this.route('${1:#:name}'); 58 | 59 | snippet db 60 | ${1:#:attr}: belongsTo('${2:#:attr-type}') 61 | 62 | snippet dh 63 | ${1:#:attr}: hasMany('${2:#:attr-type}') 64 | 65 | snippet da 66 | ${1:#:attr}: attr('${2:#:attr-type}') 67 | 68 | snippet sc 69 | setupController: function(controller, model) { 70 | controller.set('model', model); 71 | ${0:#://body...} 72 | } 73 | snippet ac 74 | actions: { 75 | ${1:#:function_name} (${2:#:params}) { 76 | ${0:#://body...} 77 | } 78 | } 79 | 80 | # testing... 81 | snippet test 82 | test('${1:#:action} ', function(assert) { 83 | ${0} 84 | }); 85 | snippet erun 86 | Ember.run(function() { 87 | ${0} 88 | }); 89 | snippet and 90 | andThen(() => { 91 | ${0} 92 | }); 93 | snippet exp 94 | assert.expect(${1}); 95 | ${1} 96 | # acceptance 97 | snippet tes 98 | test('${1:#:action} ', function(assert) { 99 | visit('/${2:#:route name}'); 100 | 101 | andThen(function() { 102 | ${3:#:assertion} 103 | }); 104 | }); 105 | 106 | snippet ae 107 | assert.equal(${1:#:check}, '${2:#:result}'); 108 | 109 | snippet at 110 | assert.equal(find('${1:#u.posts}').text(), '${2:#:result}'); 111 | 112 | snippet al 113 | assert.equal(find('${1:#u.posts}').length, ${2:#:1}, '${3:#:result}'); 114 | 115 | snippet ft 116 | find('${1:#:ul.posts}').text() 117 | 118 | snippet fi 119 | fillIn('${1:#:ul.posts}', ${2:#:result}) 120 | 121 | snippet cli 122 | click('${1:#:button.submit}'); 123 | 124 | # model assertion 125 | 126 | #snippet ao 127 | #assert.ok(${1:`substitute(vim_snippets#Filename(), '-test$', '', '')`}.get('${2:relation}')) 128 | #assert.ok($1.get('$2') instanceof DS.Model); 129 | #${0} 130 | 131 | snippet ao 132 | assert.ok(model.get('${1:relation}')); 133 | assert.ok(model.get('$1') instanceof DS.Model); 134 | ${2} 135 | 136 | snippet erum 137 | // set a relationship 138 | Ember.run(function() { 139 | model.set('${1:relation}', store.createRecord('$1', {})); 140 | }); 141 | 142 | 143 | snippet ems 144 | model.set('${1:relation}', store.createRecord('$1', {})) 145 | -------------------------------------------------------------------------------- /zsh/aliases.zsh: -------------------------------------------------------------------------------- 1 | # expand aliases similar to vim 2 | 3 | typeset -a ealiases 4 | ealiases=() 5 | 6 | function ealias() 7 | { 8 | alias $1 9 | ealiases+=(${1%%\=*}) 10 | } 11 | 12 | function expand-ealias() 13 | { 14 | if [[ $LBUFFER =~ "(^|[;|&])\s*(${(j:|:)ealiases})\$" ]]; then 15 | zle _expand_alias 16 | zle expand-word 17 | fi 18 | zle magic-space 19 | } 20 | 21 | zle -N expand-ealias 22 | 23 | bindkey -M viins ' ' expand-ealias 24 | bindkey -M viins '^ ' magic-space # control-space to bypass completion 25 | bindkey -M isearch " " magic-space # normal space during searches 26 | 27 | #rails_zen 28 | 29 | alias rzmg="rails_zen model g " 30 | alias rzma="rails_zen model act " 31 | 32 | alias t="tmux" 33 | 34 | # aliases 35 | alias st="~/./start-mod.sh" 36 | alias vz="nvim ~/.zshrc" 37 | alias az="nvim ~/dotfiles/zsh/aliases.zsh" 38 | alias sz="source ~/.zshrc" 39 | 40 | alias cp="cp -iv" 41 | alias rm="rm -iv" 42 | alias mv="mv -iv" 43 | alias ls="ls --color=always" 44 | 45 | #debian/ubuntu related system liases 46 | alias halt='sudo shutdown -h now' 47 | alias reboot='sudo reboot' 48 | alias api='sudo apt-get install' 49 | alias aps='sudo apt-cache search' 50 | 51 | ealias y='vim ~/.zshrc' 52 | # open file using the software 53 | alias -s html=vim 54 | alias -s rb=vim 55 | alias -s py=vim 56 | alias -s erb=vim 57 | alias -s pdf=evince 58 | alias -s com=chromium-browser 59 | 60 | # Vim aliases 61 | ealias v="nvim " 62 | ealias vim="nvim" 63 | ealias nv="nvim " 64 | ealias vi="nvim " 65 | # Vim-style line editing 66 | bindkey -v 67 | # I want my bck-i-search 68 | bindkey -M viins "^r" history-incremental-search-backward 69 | bindkey -M viins "" history-incremental-search-backward 70 | bindkey -M vicmd "f" history-incremental-search-backward 71 | bindkey '^[[A' up-line-or-search 72 | bindkey '^[[B' down-line-or-search 73 | 74 | #git alias 75 | alias gpo="git push origin" 76 | alias gpl="git pull origin" 77 | alias gpom="git push origin master" 78 | alias gplm="git pull --rebase origin master" 79 | 80 | #git flow related aliases 81 | #alias gf="git flow" 82 | #alias gff="git flow feature" 83 | 84 | #Ruby stuff :D 85 | RUBYOPT=rubygems 86 | 87 | # Bundler 88 | ealias be="bundle exec" 89 | ealias b="bundle" 90 | ealias bi="bundle check || bundle install" 91 | ealias binstubs="bundle --binstubs=./bin/stubs" 92 | 93 | #rails 94 | ealias rgc="rails g controller" 95 | ealias rgsc="rails g scaffold_controller" 96 | ealias rgm="rails g model" 97 | ealias rc="rails console" 98 | ealias rn="rails new " 99 | ealias cy="cap deploy" 100 | ealias rdbm='rake db:migrate' 101 | 102 | # ember stuff 103 | alias ems="ember server" 104 | alias emt="ember test --server" 105 | alias egc="ember generate component" 106 | alias egr="ember generate route" 107 | alias egt="ember generate template" 108 | alias egm="ember generate model" 109 | alias egx="ember generate mixin" 110 | alias egi="ember generate initializer" 111 | alias egv="ember generate view" 112 | alias egs="ember generate resource" # think scaffold? 113 | alias ega="ember generate acceptance-test" # think scaffold? 114 | 115 | #node stuf 116 | alias ni="npm install" 117 | alias nis="npm install --save-dev" 118 | alias boi="bower install" 119 | alias bois="bower install --save" 120 | 121 | # elixir stuff 122 | alias min="mix new" 123 | alias mit="mix test" 124 | alias mil="mix local" 125 | 126 | # elixir stuff 127 | alias mem="mix ecto.migrate" 128 | alias mer="mix ecto.rollback" 129 | alias meg="mix ecto.gen.migration" 130 | alias mps="mix phoenix.server" 131 | alias mpn="mix phoenix.new" 132 | alias mpj="mix phoenix.gen.json" 133 | alias mph="mix phoenix.gen.html" 134 | alias mpm="mix phoenix.gen.model" 135 | alias mpc="mix phoenix.gen.channel" 136 | alias mpr="mix phoenix.routes" 137 | alias mdg="mix deps.get" 138 | alias iem="iex -S mix" 139 | alias iemt="iex -S mix test" 140 | alias ddd="MIX_ENV=test mix ecto.drop; MIX_ENV=test mix ecto.create; MIX_ENV=test mix ecto.migrate" 141 | alias sss="MIX_ENV=prod mix compile; MIX_ENV=prod mix release --verbosity=verbose" 142 | alias yy="rm -rf _build/prod; MIX_ENV=prod mix release --verbosity=verbose" 143 | 144 | # ctags 145 | alias tagit='ctags -R --exclude=.git --exclude=log *' 146 | 147 | function b { 148 | if [[ $# == 0 ]] 149 | then 150 | bi && binstubs 151 | else 152 | bundle "$@" 153 | fi 154 | } 155 | 156 | alias ngr="~/Downloads/ngrok/ngrok" 157 | -------------------------------------------------------------------------------- /zsh/extras.zsh: -------------------------------------------------------------------------------- 1 | # fzf 2 | alias gf='ag -r "" | fzf' 3 | fo() { 4 | local out file key 5 | out=$(fzf-tmux --query="$1" --exit-0 --expect=ctrl-o,ctrl-e) 6 | key=$(head -1 <<< "$out") 7 | file=$(head -2 <<< "$out" | tail -1) 8 | if [ -n "$file" ]; then 9 | [ "$key" = ctrl-o ] && xdg-open "$file" || ${EDITOR:-vim} "$file" 10 | fi 11 | } 12 | # fda - including hidden directories 13 | fda() { 14 | DIR=`find ${1:-.} -type d 2> /dev/null | fzf-tmux` && cd "$DIR" 15 | } 16 | 17 | 18 | # fbr - checkout git branch 19 | fbr() { 20 | local branches branch 21 | branches=$(git branch --all | grep -v HEAD) && 22 | branch=$(echo "$branches" | 23 | fzf-tmux -d $(( 2 + $(wc -l <<< "$branches") )) +m) && 24 | git checkout $(echo "$branch" | sed "s/.* //" | sed "s#remotes/[^/]*/##") 25 | } 26 | 27 | # fco - checkout git commit 28 | fco() { 29 | local commits commit 30 | commits=$(git log --pretty=oneline --abbrev-commit --reverse) && 31 | commit=$(echo "$commits" | fzf +s +m -e) && 32 | git checkout $(echo "$commit" | sed "s/ .*//") 33 | } 34 | 35 | # fshow - git commit browser (enter for show, ctrl-d for diff, ` toggles sort) 36 | fshow() { 37 | local out shas sha q k 38 | while out=$( 39 | git log --graph --color=always \ 40 | --format="%C(auto)%h%d %s %C(black)%C(bold)%cr" "$@" | 41 | fzf --ansi --multi --no-sort --reverse --query="$q" \ 42 | --print-query --expect=ctrl-d --toggle-sort=\`); do 43 | q=$(head -1 <<< "$out") 44 | k=$(head -2 <<< "$out" | tail -1) 45 | shas=$(sed '1,2d;s/^[^a-z0-9]*//;/^$/d' <<< "$out" | awk '{print $1}') 46 | [ -z "$shas" ] && continue 47 | if [ "$k" = 'ctrl-d' ]; then 48 | git diff --color=always $shas | less -R 49 | else 50 | for sha in $shas; do 51 | git show --color=always $sha | less -R 52 | done 53 | fi 54 | done 55 | } 56 | 57 | # ftags - search ctags 58 | ftags() { 59 | local line 60 | [ -e tags ] && 61 | line=$( 62 | awk 'BEGIN { FS="\t" } !/^!/ {print toupper($4)"\t"$1"\t"$2"\t"$3}' tags | 63 | cut -c1-80 | fzf --nth=1,2 64 | ) && $EDITOR $(cut -f3 <<< "$line") -c "set nocst" \ 65 | -c "silent tag $(cut -f2 <<< "$line")" 66 | } 67 | 68 | # fe [FUZZY PATTERN] - Open the selected file with the default editor 69 | # - Bypass fuzzy finder if there's only one match (--select-1) 70 | # - Exit if there's no match (--exit-0) 71 | fe() { 72 | local file 73 | file=$(fzf-tmux --query="$1" --select-1 --exit-0) 74 | [ -n "$file" ] && ${EDITOR:-vim} "$file" 75 | } 76 | 77 | # Modified version where you can press 78 | # - CTRL-O to open with `open` command, 79 | # - CTRL-E or Enter key to open with the $EDITOR 80 | fo() { 81 | local out file key 82 | out=$(fzf-tmux --query="$1" --exit-0 --expect=ctrl-o,ctrl-e) 83 | key=$(head -1 <<< "$out") 84 | file=$(head -2 <<< "$out" | tail -1) 85 | if [ -n "$file" ]; then 86 | [ "$key" = ctrl-o ] && xdg-open "$file" || ${EDITOR:-vim} "$file" 87 | fi 88 | } 89 | 90 | if [ -n "$TMUX_PANE" ]; then 91 | fzf_tmux_helper() { 92 | local sz=$1; shift 93 | local cmd=$1; shift 94 | tmux split-window $sz \ 95 | "bash -c \"\$(tmux send-keys -t $TMUX_PANE \"\$(source ~/.fzf.bash; $cmd)\" $*)\"" 96 | } 97 | 98 | # https://github.com/wellle/tmux-complete.vim 99 | fzf_tmux_words() { 100 | fzf_tmux_helper \ 101 | '-p 40' \ 102 | 'tmuxwords.rb --all --scroll 500 --min 5 | fzf --multi | paste -sd" " -' 103 | } 104 | 105 | # ftpane - switch pane (@george-b) 106 | ftpane() { 107 | local panes current_window current_pane target target_window target_pane 108 | panes=$(tmux list-panes -s -F '#I:#P - #{pane_current_path} #{pane_current_command}') 109 | current_pane=$(tmux display-message -p '#I:#P') 110 | current_window=$(tmux display-message -p '#I') 111 | 112 | target=$(echo "$panes" | grep -v "$current_pane" | fzf +m --reverse) || return 113 | 114 | target_window=$(echo $target | awk 'BEGIN{FS=":|-"} {print$1}') 115 | target_pane=$(echo $target | awk 'BEGIN{FS=":|-"} {print$2}' | cut -c 1) 116 | 117 | if [[ $current_window -eq $target_window ]]; then 118 | tmux select-pane -t ${target_window}.${target_pane} 119 | else 120 | tmux select-pane -t ${target_window}.${target_pane} && 121 | tmux select-window -t $target_window 122 | fi 123 | } 124 | 125 | fi 126 | 127 | # Switch tmux-sessions 128 | fs() { 129 | local session 130 | session=$(tmux list-sessions -F "#{session_name}" | \ 131 | fzf-tmux --query="$1" --select-1 --exit-0) && 132 | tmux switch-client -t "$session" 133 | } 134 | 135 | # fastd 136 | alias c='fasd_cd -d -i' # cd with interactive selection 137 | alias z='fasd_cd -d' # cd, same functionality as j in autojump 138 | alias a='fasd -a' # any 139 | alias fv='fasd -f -e vim ' # file 140 | #alias s='fasd -si' # show / search / select 141 | #alias fd='fasd -d' # directory 142 | 143 | eval "$(fasd --init auto)" 144 | alias i='f -e vim' # quick opening files with vim 145 | alias m='f -e mplayer' # quick opening files with mplayer 146 | alias o='a -e xdg-open' 147 | 148 | -------------------------------------------------------------------------------- /nvim/fzf.vim: -------------------------------------------------------------------------------- 1 | " List of buffers 2 | function! s:buflist() 3 | redir => ls 4 | silent ls 5 | redir END 6 | return split(ls, '\n') 7 | endfunction 8 | 9 | function! s:bufopen(e) 10 | execute 'buffer' matchstr(a:e, '^[ 0-9]*') 11 | endfunction 12 | 13 | nnoremap b :call fzf#run({ 14 | \ 'source': reverse(buflist()), 15 | \ 'sink': function('bufopen'), 16 | \ 'options': '+m', 17 | \ 'down': len(buflist()) + 2 18 | \ }) 19 | 20 | command! FZFMru call fzf#run({ 21 | \'source': v:oldfiles, 22 | \'sink' : 'e ', 23 | \'options' : '-m', 24 | \}) 25 | 26 | function! s:line_handler(l) 27 | let keys = split(a:l, ':\t') 28 | exec 'buf' keys[0] 29 | exec keys[1] 30 | normal! ^zz 31 | endfunction 32 | 33 | function! s:buffer_lines() 34 | let res = [] 35 | for b in filter(range(1, bufnr('$')), 'buflisted(v:val)') 36 | call extend(res, map(getbufline(b,0,"$"), 'b . ":\t" . (v:key + 1) . ":\t" . v:val ')) 37 | endfor 38 | return res 39 | endfunction 40 | 41 | command! FZFLines call fzf#run({ 42 | \ 'source': buffer_lines(), 43 | \ 'sink': function('line_handler'), 44 | \ 'options': '--extended --nth=3..', 45 | \ 'down': '60%' 46 | \}) 47 | 48 | command! FZFTagFile if !empty(tagfiles()) | call fzf#run({ 49 | \ 'source': "cat " . tagfiles()[0] . ' | grep "' . expand('%:@') . '"' . " | sed -e '/^\\!/d;s/\t.*//' ". ' | uniq', 50 | \ 'sink': 'tag', 51 | \ 'options': '+m', 52 | \ 'left': 60, 53 | \ }) | else | echo 'No tags' | endif 54 | 55 | command! -bar FZFTags if !empty(tagfiles()) | call fzf#run({ 56 | \ 'source': "sed '/^\\!/d;s/\t.*//' " . join(tagfiles()) . ' | uniq', 57 | \ 'sink': 'tag', 58 | \ }) | else | echo 'Preparing tags' | call system('ctags -R') | FZFTag | endif 59 | 60 | function! s:ag_to_qf(line) 61 | let parts = split(a:line, ':') 62 | return {'filename': parts[0], 'lnum': parts[1], 'col': parts[2], 63 | \ 'text': join(parts[3:], ':')} 64 | endfunction 65 | 66 | function! s:ag_handler(lines) 67 | if len(a:lines) < 2 | return | endif 68 | 69 | let cmd = get({'ctrl-x': 'split', 70 | \ 'ctrl-v': 'vertical split', 71 | \ 'ctrl-t': 'tabe'}, a:lines[0], 'e') 72 | let list = map(a:lines[1:], 's:ag_to_qf(v:val)') 73 | 74 | let first = list[0] 75 | execute cmd escape(first.filename, ' %#\') 76 | execute first.lnum 77 | execute 'normal!' first.col.'|zz' 78 | 79 | if len(list) > 1 80 | call setqflist(list) 81 | copen 82 | wincmd p 83 | endif 84 | endfunction 85 | 86 | command! -nargs=1 Ag call fzf#run({ 87 | \ 'source': 'ag --nogroup --column --color "'.escape(, '"\').'"', 88 | \ 'sink*': function('ag_handler'), 89 | \ 'options': '--ansi --expect=ctrl-t,ctrl-v,ctrl-x '. 90 | \ '--multi --bind ctrl-a:select-all --color hl:68,hl+:110', 91 | \ 'down': '50%' 92 | \ }) 93 | 94 | cnoremap eGetCompletions() 95 | "add an extra at the end of this line to automatically accept the fzf-selected completions. 96 | 97 | function! Lister() 98 | call extend(g:FZF_Cmd_Completion_Pre_List,split(getcmdline(),'\(\\\zs\)\@\eLister()\\" 122 | let l:FZF_Cmd_Completion_List = g:FZF_Cmd_Completion_Pre_List[len(l:Prefix):-1] 123 | unlet g:FZF_Cmd_Completion_Pre_List 124 | if len(l:Prefix) > 0 && l:Prefix[0] =~ 125 | \ '^ed\=i\=t\=$\|^spl\=i\=t\=$\|^tabed\=i\=t\=$\|^arged\=i\=t\=$\|^vsp\=l\=i\=t\=$' 126 | "single-argument file commands 127 | return CmdLineDirComplete(l:Prefix, "",l:cmdline_list[-1]) 128 | elseif len(l:Prefix) > 0 && l:Prefix[0] =~ 129 | \ '^arg\=s\=$\|^ne\=x\=t\=$\|^sne\=x\=t\=$\|^argad\=d\=$' 130 | "multi-argument file commands 131 | return CmdLineDirComplete(l:Prefix, '--multi', l:cmdline_list[-1]) 132 | else 133 | return join(l:Prefix + fzf#run({ 134 | \'source':l:FZF_Cmd_Completion_List, 135 | \'options': '--select-1 --query='.shellescape(l:cmdline_list[-1]) 136 | \})) 137 | endif 138 | endfunction 139 | -------------------------------------------------------------------------------- /.dir_colours: -------------------------------------------------------------------------------- 1 | # Configuration file for dircolors, a utility to help you set the 2 | # LS_COLORS environment variable used by GNU ls with the --color option. 3 | # Copyright (C) 1996, 1999-2011 Free Software Foundation, Inc. 4 | # Copying and distribution of this file, with or without modification, 5 | # are permitted provided the copyright notice and this notice are preserved. 6 | # The keywords COLOR, OPTIONS, and EIGHTBIT (honored by the 7 | # slackware version of dircolors) are recognized but ignored. 8 | # Below, there should be one TERM entry for each termtype that is colorizable 9 | TERM Eterm 10 | TERM ansi 11 | TERM color-xterm 12 | TERM con132x25 13 | TERM con132x30 14 | TERM con132x43 15 | TERM con132x60 16 | TERM con80x25 17 | TERM con80x28 18 | TERM con80x30 19 | TERM con80x43 20 | TERM con80x50 21 | TERM con80x60 22 | TERM cons25 23 | TERM console 24 | TERM cygwin 25 | TERM dtterm 26 | TERM eterm-color 27 | TERM gnome 28 | TERM gnome-256color 29 | TERM jfbterm 30 | TERM konsole 31 | TERM kterm 32 | TERM linux 33 | TERM linux-c 34 | TERM mach-color 35 | TERM mlterm 36 | TERM putty 37 | TERM rxvt 38 | TERM rxvt-256color 39 | TERM rxvt-cygwin 40 | TERM rxvt-cygwin-native 41 | TERM rxvt-unicode 42 | TERM rxvt-unicode-256color 43 | TERM rxvt-unicode256 44 | TERM screen 45 | TERM screen-256color 46 | TERM screen-256color-bce 47 | TERM screen-bce 48 | TERM screen-w 49 | TERM screen.Eterm 50 | TERM screen.rxvt 51 | TERM screen.linux 52 | TERM terminator 53 | TERM vt100 54 | TERM xterm 55 | TERM xterm-16color 56 | TERM xterm-256color 57 | TERM xterm-88color 58 | TERM xterm-color 59 | TERM xterm-debian 60 | # Below are the color init strings for the basic file types. A color init 61 | # string consists of one or more of the following numeric codes: 62 | # Attribute codes: 63 | # 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed 64 | # Text color codes: 65 | # 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white 66 | # Background color codes: 67 | # 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white 68 | #NORMAL 00 # no color code at all 69 | #FILE 00 # regular file: use no color at all 70 | RESET 0 # reset to "normal" color 71 | DIR 01;34 # directory 72 | LINK 01;36 # symbolic link. (If you set this to 'target' instead of a 73 | # numerical value, the color is as for the file pointed to.) 74 | MULTIHARDLINK 00 # regular file with more than one link 75 | FIFO 40;33 # pipe 76 | SOCK 01;35 # socket 77 | DOOR 01;35 # door 78 | BLK 40;33;01 # block device driver 79 | CHR 40;33;01 # character device driver 80 | ORPHAN 40;31;01 # symlink to nonexistent file, or non-stat'able file 81 | SETUID 37;41 # file that is setuid (u+s) 82 | SETGID 30;43 # file that is setgid (g+s) 83 | CAPABILITY 30;41 # file with capability 84 | STICKY_OTHER_WRITABLE 30;42 # dir that is sticky and other-writable (+t,o+w) 85 | OTHER_WRITABLE 34;42 # dir that is other-writable (o+w) and not sticky 86 | STICKY 37;44 # dir with the sticky bit set (+t) and not other-writable 87 | # This is for files with execute permission: 88 | EXEC 01;32 89 | # List any file extensions like '.gz' or '.tar' that you would like ls 90 | # to colorize below. Put the extension, a space, and the color init string. 91 | # (and any comments you want to add after a '#') 92 | # If you use DOS-style suffixes, you may want to uncomment the following: 93 | #.cmd 01;32 # executables (bright green) 94 | #.exe 01;32 95 | #.com 01;32 96 | #.btm 01;32 97 | #.bat 01;32 98 | # Or if you want to colorize scripts even if they do not have the 99 | # executable bit actually set. 100 | #.sh 01;32 101 | #.csh 01;32 102 | # archives or compressed (bright red) 103 | .tar 01;31 104 | .tgz 01;31 105 | .arj 01;31 106 | .taz 01;31 107 | .lzh 01;31 108 | .lzma 01;31 109 | .tlz 01;31 110 | .txz 01;31 111 | .zip 01;31 112 | .z 01;31 113 | .Z 01;31 114 | .dz 01;31 115 | .gz 01;31 116 | .lz 01;31 117 | .xz 01;31 118 | .bz2 01;31 119 | .bz 01;31 120 | .tbz 01;31 121 | .tbz2 01;31 122 | .tz 01;31 123 | .deb 01;31 124 | .rpm 01;31 125 | .jar 01;31 126 | .war 01;31 127 | .ear 01;31 128 | .sar 01;31 129 | .rar 01;31 130 | .ace 01;31 131 | .zoo 01;31 132 | .cpio 01;31 133 | .7z 01;31 134 | .rz 01;31 135 | # image formats 136 | .jpg 01;35 137 | .jpeg 01;35 138 | .gif 01;35 139 | .bmp 01;35 140 | .pbm 01;35 141 | .pgm 01;35 142 | .ppm 01;35 143 | .tga 01;35 144 | .xbm 01;35 145 | .xpm 01;35 146 | .tif 01;35 147 | .tiff 01;35 148 | .png 01;35 149 | .svg 01;35 150 | .svgz 01;35 151 | .mng 01;35 152 | .pcx 01;35 153 | .mov 01;35 154 | .mpg 01;35 155 | .mpeg 01;35 156 | .m2v 01;35 157 | .mkv 01;35 158 | .webm 01;35 159 | .ogm 01;35 160 | .mp4 01;35 161 | .m4v 01;35 162 | .mp4v 01;35 163 | .vob 01;35 164 | .qt 01;35 165 | .nuv 01;35 166 | .wmv 01;35 167 | .asf 01;35 168 | .rm 01;35 169 | .rmvb 01;35 170 | .flc 01;35 171 | .avi 01;35 172 | .fli 01;35 173 | .flv 01;35 174 | .gl 01;35 175 | .dl 01;35 176 | .xcf 01;35 177 | .xwd 01;35 178 | .yuv 01;35 179 | .cgm 01;35 180 | .emf 01;35 181 | # http://wiki.xiph.org/index.php/MIME_Types_and_File_Extensions 182 | .axv 01;35 183 | .anx 01;35 184 | .ogv 01;35 185 | .ogx 01;35 186 | # audio formats 187 | .aac 00;36 188 | .au 00;36 189 | .flac 00;36 190 | .mid 00;36 191 | .midi 00;36 192 | .mka 00;36 193 | .mp3 00;36 194 | .mpc 00;36 195 | .ogg 00;36 196 | .ra 00;36 197 | .wav 00;36 198 | # http://wiki.xiph.org/index.php/MIME_Types_and_File_Extensions 199 | .axa 00;36 200 | .oga 00;36 201 | .spx 00;36 202 | .xspf 00;36 203 | -------------------------------------------------------------------------------- /nvim/colors/railscasts.vim: -------------------------------------------------------------------------------- 1 | " Vim color scheme 2 | " 3 | " Name: railscasts.vim 4 | " Maintainer: Nick Moffitt 5 | " Last Change: 01 Mar 2008 6 | " License: WTFPL 7 | " Version: 2.1 8 | " 9 | " This theme is based on Josh O'Rourke's Vim clone of the railscast 10 | " textmate theme. The key thing I have done here is supply 256-color 11 | " terminal equivalents for as many of the colors as possible, and fixed 12 | " up some of the funny behaviors for editing e-mails and such. 13 | " 14 | " To use for gvim: 15 | " 1: install this file as ~/.vim/colors/railscasts.vim 16 | " 2: put "colorscheme railscasts" in your .gvimrc 17 | " 18 | " If you are using Ubuntu, you can get the benefit of this in your 19 | " terminals using ordinary vim by taking the following steps: 20 | " 21 | " 1: sudo apt-get install ncurses-term 22 | " 2: put the following in your .vimrc 23 | " if $COLORTERM == 'gnome-terminal' 24 | " set term=gnome-256color 25 | " colorscheme railscasts 26 | " else 27 | " colorscheme default 28 | " endif 29 | " 3: if you wish to use this with screen, add the following to your .screenrc: 30 | " attrcolor b ".I" 31 | " termcapinfo xterm 'Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm' 32 | " defbce "on" 33 | " term screen-256color-bce 34 | 35 | if has("gui_running") 36 | set background=dark 37 | endif 38 | hi clear 39 | if exists("syntax_on") 40 | syntax reset 41 | endif 42 | 43 | let g:colors_name = "railscasts" 44 | 45 | hi link htmlTag xmlTag 46 | hi link htmlTagName xmlTagName 47 | hi link htmlEndTag xmlEndTag 48 | 49 | hi Normal guifg=#E6E1DC guibg=#141414 ctermfg=254 ctermbg=NONE 50 | hi Cursor guifg=#000000 ctermfg=0 guibg=#FFFFFF ctermbg=15 51 | hi CursorLine cterm=none ctermbg=234 guibg=#333333 guifg=NONE 52 | hi CursorColumn cterm=none ctermbg=234 guibg=#333333 guifg=NONE 53 | hi StatusLine guifg=#444444 guibg=#cccccc gui=bold ctermbg=233 cterm=bold 54 | hi StatusLineNC guifg=#444444 guibg=#aaaaaa gui=none ctermbg=233 cterm=none 55 | hi VertSplit guifg=Black guibg=#aabbee gui=bold ctermfg=237 ctermbg=237 cterm=none 56 | 57 | hi Comment guifg=#BC9458 ctermfg=180 gui=italic 58 | hi Constant guifg=#6D9CBE ctermfg=73 59 | hi link Identifier rubyConstant 60 | hi Define guifg=#CC7833 ctermfg=173 gui=NONE cterm=NONE 61 | hi Statement guifg=#CC7833 ctermfg=173 gui=NONE cterm=NONE 62 | hi Error guifg=#FFC66D ctermfg=221 guibg=#990000 ctermbg=88 63 | hi Function guifg=#FFC66D ctermfg=221 gui=NONE cterm=NONE 64 | hi Keyword guifg=#CC7833 ctermfg=173 cterm=NONE 65 | hi link Include Statement 66 | hi link PreCondit Statement 67 | hi Todo ctermbg=NONE ctermfg=160 guifg=#d70000 guibg=NONE gui=bold 68 | 69 | hi LineNr guifg=#555555 ctermfg=236 70 | hi String guifg=#A5C261 ctermfg=107 71 | hi link Number String 72 | hi PreProc guifg=#E6E1DC ctermfg=103 73 | hi Search guifg=NONE ctermfg=NONE guibg=#444444 ctermbg=235 74 | hi IncSearch guifg=White guibg=Black ctermfg=White ctermbg=Black 75 | hi link Search IncSearch 76 | hi Title guifg=#FFFFFF ctermfg=15 77 | hi Type guifg=#DA4939 ctermfg=167 gui=NONE cterm=NONE 78 | hi Visual guibg=#5A647E ctermbg=60 79 | 80 | hi link diffAdded String 81 | hi link diffRemoved Type 82 | hi link diffLine PreProc 83 | hi link diffSubname Comment 84 | 85 | hi DiffAdd guifg=#E6E1DC ctermfg=7 guibg=#519F50 ctermbg=59 86 | hi DiffDelete guifg=#E6E1DC ctermfg=7 guibg=#660000 ctermbg=52 87 | hi Special guifg=#DA4939 ctermfg=167 88 | 89 | hi pythonBuiltin guifg=#6D9CBE ctermfg=73 gui=NONE cterm=NONE 90 | hi rubyBlockParameter guifg=#FFFFFF ctermfg=15 91 | hi link rubyConstant Type 92 | hi link rubyCapitalizedMethod rubyConstant 93 | hi link rubyPredefinedConstant Type 94 | hi rubyInstanceVariable guifg=#D0D0FF ctermfg=189 95 | hi rubyInterpolation guifg=#519F50 ctermfg=107 96 | hi rubyLocalVariableOrMethod guifg=#D0D0FF ctermfg=189 97 | hi rubyPseudoVariable guifg=#FFC66D ctermfg=221 98 | hi link rubyStringDelimiter String 99 | 100 | hi NonText guifg=#404040 ctermfg=8 101 | hi SpecialKey guifg=#404040 ctermfg=8 102 | 103 | hi xmlTag guifg=#E8BF6A ctermfg=179 104 | hi xmlTagName guifg=#E8BF6A ctermfg=179 105 | hi xmlEndTag guifg=#E8BF6A ctermfg=179 106 | 107 | hi mailSubject guifg=#A5C261 ctermfg=107 108 | hi mailHeaderKey guifg=#FFC66D ctermfg=221 109 | hi mailEmail guifg=#A5C261 ctermfg=107 gui=italic cterm=underline 110 | 111 | hi SpellBad guifg=#D70000 ctermfg=160 ctermbg=NONE cterm=underline 112 | hi SpellRare guifg=#D75F87 ctermfg=168 guibg=NONE ctermbg=NONE gui=underline cterm=underline 113 | hi SpellCap guifg=#D0D0FF ctermfg=189 guibg=NONE ctermbg=NONE gui=underline cterm=underline 114 | hi MatchParen guifg=#FFFFFF ctermfg=15 guibg=#005f5f ctermbg=23 115 | 116 | hi Ignore ctermfg=Black 117 | hi WildMenu guifg=Black guibg=#ffff00 gui=bold cterm=bold 118 | hi Directory none 119 | hi link Directory Identifier 120 | 121 | hi Folded guifg=#585858 guibg=#1c1c1c gui=NONE ctermbg=234 ctermfg=240 cterm=NONE 122 | hi FoldColumn none 123 | hi link FoldColumn Folded 124 | 125 | hi Pmenu guifg=#F6F3E8 guibg=#444444 gui=NONE ctermbg=238 ctermfg=White cterm=NONE 126 | hi PmenuSel guifg=#000000 guibg=#A5C261 gui=NONE ctermbg=150 ctermfg=Black 127 | hi PMenuSbar guibg=#5A647E gui=NONE ctermbg=66 cterm=NONE 128 | hi PMenuThumb guibg=#AAAAAA gui=NONE ctermbg=248 cterm=NONE 129 | 130 | " Vim 7.3+ 131 | hi ColorColumn guibg=#444444 ctermbg=235 132 | -------------------------------------------------------------------------------- /nvim/colors/smyck.vim: -------------------------------------------------------------------------------- 1 | " ---------------------------------------------------------------------------- 2 | " Vim color file 3 | " Maintainer: John-Paul Bader 4 | " Last Change: 2012 April 5 | " License: Beer Ware 6 | " ---------------------------------------------------------------------------- 7 | 8 | " Reset Highlighting 9 | hi clear 10 | if exists("syntax_on") 11 | syntax reset 12 | endif 13 | 14 | set background=dark 15 | set linespace=3 16 | 17 | let g:colors_name = "smyck" 18 | 19 | hi Normal cterm=none ctermbg=none ctermfg=15 gui=none guibg=#282828 guifg=#F7F7F7 20 | hi LineNr cterm=none ctermbg=none ctermfg=8 gui=none guibg=#282828 guifg=#8F8F8F 21 | hi StatusLine cterm=none ctermbg=8 ctermfg=15 gui=none guibg=#5D5D5D guifg=#FBFBFB 22 | hi StatusLineNC cterm=none ctermbg=15 ctermfg=8 gui=none guibg=#5D5D5D guifg=#FBFBFB 23 | hi Search cterm=none ctermbg=6 ctermfg=15 gui=none guibg=#2EB5C1 guifg=#F7F7F7 24 | hi IncSearch cterm=none ctermbg=3 ctermfg=8 gui=none guibg=#F6DC69 guifg=#8F8F8F 25 | hi ColumnMargin cterm=none ctermbg=0 gui=none guibg=#000000 26 | hi Error cterm=none ctermbg=1 ctermfg=15 gui=none guifg=#F7F7F7 27 | hi ErrorMsg cterm=none ctermbg=1 ctermfg=15 gui=none guifg=#F7F7F7 28 | hi Folded cterm=none ctermbg=8 ctermfg=2 gui=none guibg=#3B3B3B guifg=#90AB41 29 | hi FoldColumn cterm=none ctermbg=8 ctermfg=2 gui=none guibg=#3B3B3B guifg=#90AB41 30 | hi NonText cterm=bold ctermbg=none ctermfg=8 gui=bold guifg=#8F8F8F 31 | hi ModeMsg cterm=bold ctermbg=none ctermfg=10 gui=none 32 | hi Pmenu cterm=none ctermbg=8 ctermfg=15 gui=none guibg=#8F8F8F guifg=#F7F7F7 33 | hi PmenuSel cterm=none ctermbg=15 ctermfg=8 gui=none guibg=#F7F7F7 guifg=#8F8F8F 34 | hi PmenuSbar cterm=none ctermbg=15 ctermfg=8 gui=none guibg=#F7F7F7 guifg=#8F8F8F 35 | hi SpellBad cterm=none ctermbg=1 ctermfg=15 gui=none guifg=#F7F7F7 36 | hi SpellCap cterm=none ctermbg=4 ctermfg=15 gui=none guifg=#F7F7F7 37 | hi SpellRare cterm=none ctermbg=4 ctermfg=15 gui=none guifg=#F7F7F7 38 | hi SpellLocal cterm=none ctermbg=4 ctermfg=15 gui=none guifg=#F7F7F7 39 | hi Visual cterm=none ctermbg=15 ctermfg=8 gui=none guibg=#F7F7F7 guifg=#8F8F8F 40 | hi Directory cterm=none ctermbg=none ctermfg=4 gui=none guibg=#242424 guifg=#88CCE7 41 | hi SpecialKey cterm=none ctermbg=none ctermfg=8 gui=none guifg=#8F8F8F 42 | hi DiffAdd cterm=bold ctermbg=2 ctermfg=15 43 | hi DiffChange cterm=bold ctermbg=4 ctermfg=15 44 | hi DiffDelete cterm=bold ctermbg=1 ctermfg=15 45 | hi DiffText cterm=bold ctermbg=3 ctermfg=8 46 | hi MatchParen cterm=none ctermbg=6 ctermfg=15 gui=none guibg=#2EB5C1 guifg=#F7F7F7 47 | hi CursorLine cterm=none ctermbg=238 ctermfg=none gui=none guibg=#424242 48 | hi CursorColumn cterm=none ctermbg=238 ctermfg=none gui=none guibg=#424242 49 | hi Title cterm=none ctermbg=none ctermfg=4 gui=none guifg=#88CCE7 50 | 51 | " ---------------------------------------------------------------------------- 52 | " Syntax Highlighting 53 | " ---------------------------------------------------------------------------- 54 | hi Keyword cterm=none ctermbg=none ctermfg=10 gui=none guifg=#D1FA71 55 | hi Comment cterm=none ctermbg=none ctermfg=8 gui=none guifg=#8F8F8F 56 | hi Delimiter cterm=none ctermbg=none ctermfg=15 gui=none guifg=#F7F7F7 57 | hi Identifier cterm=none ctermbg=none ctermfg=12 gui=none guifg=#96D9F1 58 | hi Structure cterm=none ctermbg=none ctermfg=12 gui=none guifg=#9DEEF2 59 | hi Ignore cterm=none ctermbg=none ctermfg=8 gui=none guifg=bg 60 | hi Constant cterm=none ctermbg=none ctermfg=12 gui=none guifg=#96D9F1 61 | hi PreProc cterm=none ctermbg=none ctermfg=10 gui=none guifg=#D1FA71 62 | hi Type cterm=none ctermbg=none ctermfg=12 gui=none guifg=#96D9F1 63 | hi Statement cterm=none ctermbg=none ctermfg=10 gui=none guifg=#D1FA71 64 | hi Special cterm=none ctermbg=none ctermfg=6 gui=none guifg=#d7d7d7 65 | hi String cterm=none ctermbg=none ctermfg=3 gui=none guifg=#F6DC69 66 | hi Number cterm=none ctermbg=none ctermfg=3 gui=none guifg=#F6DC69 67 | hi Underlined cterm=none ctermbg=none ctermfg=magenta gui=underline guibg=#272727 68 | hi Symbol cterm=none ctermbg=none ctermfg=9 gui=none guifg=#FAB1AB 69 | hi Method cterm=none ctermbg=none ctermfg=15 gui=none guifg=#F7F7F7 70 | hi Interpolation cterm=none ctermbg=none ctermfg=6 gui=none guifg=#2EB5C1 71 | 72 | " Erlang 73 | hi link erlangAtom Keyword 74 | hi link erlangBitType Keyword 75 | 76 | hi link rubyBeginend Keyword 77 | hi link rubyClass Keyword 78 | hi link rubyModule Keyword 79 | hi link rubyKeyword Keyword 80 | hi link rubyOperator Method 81 | hi link rubyIdentifier Keyword 82 | hi link rubyClassVariable Symbol 83 | hi link rubyInstanceVariable Constant 84 | hi link rubyGlobalVariable Constant 85 | hi link rubyClassVariable Method 86 | hi link rubyConstant Constant 87 | hi link rubySymbol Symbol 88 | hi link rubyFunction Constant 89 | hi link rubyControl Keyword 90 | hi link rubyConditional Keyword 91 | hi link rubyInterpolation Interpolation 92 | hi link rubyInterpolationDelimiter Interpolation 93 | hi link rubyRailsMethod Method 94 | 95 | 96 | -------------------------------------------------------------------------------- /nvim/init.vim: -------------------------------------------------------------------------------- 1 | "vime: nowrap fdm=marker 2 | silent so ~/dotfiles/nvim/bundles.vim 3 | "runtime ftplugin/man.vim 4 | 5 | filetype plugin indent on " required! 6 | 7 | "Change leader key, ecomma is easier than \ 8 | let mapleader="," 9 | 10 | " Themes that seem to working in the fucking terminals are " seoul, jellybeans, gruvbox, vim-hybrid, 11 | let g:seoul256_background = 236 12 | colo seoul256 13 | "colorscheme gruvbox 14 | set background=dark 15 | 16 | " SETTINGS/CONFIGURATIONS 17 | set dictionary-=/usr/share/dict/words dictionary+=/usr/share/dict/words 18 | 19 | " Basic 20 | syntax enable 21 | 22 | set number 23 | set hidden 24 | set clipboard+=unnamedplus 25 | set backspace=indent,eol,start " Make backspace behave normally. 26 | set noswapfile 27 | set scrolloff=3 " setting the page on scrolling the screen 28 | set history=1000 29 | set title 30 | set noerrorbells 31 | 32 | "higlight cursor position 33 | set cursorline 34 | 35 | " Turn on tab completion for filenames, helptops, options et cetera 36 | set wildmode=list:longest,full 37 | set wildmenu 38 | set wildignore=*.o,*.obj,*~ "stuff to ignore when tab completing 39 | set wildignore+=*DS_Store* 40 | set wildignore+=vendor/rails/** 41 | set wildignore+=vendor/cache/** 42 | set wildignore+=*.gem 43 | set wildignore+=log/** 44 | set wildignore+=tmp/** 45 | set wildignore+=*.png,*.jpg,*.gif 46 | set wildignore+=*.so,*.swp,*.zip,*/.Trash/**,*.pdf,*.dmg,*/Library/**,*/.rbenv/** 47 | set wildignore+=*/.nx/**,*.app 48 | 49 | " Wrapping and line breaks" 50 | set wrap 51 | set linebreak 52 | 53 | " Search related settings 54 | set showmatch 55 | set ignorecase 56 | set hlsearch 57 | set incsearch 58 | 59 | "Persistent undo is like a local version control system that you don't have to 60 | "manage. I think I will use this feature a lot. 61 | set undodir=~/.vim/undodir 62 | set undofile 63 | set undolevels=1000 "maximum number of set changes that can be undone 64 | set undoreload=10000 "maximum number lines to save for undo on a buffer reload 65 | 66 | 67 | if has('conceal') 68 | set conceallevel=1 69 | set listchars+=conceal:Δ 70 | endif 71 | 72 | "set status line for status plugin to show in single file editing" 73 | set laststatus=2 74 | " Default Tabs & spaces 75 | set tabstop=4 76 | set shiftwidth=4 77 | set softtabstop=4 78 | set expandtab 79 | set shiftround " use multiple of shiftwidth when indenting with '<' and '>' 80 | set smarttab " insert tabs on the start of a line according to 81 | " shiftwidth, not tabstop 82 | set autoindent " always set autoindenting on 83 | set copyindent " copy the previous indentation on autoindenting 84 | 85 | set colorcolumn=80 86 | " General Code Folding 87 | set foldmethod=indent 88 | set foldlevel=99 89 | 90 | " Toggle spellcheck in normal mode 91 | map :setlocal spell! spelllang=en_us 92 | 93 | 94 | " CUSTOM MAPPINGS 95 | 96 | "Recover FROM accidental undo 97 | inoremap u 98 | inoremap u 99 | 100 | " Quickly edit/reload the vimrc file 101 | nmap vv :e $MYVIMRC 102 | nmap sv :so $MYVIMRC 103 | nmap az :e ~/dotfiles/zsh/aliases.zsh 104 | 105 | nmap eb :e ~/dotfiles/nvim/bundles.vim 106 | nmap ep :e ~/dotfiles/nvim/plugin_config.vim 107 | 108 | "Vundle install" 109 | 110 | "to create a new line cmd mode without going to insert 111 | nmap k Ok0 112 | nmap j oj0 113 | 114 | "Break a line into two and retain cursor position 115 | nmap b ik$ 116 | 117 | "I am going to use this hide option quite often ;) instead of using tabs, 118 | "buffer is way cool :D 119 | nnoremap h :hide 120 | 121 | "I am using wrap, so this is really handy :D 122 | nnoremap j gj 123 | nnoremap k gk 124 | nnoremap 0 g0 125 | nnoremap $ g$ 126 | 127 | "To pasuuuute content from system clipboard into Vim, I use this too often. 128 | nnoremapp :set paste! 129 | 130 | "Inherit Activercord base for model created with Rails vim 131 | imap <ActiveRecord::Base 132 | 133 | " unhighlight the search terms 134 | nnoremap :noh 135 | 136 | " Fix those pesky situations where you edit & need sudo to save 137 | cmap w!! w !sudo tee % >/dev/null 138 | 139 | "map Y behave something similar to D, C, yank till the end from current 140 | nnoremap Y y$ 141 | 142 | "ABBREVIATIONS 143 | 144 | iabbr ime import Ember from 'ember'; 145 | 146 | cnoreabbrev Wq w 147 | cnoreabbrev W w 148 | cnoreabbrev WQ wq 149 | " I should remember this :D if were to use encyption 150 | cnoreabbrev X x 151 | cnoreabbrev Q q 152 | 153 | cnoreabbrev scp scp://@//home/ubuntu/ 154 | 155 | "FILE RELATED SETTINGS 156 | source ~/dotfiles/nvim/auto_cmd.vim 157 | 158 | "PLUGINS CONFIGURATION 159 | source ~/dotfiles/nvim/plugin_config.vim 160 | 161 | 162 | "I've already set auto saving my buffer. This key is the pain to my 163 | "fingers. Not gonna use this anymore. 164 | nnoremap w :w 165 | 166 | nnoremap x :x 167 | nnoremap q :q 168 | nnoremap q :qa 169 | nnoremap tn :tabnew 170 | nnoremap tc :tabclose 171 | nnoremap te :tabedit 172 | nnoremap ed :edit 173 | nnoremap ee :e =expand("%:p:h") . "/" 174 | 175 | 176 | " Make arrowkey do something usefull, resize the viewports accordingly 177 | nnoremap :vertical resize +5 178 | nnoremap :vertical resize -5 179 | cmap rx Rextract 180 | 181 | "lcd 182 | nnoremap ld :pwd 183 | nnoremap lcp :lcd %:p:h 184 | nnoremap lcd :lcd ~/ 185 | 186 | " currently selected text with default register 187 | " without yanking it 188 | nnoremap r "_diwP 189 | vnoremap r "_dP 190 | 191 | "nnoremap ct :Ctags 192 | nnoremap ct :!/usr/bin/ctags -R --c++-kinds=+p --fields=+iaS --extra=+q . 193 | 194 | "iabbr ed export default 195 | 196 | "the block selector special 197 | " current line mapping 198 | nnoremap vg GE 199 | nnoremap ve E 200 | nnoremap gg gg=G'' 201 | 202 | function! RemoveComments() 203 | :g_\v(^|^\s+)#_d 204 | :%!cat -s 205 | endfunction 206 | "Delete comments in ruby or elixir file 207 | nnoremap dc :call RemoveComments() 208 | 209 | nnoremap v :vs 210 | 211 | " Markdown headings 212 | nnoremap 1 m`yypVr=`` 213 | nnoremap 2 m`yypVr-`` 214 | nnoremap 3 m`^i### ``4l 215 | nnoremap 4 m`^i#### ``5l 216 | nnoremap 5 m`^i##### ``6l 217 | 218 | " Ascii doctor headings 219 | nnoremap 6 m`^i= ``2l 220 | nnoremap 7 m`^i== ``3l 221 | nnoremap 8 m`^i=== ``4l 222 | nnoremap 9 m`^i==== ``5l 223 | nnoremap 0 m`^i===== ``6l 224 | set autoread "sets it to reload files on change. 225 | au CursorHold,CursorHoldI * checktime " The problem is that Vim doesn't 226 | "actually check changes. So this makes it check periodically. 227 | " 228 | " 229 | function! Jsonapi(from) 230 | echo a:from 231 | exec ':%s/"'. a:from . '" => \(\w\+\)/"data" => %{"attributes" => \1}/g' 232 | endfunction 233 | function! Testjsonapi(from) 234 | echo a:from 235 | exec ':%s/'. a:from . ': \(.*\)$/data: %{attributes: \1}/g' 236 | endfunction 237 | cnoreabbrev aa :call Jsonapi 238 | cnoreabbrev ba :call Testjsonapi 239 | 240 | nmap ij yiwoconsole.log('"', ");^ 241 | nmap ie yiwoIO.puts("--------------"--------------"); IO.inspect(");^ 242 | -------------------------------------------------------------------------------- /nvim/colors/lucario.vim: -------------------------------------------------------------------------------- 1 | " Lucario - The best colorful flat theme ever 2 | " Author: Raphael Amorim 3 | " 4 | " GitHub project: https://github.com/raphamorim/lucario 5 | 6 | set background=dark 7 | highlight clear 8 | 9 | if exists("syntax_on") 10 | syntax reset 11 | endif 12 | 13 | let g:colors_name = "lucario" 14 | 15 | hi Cursor guibg=yellow cterm=NONE guifg=#2b3e50 guibg=#f8f8f2 16 | hi Visual ctermfg=NONE ctermbg=16 cterm=NONE guifg=NONE guibg=#19242f gui=NONE 17 | hi CursorLine ctermfg=NONE ctermbg=25 cterm=NONE guifg=NONE guibg=#405160 gui=NONE 18 | hi CursorColumn ctermfg=231 ctermbg=25 cterm=NONE guifg=NONE guibg=#405160 gui=NONE 19 | hi ColorColumn ctermfg=NONE ctermbg=59 cterm=NONE guifg=NONE guibg=#405160 gui=NONE 20 | hi LineNr ctermfg=231 ctermbg=240 cterm=NONE guifg=#929ba1 guibg=#405160 gui=NONE 21 | hi VertSplit ctermfg=60 ctermbg=60 cterm=NONE guifg=#66747f guibg=#66747f gui=NONE 22 | hi MatchParen ctermfg=203 ctermbg=NONE cterm=underline guifg=#ff6541 guibg=NONE gui=underline 23 | hi StatusLine ctermfg=231 ctermbg=60 cterm=bold guifg=#f8f8f2 guibg=#66747f gui=bold 24 | hi StatusLineNC ctermfg=231 ctermbg=60 cterm=NONE guifg=#f8f8f2 guibg=#66747f gui=NONE 25 | hi Pmenu ctermfg=NONE ctermbg=NONE cterm=NONE guifg=NONE guibg=NONE gui=NONE 26 | hi PmenuSel ctermfg=NONE ctermbg=16 cterm=NONE guifg=NONE guibg=#19242f gui=NONE 27 | hi IncSearch ctermfg=23 ctermbg=186 cterm=NONE guifg=#2b3e50 guibg=#e6db74 gui=NONE 28 | hi Search ctermfg=NONE ctermbg=NONE cterm=underline guifg=NONE guibg=NONE gui=underline 29 | hi Directory ctermfg=177 ctermbg=NONE cterm=NONE guifg=#ca94ff guibg=NONE gui=NONE 30 | hi Folded ctermfg=68 ctermbg=23 cterm=NONE guifg=#5c98cd guibg=#2b3e50 gui=NONE 31 | 32 | hi Normal ctermfg=231 ctermbg=24 cterm=NONE guifg=#f8f8f2 guibg=#2b3e50 gui=NONE 33 | hi Boolean ctermfg=177 ctermbg=NONE cterm=NONE guifg=#ca94ff guibg=NONE gui=NONE 34 | hi Character ctermfg=177 ctermbg=NONE cterm=NONE guifg=#ca94ff guibg=NONE gui=NONE 35 | hi Comment ctermfg=33 ctermbg=NONE cterm=NONE guifg=#5c98cd guibg=NONE gui=NONE 36 | hi Conditional ctermfg=203 ctermbg=NONE cterm=NONE guifg=#ff6541 guibg=NONE gui=NONE 37 | hi Constant ctermfg=NONE ctermbg=NONE cterm=NONE guifg=NONE guibg=NONE gui=NONE 38 | hi Define ctermfg=203 ctermbg=NONE cterm=NONE guifg=#ff6541 guibg=NONE gui=NONE 39 | hi DiffAdd ctermfg=231 ctermbg=64 cterm=bold guifg=#f8f8f2 guibg=#478815 gui=bold 40 | hi DiffDelete ctermfg=88 ctermbg=NONE cterm=NONE guifg=#8c0c10 guibg=NONE gui=NONE 41 | hi DiffChange ctermfg=231 ctermbg=23 cterm=NONE guifg=#f8f8f2 guibg=#26446c gui=NONE 42 | hi DiffText ctermfg=231 ctermbg=24 cterm=bold guifg=#f8f8f2 guibg=#204a87 gui=bold 43 | hi ErrorMsg ctermfg=231 ctermbg=197 cterm=NONE guifg=#f8f8f0 guibg=#f92672 gui=NONE 44 | hi WarningMsg ctermfg=231 ctermbg=197 cterm=NONE guifg=#f8f8f0 guibg=#f92672 gui=NONE 45 | hi Float ctermfg=177 ctermbg=NONE cterm=NONE guifg=#ca94ff guibg=NONE gui=NONE 46 | hi Function ctermfg=71 ctermbg=NONE cterm=NONE guifg=#72c05d guibg=NONE gui=NONE 47 | hi Identifier ctermfg=81 ctermbg=NONE cterm=NONE guifg=#66d9ef guibg=NONE gui=italic 48 | hi Keyword ctermfg=203 ctermbg=NONE cterm=NONE guifg=#ff6541 guibg=NONE gui=NONE 49 | hi Label ctermfg=186 ctermbg=NONE cterm=NONE guifg=#e6db74 guibg=NONE gui=NONE 50 | hi NonText ctermfg=74 ctermbg=59 cterm=NONE guifg=#61bbc8 guibg=#354758 gui=NONE 51 | hi Number ctermfg=177 ctermbg=NONE cterm=NONE guifg=#ca94ff guibg=NONE gui=NONE 52 | hi Operator ctermfg=203 ctermbg=NONE cterm=NONE guifg=#ff6541 guibg=NONE gui=NONE 53 | hi PreProc ctermfg=203 ctermbg=NONE cterm=NONE guifg=#ff6541 guibg=NONE gui=NONE 54 | hi Special ctermfg=231 ctermbg=NONE cterm=NONE guifg=#f8f8f2 guibg=NONE gui=NONE 55 | hi SpecialKey ctermfg=74 ctermbg=59 cterm=NONE guifg=#61bbc8 guibg=#405160 gui=NONE 56 | hi Statement ctermfg=203 ctermbg=NONE cterm=NONE guifg=#ff6541 guibg=NONE gui=NONE 57 | hi StorageClass ctermfg=81 ctermbg=NONE cterm=NONE guifg=#66d9ef guibg=NONE gui=italic 58 | hi String ctermfg=186 ctermbg=NONE cterm=NONE guifg=#e6db74 guibg=NONE gui=NONE 59 | hi Tag ctermfg=203 ctermbg=NONE cterm=NONE guifg=#ff6541 guibg=NONE gui=NONE 60 | hi Title ctermfg=231 ctermbg=NONE cterm=bold guifg=#f8f8f2 guibg=NONE gui=bold 61 | hi Todo ctermfg=68 ctermbg=NONE cterm=inverse,bold guifg=#5c98cd guibg=NONE gui=inverse,bold 62 | hi Type ctermfg=NONE ctermbg=NONE cterm=NONE guifg=NONE guibg=NONE gui=NONE 63 | hi Underlined ctermfg=NONE ctermbg=NONE cterm=underline guifg=NONE guibg=NONE gui=underline 64 | hi rubyClass ctermfg=203 ctermbg=NONE cterm=NONE guifg=#ff6541 guibg=NONE gui=NONE 65 | hi rubyFunction ctermfg=71 ctermbg=NONE cterm=NONE guifg=#72c05d guibg=NONE gui=NONE 66 | hi rubyInterpolationDelimiter ctermfg=NONE ctermbg=NONE cterm=NONE guifg=NONE guibg=NONE gui=NONE 67 | hi rubySymbol ctermfg=177 ctermbg=NONE cterm=NONE guifg=#ca94ff guibg=NONE gui=NONE 68 | hi rubyConstant ctermfg=81 ctermbg=NONE cterm=NONE guifg=#66d9ef guibg=NONE gui=italic 69 | hi rubyStringDelimiter ctermfg=186 ctermbg=NONE cterm=NONE guifg=#e6db74 guibg=NONE gui=NONE 70 | hi rubyBlockParameter ctermfg=214 ctermbg=NONE cterm=NONE guifg=#ffab28 guibg=NONE gui=italic 71 | hi rubyInstanceVariable ctermfg=NONE ctermbg=NONE cterm=NONE guifg=NONE guibg=NONE gui=NONE 72 | hi rubyInclude ctermfg=203 ctermbg=NONE cterm=NONE guifg=#ff6541 guibg=NONE gui=NONE 73 | hi rubyGlobalVariable ctermfg=NONE ctermbg=NONE cterm=NONE guifg=NONE guibg=NONE gui=NONE 74 | hi rubyRegexp ctermfg=186 ctermbg=NONE cterm=NONE guifg=#e6db74 guibg=NONE gui=NONE 75 | hi rubyRegexpDelimiter ctermfg=186 ctermbg=NONE cterm=NONE guifg=#e6db74 guibg=NONE gui=NONE 76 | hi rubyEscape ctermfg=177 ctermbg=NONE cterm=NONE guifg=#ca94ff guibg=NONE gui=NONE 77 | hi rubyControl ctermfg=203 ctermbg=NONE cterm=NONE guifg=#ff6541 guibg=NONE gui=NONE 78 | hi rubyClassVariable ctermfg=NONE ctermbg=NONE cterm=NONE guifg=NONE guibg=NONE gui=NONE 79 | hi rubyOperator ctermfg=203 ctermbg=NONE cterm=NONE guifg=#ff6541 guibg=NONE gui=NONE 80 | hi rubyException ctermfg=203 ctermbg=NONE cterm=NONE guifg=#ff6541 guibg=NONE gui=NONE 81 | hi rubyPseudoVariable ctermfg=NONE ctermbg=NONE cterm=NONE guifg=NONE guibg=NONE gui=NONE 82 | hi rubyRailsUserClass ctermfg=81 ctermbg=NONE cterm=NONE guifg=#66d9ef guibg=NONE gui=italic 83 | hi rubyRailsARAssociationMethod ctermfg=81 ctermbg=NONE cterm=NONE guifg=#66d9ef guibg=NONE gui=NONE 84 | hi rubyRailsARMethod ctermfg=81 ctermbg=NONE cterm=NONE guifg=#66d9ef guibg=NONE gui=NONE 85 | hi rubyRailsRenderMethod ctermfg=81 ctermbg=NONE cterm=NONE guifg=#66d9ef guibg=NONE gui=NONE 86 | hi rubyRailsMethod ctermfg=81 ctermbg=NONE cterm=NONE guifg=#66d9ef guibg=NONE gui=NONE 87 | hi erubyDelimiter ctermfg=NONE ctermbg=NONE cterm=NONE guifg=NONE guibg=NONE gui=NONE 88 | hi erubyComment ctermfg=68 ctermbg=NONE cterm=NONE guifg=#5c98cd guibg=NONE gui=NONE 89 | hi erubyRailsMethod ctermfg=81 ctermbg=NONE cterm=NONE guifg=#66d9ef guibg=NONE gui=NONE 90 | hi htmlTag ctermfg=NONE ctermbg=NONE cterm=NONE guifg=NONE guibg=NONE gui=NONE 91 | hi htmlEndTag ctermfg=NONE ctermbg=NONE cterm=NONE guifg=NONE guibg=NONE gui=NONE 92 | hi htmlTagName ctermfg=NONE ctermbg=NONE cterm=NONE guifg=NONE guibg=NONE gui=NONE 93 | hi htmlArg ctermfg=NONE ctermbg=NONE cterm=NONE guifg=NONE guibg=NONE gui=NONE 94 | hi htmlSpecialChar ctermfg=177 ctermbg=NONE cterm=NONE guifg=#ca94ff guibg=NONE gui=NONE 95 | hi javaScriptFunction ctermfg=81 ctermbg=NONE cterm=NONE guifg=#66d9ef guibg=NONE gui=italic 96 | hi javaScriptRailsFunction ctermfg=81 ctermbg=NONE cterm=NONE guifg=#66d9ef guibg=NONE gui=NONE 97 | hi javaScriptBraces ctermfg=NONE ctermbg=NONE cterm=NONE guifg=NONE guibg=NONE gui=NONE 98 | hi yamlKey ctermfg=203 ctermbg=NONE cterm=NONE guifg=#ff6541 guibg=NONE gui=NONE 99 | hi yamlAnchor ctermfg=NONE ctermbg=NONE cterm=NONE guifg=NONE guibg=NONE gui=NONE 100 | hi yamlAlias ctermfg=NONE ctermbg=NONE cterm=NONE guifg=NONE guibg=NONE gui=NONE 101 | hi yamlDocumentHeader ctermfg=186 ctermbg=NONE cterm=NONE guifg=#e6db74 guibg=NONE gui=NONE 102 | hi cssURL ctermfg=214 ctermbg=NONE cterm=NONE guifg=#ffab28 guibg=NONE gui=italic 103 | hi cssFunctionName ctermfg=81 ctermbg=NONE cterm=NONE guifg=#66d9ef guibg=NONE gui=NONE 104 | hi cssColor ctermfg=177 ctermbg=NONE cterm=NONE guifg=#ca94ff guibg=NONE gui=NONE 105 | hi cssPseudoClassId ctermfg=71 ctermbg=NONE cterm=NONE guifg=#72c05d guibg=NONE gui=NONE 106 | hi cssClassName ctermfg=71 ctermbg=NONE cterm=NONE guifg=#72c05d guibg=NONE gui=NONE 107 | hi cssValueLength ctermfg=177 ctermbg=NONE cterm=NONE guifg=#ca94ff guibg=NONE gui=NONE 108 | hi cssCommonAttr ctermfg=81 ctermbg=NONE cterm=NONE guifg=#66d9ef guibg=NONE gui=NONE 109 | hi cssBraces ctermfg=NONE ctermbg=NONE cterm=NONE guifg=NONE guibg=NONE gui=NONE 110 | -------------------------------------------------------------------------------- /nvim/colors/monokai.vim: -------------------------------------------------------------------------------- 1 | " Vim color file 2 | " Converted from Textmate theme Monokai using Coloration v0.3.2 (http://github.com/sickill/coloration) 3 | 4 | set background=dark 5 | highlight clear 6 | 7 | if exists("syntax_on") 8 | syntax reset 9 | endif 10 | 11 | set t_Co=256 12 | let g:colors_name = "monokai" 13 | 14 | hi Cursor ctermfg=235 ctermbg=231 cterm=NONE guifg=#272822 guibg=#f8f8f0 gui=NONE 15 | hi Visual ctermfg=NONE ctermbg=59 cterm=NONE guifg=NONE guibg=#49483e gui=NONE 16 | hi CursorLine ctermfg=NONE ctermbg=237 cterm=NONE guifg=NONE guibg=#3c3d37 gui=NONE 17 | hi CursorColumn ctermfg=NONE ctermbg=237 cterm=NONE guifg=NONE guibg=#3c3d37 gui=NONE 18 | hi ColorColumn ctermfg=NONE ctermbg=237 cterm=NONE guifg=NONE guibg=#3c3d37 gui=NONE 19 | hi LineNr ctermfg=102 ctermbg=237 cterm=NONE guifg=#90908a guibg=#3c3d37 gui=NONE 20 | hi VertSplit ctermfg=241 ctermbg=241 cterm=NONE guifg=#64645e guibg=#64645e gui=NONE 21 | hi MatchParen ctermfg=197 ctermbg=NONE cterm=underline guifg=#f92672 guibg=NONE gui=underline 22 | hi StatusLine ctermfg=231 ctermbg=241 cterm=bold guifg=#f8f8f2 guibg=#64645e gui=bold 23 | hi StatusLineNC ctermfg=231 ctermbg=241 cterm=NONE guifg=#f8f8f2 guibg=#64645e gui=NONE 24 | hi Pmenu ctermfg=NONE ctermbg=NONE cterm=NONE guifg=NONE guibg=NONE gui=NONE 25 | hi PmenuSel ctermfg=NONE ctermbg=59 cterm=NONE guifg=NONE guibg=#49483e gui=NONE 26 | hi IncSearch ctermfg=235 ctermbg=186 cterm=NONE guifg=#272822 guibg=#e6db74 gui=NONE 27 | hi Search ctermfg=NONE ctermbg=NONE cterm=underline guifg=NONE guibg=NONE gui=underline 28 | hi Directory ctermfg=141 ctermbg=NONE cterm=NONE guifg=#ae81ff guibg=NONE gui=NONE 29 | hi Folded ctermfg=242 ctermbg=235 cterm=NONE guifg=#75715e guibg=#272822 gui=NONE 30 | 31 | hi Normal ctermfg=231 ctermbg=235 cterm=NONE guifg=#f8f8f2 guibg=#272822 gui=NONE 32 | hi Boolean ctermfg=141 ctermbg=NONE cterm=NONE guifg=#ae81ff guibg=NONE gui=NONE 33 | hi Character ctermfg=141 ctermbg=NONE cterm=NONE guifg=#ae81ff guibg=NONE gui=NONE 34 | hi Comment ctermfg=242 ctermbg=NONE cterm=NONE guifg=#75715e guibg=NONE gui=NONE 35 | hi Conditional ctermfg=197 ctermbg=NONE cterm=NONE guifg=#f92672 guibg=NONE gui=NONE 36 | hi Constant ctermfg=NONE ctermbg=NONE cterm=NONE guifg=NONE guibg=NONE gui=NONE 37 | hi Define ctermfg=197 ctermbg=NONE cterm=NONE guifg=#f92672 guibg=NONE gui=NONE 38 | hi DiffAdd ctermfg=231 ctermbg=64 cterm=bold guifg=#f8f8f2 guibg=#46830c gui=bold 39 | hi DiffDelete ctermfg=88 ctermbg=NONE cterm=NONE guifg=#8b0807 guibg=NONE gui=NONE 40 | hi DiffChange ctermfg=231 ctermbg=23 cterm=NONE guifg=#f8f8f2 guibg=#243955 gui=NONE 41 | hi DiffText ctermfg=231 ctermbg=24 cterm=bold guifg=#f8f8f2 guibg=#204a87 gui=bold 42 | hi ErrorMsg ctermfg=231 ctermbg=197 cterm=NONE guifg=#f8f8f0 guibg=#f92672 gui=NONE 43 | hi WarningMsg ctermfg=231 ctermbg=197 cterm=NONE guifg=#f8f8f0 guibg=#f92672 gui=NONE 44 | hi Float ctermfg=141 ctermbg=NONE cterm=NONE guifg=#ae81ff guibg=NONE gui=NONE 45 | hi Function ctermfg=148 ctermbg=NONE cterm=NONE guifg=#a6e22e guibg=NONE gui=NONE 46 | hi Identifier ctermfg=81 ctermbg=NONE cterm=NONE guifg=#66d9ef guibg=NONE gui=italic 47 | hi Keyword ctermfg=197 ctermbg=NONE cterm=NONE guifg=#f92672 guibg=NONE gui=NONE 48 | hi Label ctermfg=186 ctermbg=NONE cterm=NONE guifg=#e6db74 guibg=NONE gui=NONE 49 | hi NonText ctermfg=59 ctermbg=236 cterm=NONE guifg=#49483e guibg=#31322c gui=NONE 50 | hi Number ctermfg=141 ctermbg=NONE cterm=NONE guifg=#ae81ff guibg=NONE gui=NONE 51 | hi Operator ctermfg=197 ctermbg=NONE cterm=NONE guifg=#f92672 guibg=NONE gui=NONE 52 | hi PreProc ctermfg=197 ctermbg=NONE cterm=NONE guifg=#f92672 guibg=NONE gui=NONE 53 | hi Special ctermfg=231 ctermbg=NONE cterm=NONE guifg=#f8f8f2 guibg=NONE gui=NONE 54 | hi SpecialKey ctermfg=59 ctermbg=237 cterm=NONE guifg=#49483e guibg=#3c3d37 gui=NONE 55 | hi Statement ctermfg=197 ctermbg=NONE cterm=NONE guifg=#f92672 guibg=NONE gui=NONE 56 | hi StorageClass ctermfg=81 ctermbg=NONE cterm=NONE guifg=#66d9ef guibg=NONE gui=italic 57 | hi String ctermfg=186 ctermbg=NONE cterm=NONE guifg=#e6db74 guibg=NONE gui=NONE 58 | hi Tag ctermfg=197 ctermbg=NONE cterm=NONE guifg=#f92672 guibg=NONE gui=NONE 59 | hi Title ctermfg=231 ctermbg=NONE cterm=bold guifg=#f8f8f2 guibg=NONE gui=bold 60 | hi Todo ctermfg=95 ctermbg=NONE cterm=inverse,bold guifg=#75715e guibg=NONE gui=inverse,bold 61 | hi Type ctermfg=NONE ctermbg=NONE cterm=NONE guifg=NONE guibg=NONE gui=NONE 62 | hi Underlined ctermfg=NONE ctermbg=NONE cterm=underline guifg=NONE guibg=NONE gui=underline 63 | hi rubyClass ctermfg=197 ctermbg=NONE cterm=NONE guifg=#f92672 guibg=NONE gui=NONE 64 | hi rubyFunction ctermfg=148 ctermbg=NONE cterm=NONE guifg=#a6e22e guibg=NONE gui=NONE 65 | hi rubyInterpolationDelimiter ctermfg=NONE ctermbg=NONE cterm=NONE guifg=NONE guibg=NONE gui=NONE 66 | hi rubySymbol ctermfg=141 ctermbg=NONE cterm=NONE guifg=#ae81ff guibg=NONE gui=NONE 67 | hi rubyConstant ctermfg=81 ctermbg=NONE cterm=NONE guifg=#66d9ef guibg=NONE gui=italic 68 | hi rubyStringDelimiter ctermfg=186 ctermbg=NONE cterm=NONE guifg=#e6db74 guibg=NONE gui=NONE 69 | hi rubyBlockParameter ctermfg=208 ctermbg=NONE cterm=NONE guifg=#fd971f guibg=NONE gui=italic 70 | hi rubyInstanceVariable ctermfg=NONE ctermbg=NONE cterm=NONE guifg=NONE guibg=NONE gui=NONE 71 | hi rubyInclude ctermfg=197 ctermbg=NONE cterm=NONE guifg=#f92672 guibg=NONE gui=NONE 72 | hi rubyGlobalVariable ctermfg=NONE ctermbg=NONE cterm=NONE guifg=NONE guibg=NONE gui=NONE 73 | hi rubyRegexp ctermfg=186 ctermbg=NONE cterm=NONE guifg=#e6db74 guibg=NONE gui=NONE 74 | hi rubyRegexpDelimiter ctermfg=186 ctermbg=NONE cterm=NONE guifg=#e6db74 guibg=NONE gui=NONE 75 | hi rubyEscape ctermfg=141 ctermbg=NONE cterm=NONE guifg=#ae81ff guibg=NONE gui=NONE 76 | hi rubyControl ctermfg=197 ctermbg=NONE cterm=NONE guifg=#f92672 guibg=NONE gui=NONE 77 | hi rubyClassVariable ctermfg=NONE ctermbg=NONE cterm=NONE guifg=NONE guibg=NONE gui=NONE 78 | hi rubyOperator ctermfg=197 ctermbg=NONE cterm=NONE guifg=#f92672 guibg=NONE gui=NONE 79 | hi rubyException ctermfg=197 ctermbg=NONE cterm=NONE guifg=#f92672 guibg=NONE gui=NONE 80 | hi rubyPseudoVariable ctermfg=NONE ctermbg=NONE cterm=NONE guifg=NONE guibg=NONE gui=NONE 81 | hi rubyRailsUserClass ctermfg=81 ctermbg=NONE cterm=NONE guifg=#66d9ef guibg=NONE gui=italic 82 | hi rubyRailsARAssociationMethod ctermfg=81 ctermbg=NONE cterm=NONE guifg=#66d9ef guibg=NONE gui=NONE 83 | hi rubyRailsARMethod ctermfg=81 ctermbg=NONE cterm=NONE guifg=#66d9ef guibg=NONE gui=NONE 84 | hi rubyRailsRenderMethod ctermfg=81 ctermbg=NONE cterm=NONE guifg=#66d9ef guibg=NONE gui=NONE 85 | hi rubyRailsMethod ctermfg=81 ctermbg=NONE cterm=NONE guifg=#66d9ef guibg=NONE gui=NONE 86 | hi erubyDelimiter ctermfg=NONE ctermbg=NONE cterm=NONE guifg=NONE guibg=NONE gui=NONE 87 | hi erubyComment ctermfg=95 ctermbg=NONE cterm=NONE guifg=#75715e guibg=NONE gui=NONE 88 | hi erubyRailsMethod ctermfg=81 ctermbg=NONE cterm=NONE guifg=#66d9ef guibg=NONE gui=NONE 89 | hi htmlTag ctermfg=NONE ctermbg=NONE cterm=NONE guifg=NONE guibg=NONE gui=NONE 90 | hi htmlEndTag ctermfg=NONE ctermbg=NONE cterm=NONE guifg=NONE guibg=NONE gui=NONE 91 | hi htmlTagName ctermfg=NONE ctermbg=NONE cterm=NONE guifg=NONE guibg=NONE gui=NONE 92 | hi htmlArg ctermfg=NONE ctermbg=NONE cterm=NONE guifg=NONE guibg=NONE gui=NONE 93 | hi htmlSpecialChar ctermfg=141 ctermbg=NONE cterm=NONE guifg=#ae81ff guibg=NONE gui=NONE 94 | hi javaScriptFunction ctermfg=81 ctermbg=NONE cterm=NONE guifg=#66d9ef guibg=NONE gui=italic 95 | hi javaScriptRailsFunction ctermfg=81 ctermbg=NONE cterm=NONE guifg=#66d9ef guibg=NONE gui=NONE 96 | hi javaScriptBraces ctermfg=NONE ctermbg=NONE cterm=NONE guifg=NONE guibg=NONE gui=NONE 97 | hi yamlKey ctermfg=197 ctermbg=NONE cterm=NONE guifg=#f92672 guibg=NONE gui=NONE 98 | hi yamlAnchor ctermfg=NONE ctermbg=NONE cterm=NONE guifg=NONE guibg=NONE gui=NONE 99 | hi yamlAlias ctermfg=NONE ctermbg=NONE cterm=NONE guifg=NONE guibg=NONE gui=NONE 100 | hi yamlDocumentHeader ctermfg=186 ctermbg=NONE cterm=NONE guifg=#e6db74 guibg=NONE gui=NONE 101 | hi cssURL ctermfg=208 ctermbg=NONE cterm=NONE guifg=#fd971f guibg=NONE gui=italic 102 | hi cssFunctionName ctermfg=81 ctermbg=NONE cterm=NONE guifg=#66d9ef guibg=NONE gui=NONE 103 | hi cssColor ctermfg=141 ctermbg=NONE cterm=NONE guifg=#ae81ff guibg=NONE gui=NONE 104 | hi cssPseudoClassId ctermfg=148 ctermbg=NONE cterm=NONE guifg=#a6e22e guibg=NONE gui=NONE 105 | hi cssClassName ctermfg=148 ctermbg=NONE cterm=NONE guifg=#a6e22e guibg=NONE gui=NONE 106 | hi cssValueLength ctermfg=141 ctermbg=NONE cterm=NONE guifg=#ae81ff guibg=NONE gui=NONE 107 | hi cssCommonAttr ctermfg=81 ctermbg=NONE cterm=NONE guifg=#66d9ef guibg=NONE gui=NONE 108 | hi cssBraces ctermfg=NONE ctermbg=NONE cterm=NONE guifg=NONE guibg=NONE gui=NONE 109 | -------------------------------------------------------------------------------- /nvim/colors/flatui.vim: -------------------------------------------------------------------------------- 1 | " flatui.vim - Vim color scheme (http://flatuicolors.com) 2 | " ---------------------------------------------------------- 3 | " Author: John Louis Del Rosario (http://john2x.com/) 4 | " Version: 0.3 5 | " License: Same as Vim's. See ":help license". 6 | " ---------------------------------------------------------- 7 | 8 | " Setup ----------------------------------------------------{{{ 9 | " Reset syntax highlighting 10 | hi clear 11 | if exists("syntax_on") 12 | syntax reset 13 | endif 14 | 15 | " Declare theme name 16 | let g:colors_name="flatui" 17 | 18 | "}}} 19 | " The Colors -----------------------------------------------{{{ 20 | " Define reusable colors 21 | let s:midnightBlue= { "gui": "#2c3e50", "cterm": "236" } 22 | let s:clouds= { "gui": "#ecf0f1", "cterm": "255" } 23 | let s:silver= { "gui": "#bdc3c7", "cterm": "7" } 24 | let s:wetAsphalt= { "gui": "#34495e", "cterm": "239" } 25 | let s:concrete= { "gui": "#95a5a6", "cterm": "247" } 26 | let s:asbestos= { "gui": "#7f8c8d", "cterm": "245" } 27 | 28 | let s:turquoise= { "gui": "#1abc9c", "cterm": "36" } 29 | let s:greenSea= { "gui": "#16a085", "cterm": "29" } 30 | let s:emerald= { "gui": "#2ecc71", "cterm": "41" } 31 | let s:nephritis= { "gui": "#27ae60", "cterm": "35" } 32 | 33 | let s:peterRiver= { "gui": "#3498db", "cterm": "33" } 34 | let s:belizeHole= { "gui": "#2980b9", "cterm": "26" } 35 | let s:amethyst= { "gui": "#9b59b6", "cterm": "133" } 36 | let s:wisteria= { "gui": "#8e44ad", "cterm": "97" } 37 | 38 | let s:carrot= { "gui": "#e67e22", "cterm": "172" } 39 | let s:pumpkin= { "gui": "#d35400", "cterm": "166" } 40 | let s:sunFlower= { "gui": "#f1c40f", "cterm": "220" } 41 | let s:orange= { "gui": "#f39c12", "cterm": "214" } 42 | 43 | let s:alizarin= { "gui": "#e74c3c", "cterm": "196" } 44 | let s:pomegranate= { "gui": "#c0392b", "cterm": "124" } 45 | 46 | " Assign to semantic categories based on background color 47 | " Light theme 48 | let s:bg=s:clouds 49 | let s:norm=s:midnightBlue 50 | let s:comment=s:silver 51 | let s:dimmed=s:asbestos 52 | let s:subtle=s:concrete 53 | let s:faint=s:silver 54 | let s:faintAccent1=s:turquoise 55 | let s:faintAccent2=s:emerald 56 | let s:faintAccent3=s:peterRiver 57 | let s:faintAccent4=s:amethyst 58 | let s:faintAccent5=s:concrete 59 | let s:faintAccent6=s:sunFlower 60 | let s:faintAccent7=s:carrot 61 | let s:faintAccent8=s:alizarin 62 | let s:normAccent1=s:greenSea 63 | let s:normAccent2=s:nephritis 64 | let s:normAccent3=s:belizeHole 65 | let s:normAccent4=s:wisteria 66 | let s:normAccent5=s:wetAsphalt 67 | let s:normAccent6=s:orange 68 | let s:normAccent7=s:pumpkin 69 | let s:normAccent8=s:pomegranate 70 | let s:normRed=s:pomegranate 71 | let s:normGreen=s:nephritis 72 | let s:normBlue=s:belizeHole 73 | let s:faintRed=s:alizarin 74 | let s:faintGreen=s:emerald 75 | let s:faintBlue=s:peterRiver 76 | 77 | "}}} 78 | " Utilility Function ---------------------------------------{{{ 79 | function! s:h(group, style) 80 | execute "highlight" a:group 81 | \ "guifg=" (has_key(a:style, "fg") ? a:style.fg.gui : "NONE") 82 | \ "guibg=" (has_key(a:style, "bg") ? a:style.bg.gui : "NONE") 83 | \ "guisp=" (has_key(a:style, "sp") ? a:style.sp.gui : "NONE") 84 | \ "gui=" (has_key(a:style, "gui") ? a:style.gui : "NONE") 85 | \ "ctermfg=" (has_key(a:style, "fg") ? a:style.fg.cterm : "NONE") 86 | \ "ctermbg=" (has_key(a:style, "bg") ? a:style.bg.cterm : "NONE") 87 | \ "cterm=" (has_key(a:style, "cterm") ? a:style.cterm : "NONE") 88 | endfunction 89 | 90 | "}}} 91 | " Highlights - Vim >= 7 ------------------------------------{{{ 92 | if version >= 700 93 | call s:h("CursorLine", { "bg": s:silver }) 94 | call s:h("MatchParen", { "fg": s:bg, "bg": s:sunFlower, "gui": "bold" }) 95 | call s:h("Pmenu", { "bg": s:silver }) 96 | call s:h("PmenuThumb", { "bg": s:norm }) 97 | call s:h("PmenuSBar", { "bg": s:concrete }) 98 | call s:h("PmenuSel", { "bg": s:turquoise }) 99 | call s:h("ColorColumn", { "bg": s:silver }) 100 | call s:h("SpellBad", { "sp": s:pomegranate, "gui": "undercurl" }) 101 | call s:h("SpellCap", { "sp": s:pomegranate, "gui": "undercurl" }) 102 | call s:h("SpellRare", { "sp": s:pumpkin, "gui": "undercurl" }) 103 | call s:h("SpellLocal", { "sp": s:pomegranate, "gui": "undercurl" }) 104 | hi! link CursorColumn CursorLine 105 | 106 | " Use background for cterm Spell*, which does not support undercurl 107 | execute "hi! SpellBad ctermbg=" s:alizarin.cterm 108 | execute "hi! SpellCap ctermbg=" s:alizarin.cterm 109 | execute "hi! SpellRare ctermbg=" s:carrot.cterm 110 | execute "hi! SpellLocal ctermbg=" s:alizarin.cterm 111 | endif 112 | 113 | "}}} 114 | " Highlights - UI ------------------------------------------{{{ 115 | call s:h("Normal", { "fg": s:midnightBlue, "bg": s:bg }) 116 | call s:h("NonText", { "fg": s:concrete }) 117 | call s:h("Cursor", { "fg": s:clouds, "bg": s:wetAsphalt }) 118 | call s:h("Visual", { "bg": s:emerald, "fg": s:clouds }) 119 | call s:h("IncSearch", { "bg": s:sunFlower }) 120 | call s:h("Search", { "bg": s:turquoise }) 121 | call s:h("StatusLine", { "fg": s:clouds, "bg": s:concrete, "gui": "italic" }) 122 | call s:h("StatusLineNC", { "fg": s:silver, "bg": s:concrete }) 123 | call s:h("SignColumn", { "fg": s:silver }) 124 | call s:h("VertSplit", { "fg": s:silver, "bg": s:silver }) 125 | call s:h("TabLine", { "fg": s:silver, "bg": s:silver }) 126 | call s:h("TabLineSel", { "gui": "bold", "cterm": "bold" }) 127 | call s:h("Folded", { "fg": s:clouds, "bg": s:silver }) 128 | call s:h("Directory", { "fg": s:peterRiver }) 129 | call s:h("Title", { "fg": s:carrot, "gui": "bold", "cterm": "bold" }) 130 | call s:h("ErrorMsg", { "fg": s:alizarin, "bg": s:pomegranate, "gui": "bold", "cterm": "bold" }) 131 | call s:h("DiffAdd", { "bg": s:emerald }) 132 | call s:h("DiffChange", { "bg": s:carrot }) 133 | call s:h("DiffDelete", { "fg": s:pomegranate, "bg": s:alizarin }) 134 | call s:h("DiffText", { "bg": s:carrot, "gui": "bold", "cterm": "bold" }) 135 | call s:h("User1", { "fg": s:clouds, "bg": s:greenSea }) 136 | call s:h("User2", { "fg": s:clouds, "bg": s:nephritis }) 137 | call s:h("User3", { "fg": s:clouds, "bg": s:belizeHole }) 138 | hi! link WildMenu IncSearch 139 | hi! link FoldColumn SignColumn 140 | hi! link WarningMsg ErrorMsg 141 | hi! link MoreMsg Title 142 | hi! link Question MoreMsg 143 | hi! link ModeMsg MoreMsg 144 | hi! link TabLineFill StatusLineNC 145 | hi! link LineNr NonText 146 | hi! link SpecialKey NonText 147 | 148 | "}}} 149 | " Highlights - Generic Syntax ------------------------------{{{ 150 | call s:h("Delimiter", { "fg": s:asbestos }) 151 | call s:h("Comment", { "fg": s:silver, "gui": "italic" }) 152 | call s:h("Underlined", { "fg": s:midnightBlue, "gui": "underline", "cterm": "underline" }) 153 | call s:h("Type", { "fg": s:wisteria }) 154 | call s:h("String", { "fg": s:belizeHole }) 155 | call s:h("Keyword", { "fg": s:turquoise, "gui": "bold", "cterm": "bold" }) 156 | call s:h("Todo", { "fg": s:sunFlower, "gui": "bold", "cterm": "bold" }) 157 | call s:h("Function", { "fg": s:wetAsphalt, "gui": "bold", "cterm": "bold" }) 158 | call s:h("Identifier", { "fg": s:greenSea }) 159 | call s:h("Statement", { "fg": s:belizeHole }) 160 | call s:h("Constant", { "fg": s:peterRiver, "gui": "bold", "cterm": "bold" }) 161 | call s:h("PreProc", { "fg": s:emerald, "gui": "bold", "cterm": "bold" }) 162 | " hi! link Identifier Function 163 | " hi! link Statement Type 164 | " hi! link Constant Directory 165 | hi! link Number Constant 166 | hi! link Special Constant 167 | hi! link Error ErrorMsg 168 | 169 | "}}} 170 | " Highlights - HTML ----------------------------------------{{{ 171 | hi! link htmlLink Underlined 172 | hi! link htmlTag Type 173 | hi! link htmlEndTag htmlTag 174 | 175 | "}}} 176 | " Highlights - CSS -----------------------------------------{{{ 177 | hi! link cssBraces Delimiter 178 | hi! link cssSelectorOp cssBraces 179 | hi! link cssClassName Normal 180 | 181 | "}}} 182 | " Highlights - Markdown ------------------------------------{{{ 183 | hi! link mkdListItem mkdDelimiter 184 | 185 | "}}} 186 | " Highlights - Shell ---------------------------------------{{{ 187 | hi! link shOperator Delimiter 188 | hi! link shCaseBar Delimiter 189 | 190 | "}}} 191 | " Highlights - JavaScript ----------------------------------{{{ 192 | hi! link javaScriptValue Constant 193 | hi! link javaScriptNull Constant 194 | hi! link javaScriptBraces Normal 195 | 196 | "}}} 197 | " Highlights - Help ----------------------------------------{{{ 198 | hi! link helpExample String 199 | hi! link helpHeadline Title 200 | hi! link helpSectionDelim Comment 201 | hi! link helpHyperTextEntry Statement 202 | hi! link helpHyperTextJump Underlined 203 | hi! link helpURL Underlined 204 | 205 | "}}} 206 | " Highlights - Python ----------------------------------------{{{ 207 | call s:h("pythonBuiltin", { "fg": s:turquoise, "gui": "bold", "cterm": "bold" }) 208 | call s:h("pythonBuiltinObj", { "fg": s:turquoise, "gui": "bold", "cterm": "bold" }) 209 | call s:h("pythonEscape", { "fg": s:belizeHole, "gui": "bold", "cterm": "bold" }) 210 | call s:h("pythonException", { "fg": s:pomegranate, "gui": "bold", "cterm": "bold" }) 211 | call s:h("pythonPrecondit", { "fg": s:emerald, "gui": "bold", "cterm": "bold" }) 212 | call s:h("pythonDecorator", { "fg": s:silver, "gui": "bold", "cterm": "bold" }) 213 | call s:h("pythonRun", { "fg": s:alizarin, "gui": "bold", "cterm": "bold" }) 214 | call s:h("pythonCoding", { "fg": s:alizarin, "gui": "bold", "cterm": "bold" }) 215 | hi! link pythonBuiltinFunc Function 216 | 217 | "}}} 218 | " Highlights - Clojure ----------------------------------------{{{ 219 | 220 | call s:h("clojureSpecial", { "fg": s:alizarin, "gui": "bold", "cterm": "bold" }) 221 | call s:h("clojureDefn", { "fg": s:turquoise, "gui": "bold", "cterm": "bold" }) 222 | call s:h("clojureDefMacro", { "fg": s:turquoise, "gui": "bold", "cterm": "bold" }) 223 | call s:h("clojureDefine", { "fg": s:turquoise, "gui": "bold", "cterm": "bold" }) 224 | call s:h("clojureMacro", { "fg": s:wisteria }) 225 | call s:h("clojureCond", { "fg": s:greenSea }) 226 | call s:h("clojureKeyword", { "fg": s:greenSea }) 227 | call s:h("clojureFunc", { "fg": s:wisteria }) 228 | call s:h("clojureRepeat", { "fg": s:wisteria }) 229 | call s:h("clojureAnonArg", { "fg": s:concrete }) 230 | 231 | "}}} 232 | " vim: fdm=marker 233 | -------------------------------------------------------------------------------- /nvim/colors/molokai.vim: -------------------------------------------------------------------------------- 1 | 2 | " Vim color file 3 | " 4 | " Author: Tomas Restrepo 5 | " 6 | " Note: Based on the monokai theme for textmate 7 | " by Wimer Hazenberg and its darker variant 8 | " by Hamish Stuart Macpherson 9 | " 10 | 11 | hi clear 12 | 13 | set background=dark 14 | if version > 580 15 | " no guarantees for version 5.8 and below, but this makes it stop 16 | " complaining 17 | hi clear 18 | if exists("syntax_on") 19 | syntax reset 20 | endif 21 | endif 22 | let g:colors_name="molokai" 23 | 24 | if exists("g:molokai_original") 25 | let s:molokai_original = g:molokai_original 26 | else 27 | let s:molokai_original = 0 28 | endif 29 | 30 | 31 | hi Boolean guifg=#AE81FF 32 | hi Character guifg=#E6DB74 33 | hi Number guifg=#AE81FF 34 | hi String guifg=#E6DB74 35 | hi Conditional guifg=#F92672 gui=bold 36 | hi Constant guifg=#AE81FF gui=bold 37 | hi Cursor guifg=#000000 guibg=#F8F8F0 38 | hi iCursor guifg=#000000 guibg=#F8F8F0 39 | hi Debug guifg=#BCA3A3 gui=bold 40 | hi Define guifg=#66D9EF 41 | hi Delimiter guifg=#8F8F8F 42 | hi DiffAdd guibg=#13354A 43 | hi DiffChange guifg=#89807D guibg=#4C4745 44 | hi DiffDelete guifg=#960050 guibg=#1E0010 45 | hi DiffText guibg=#4C4745 gui=italic,bold 46 | 47 | hi Directory guifg=#A6E22E gui=bold 48 | hi Error guifg=#960050 guibg=#1E0010 49 | hi ErrorMsg guifg=#F92672 guibg=#232526 gui=bold 50 | hi Exception guifg=#A6E22E gui=bold 51 | hi Float guifg=#AE81FF 52 | hi FoldColumn guifg=#465457 guibg=#000000 53 | hi Folded guifg=#465457 guibg=#000000 54 | hi Function guifg=#A6E22E 55 | hi Identifier guifg=#FD971F 56 | hi Ignore guifg=#808080 guibg=bg 57 | hi IncSearch guifg=#C4BE89 guibg=#000000 58 | 59 | hi Keyword guifg=#F92672 gui=bold 60 | hi Label guifg=#E6DB74 gui=none 61 | hi Macro guifg=#C4BE89 gui=italic 62 | hi SpecialKey guifg=#66D9EF gui=italic 63 | 64 | hi MatchParen guifg=#000000 guibg=#FD971F gui=bold 65 | hi ModeMsg guifg=#E6DB74 66 | hi MoreMsg guifg=#E6DB74 67 | hi Operator guifg=#F92672 68 | 69 | " complete menu 70 | hi Pmenu guifg=#66D9EF guibg=#000000 71 | hi PmenuSel guibg=#808080 72 | hi PmenuSbar guibg=#080808 73 | hi PmenuThumb guifg=#66D9EF 74 | 75 | hi PreCondit guifg=#A6E22E gui=bold 76 | hi PreProc guifg=#A6E22E 77 | hi Question guifg=#66D9EF 78 | hi Repeat guifg=#F92672 gui=bold 79 | hi Search guifg=#FFFFFF guibg=#455354 80 | " marks 81 | hi SignColumn guifg=#A6E22E guibg=#232526 82 | hi SpecialChar guifg=#F92672 gui=bold 83 | hi SpecialComment guifg=#7E8E91 gui=bold 84 | hi Special guifg=#66D9EF guibg=bg gui=italic 85 | if has("spell") 86 | hi SpellBad guisp=#FF0000 gui=undercurl 87 | hi SpellCap guisp=#7070F0 gui=undercurl 88 | hi SpellLocal guisp=#70F0F0 gui=undercurl 89 | hi SpellRare guisp=#FFFFFF gui=undercurl 90 | endif 91 | hi Statement guifg=#F92672 gui=bold 92 | hi StatusLine guifg=#455354 guibg=fg 93 | hi StatusLineNC guifg=#808080 guibg=#080808 94 | hi StorageClass guifg=#FD971F gui=italic 95 | hi Structure guifg=#66D9EF 96 | hi Tag guifg=#F92672 gui=italic 97 | hi Title guifg=#ef5939 98 | hi Todo guifg=#FFFFFF guibg=bg gui=bold 99 | 100 | hi Typedef guifg=#66D9EF 101 | hi Type guifg=#66D9EF gui=none 102 | hi Underlined guifg=#808080 gui=underline 103 | 104 | hi VertSplit guifg=#808080 guibg=#080808 gui=bold 105 | hi VisualNOS guibg=#403D3D 106 | hi Visual guibg=#403D3D 107 | hi WarningMsg guifg=#FFFFFF guibg=#333333 gui=bold 108 | hi WildMenu guifg=#66D9EF guibg=#000000 109 | 110 | if s:molokai_original == 1 111 | hi Normal guifg=#F8F8F2 guibg=#272822 112 | hi Comment guifg=#75715E 113 | hi CursorLine guibg=#3E3D32 114 | hi CursorLineNr guifg=#FD971F gui=none 115 | hi CursorColumn guibg=#3E3D32 116 | hi ColorColumn guibg=#3B3A32 117 | hi LineNr guifg=#BCBCBC guibg=#3B3A32 118 | hi NonText guifg=#75715E 119 | hi SpecialKey guifg=#75715E 120 | else 121 | hi Normal guifg=#F8F8F2 guibg=#1B1D1E 122 | hi Comment guifg=#7E8E91 123 | hi CursorLine guibg=#293739 124 | hi CursorLineNr guifg=#FD971F gui=none 125 | hi CursorColumn guibg=#293739 126 | hi ColorColumn guibg=#232526 127 | hi LineNr guifg=#465457 guibg=#232526 128 | hi NonText guifg=#465457 129 | hi SpecialKey guifg=#465457 130 | end 131 | 132 | " 133 | " Support for 256-color terminal 134 | " 135 | if &t_Co > 255 136 | if s:molokai_original == 1 137 | hi Normal ctermbg=234 138 | hi CursorLine ctermbg=235 cterm=none 139 | hi CursorLineNr ctermfg=208 cterm=none 140 | else 141 | hi Normal ctermfg=252 ctermbg=233 142 | hi CursorLine ctermbg=234 cterm=none 143 | hi CursorLineNr ctermfg=208 cterm=none 144 | endif 145 | hi Boolean ctermfg=135 146 | hi Character ctermfg=144 147 | hi Number ctermfg=135 148 | hi String ctermfg=144 149 | hi Conditional ctermfg=161 cterm=bold 150 | hi Constant ctermfg=135 cterm=bold 151 | hi Cursor ctermfg=16 ctermbg=253 152 | hi Debug ctermfg=225 cterm=bold 153 | hi Define ctermfg=81 154 | hi Delimiter ctermfg=241 155 | 156 | hi DiffAdd ctermbg=24 157 | hi DiffChange ctermfg=181 ctermbg=239 158 | hi DiffDelete ctermfg=162 ctermbg=53 159 | hi DiffText ctermbg=102 cterm=bold 160 | 161 | hi Directory ctermfg=118 cterm=bold 162 | hi Error ctermfg=219 ctermbg=89 163 | hi ErrorMsg ctermfg=199 ctermbg=16 cterm=bold 164 | hi Exception ctermfg=118 cterm=bold 165 | hi Float ctermfg=135 166 | hi FoldColumn ctermfg=67 ctermbg=16 167 | hi Folded ctermfg=67 ctermbg=16 168 | hi Function ctermfg=118 169 | hi Identifier ctermfg=208 cterm=none 170 | hi Ignore ctermfg=244 ctermbg=232 171 | hi IncSearch ctermfg=193 ctermbg=16 172 | 173 | hi keyword ctermfg=161 cterm=bold 174 | hi Label ctermfg=229 cterm=none 175 | hi Macro ctermfg=193 176 | hi SpecialKey ctermfg=81 177 | 178 | hi MatchParen ctermfg=16 ctermbg=208 cterm=bold 179 | hi ModeMsg ctermfg=229 180 | hi MoreMsg ctermfg=229 181 | hi Operator ctermfg=161 182 | 183 | " complete menu 184 | hi Pmenu ctermfg=81 ctermbg=16 185 | hi PmenuSel ctermfg=81 ctermbg=244 186 | hi PmenuSbar ctermbg=232 187 | hi PmenuThumb ctermfg=81 188 | 189 | hi PreCondit ctermfg=118 cterm=bold 190 | hi PreProc ctermfg=118 191 | hi Question ctermfg=81 192 | hi Repeat ctermfg=161 cterm=bold 193 | hi Search ctermfg=253 ctermbg=66 194 | 195 | " marks column 196 | hi SignColumn ctermfg=118 ctermbg=235 197 | hi SpecialChar ctermfg=161 cterm=bold 198 | hi SpecialComment ctermfg=245 cterm=bold 199 | hi Special ctermfg=81 200 | if has("spell") 201 | hi SpellBad ctermbg=52 202 | hi SpellCap ctermbg=17 203 | hi SpellLocal ctermbg=17 204 | hi SpellRare ctermfg=none ctermbg=none cterm=reverse 205 | endif 206 | hi Statement ctermfg=161 cterm=bold 207 | hi StatusLine ctermfg=238 ctermbg=253 208 | hi StatusLineNC ctermfg=244 ctermbg=232 209 | hi StorageClass ctermfg=208 210 | hi Structure ctermfg=81 211 | hi Tag ctermfg=161 212 | hi Title ctermfg=166 213 | hi Todo ctermfg=231 ctermbg=232 cterm=bold 214 | 215 | hi Typedef ctermfg=81 216 | hi Type ctermfg=81 cterm=none 217 | hi Underlined ctermfg=244 cterm=underline 218 | 219 | hi VertSplit ctermfg=244 ctermbg=232 cterm=bold 220 | hi VisualNOS ctermbg=238 221 | hi Visual ctermbg=235 222 | hi WarningMsg ctermfg=231 ctermbg=238 cterm=bold 223 | hi WildMenu ctermfg=81 ctermbg=16 224 | 225 | hi Comment ctermfg=59 226 | hi CursorColumn ctermbg=234 227 | hi ColorColumn ctermbg=234 228 | hi LineNr ctermfg=250 ctermbg=234 229 | hi NonText ctermfg=59 230 | 231 | hi SpecialKey ctermfg=59 232 | 233 | if exists("g:rehash256") && g:rehash256 == 1 234 | hi Normal ctermfg=252 ctermbg=234 235 | hi CursorLine ctermbg=236 cterm=none 236 | hi CursorLineNr ctermfg=208 cterm=none 237 | 238 | hi Boolean ctermfg=141 239 | hi Character ctermfg=222 240 | hi Number ctermfg=141 241 | hi String ctermfg=222 242 | hi Conditional ctermfg=197 cterm=bold 243 | hi Constant ctermfg=141 cterm=bold 244 | 245 | hi DiffDelete ctermfg=125 ctermbg=233 246 | 247 | hi Directory ctermfg=154 cterm=bold 248 | hi Error ctermfg=125 ctermbg=233 249 | hi Exception ctermfg=154 cterm=bold 250 | hi Float ctermfg=141 251 | hi Function ctermfg=154 252 | hi Identifier ctermfg=208 253 | 254 | hi Keyword ctermfg=197 cterm=bold 255 | hi Operator ctermfg=197 256 | hi PreCondit ctermfg=154 cterm=bold 257 | hi PreProc ctermfg=154 258 | hi Repeat ctermfg=197 cterm=bold 259 | 260 | hi Statement ctermfg=197 cterm=bold 261 | hi Tag ctermfg=197 262 | hi Title ctermfg=203 263 | hi Visual ctermbg=238 264 | 265 | hi Comment ctermfg=244 266 | hi LineNr ctermfg=239 ctermbg=235 267 | hi NonText ctermfg=239 268 | hi SpecialKey ctermfg=239 269 | endif 270 | end 271 | -------------------------------------------------------------------------------- /nvim/colors/Tomorrow-Night-Bright.vim: -------------------------------------------------------------------------------- 1 | " Tomorrow Night Bright - Full Colour and 256 Colour 2 | " http://chriskempson.com 3 | " 4 | " Hex colour conversion functions borrowed from the theme "Desert256"" 5 | 6 | " Default GUI Colours 7 | let s:foreground = "eaeaea" 8 | let s:background = "000000" 9 | let s:selection = "424242" 10 | let s:line = "2a2a2a" 11 | let s:comment = "969896" 12 | let s:red = "d54e53" 13 | let s:orange = "e78c45" 14 | let s:yellow = "e7c547" 15 | let s:green = "b9ca4a" 16 | let s:aqua = "70c0b1" 17 | let s:blue = "7aa6da" 18 | let s:purple = "c397d8" 19 | let s:window = "4d5057" 20 | 21 | hi clear 22 | syntax reset 23 | 24 | let g:colors_name = "Tomorrow-Night-Bright" 25 | 26 | if has("gui_running") || &t_Co == 88 || &t_Co == 256 27 | " Returns an approximate grey index for the given grey level 28 | fun grey_number(x) 29 | if &t_Co == 88 30 | if a:x < 23 31 | return 0 32 | elseif a:x < 69 33 | return 1 34 | elseif a:x < 103 35 | return 2 36 | elseif a:x < 127 37 | return 3 38 | elseif a:x < 150 39 | return 4 40 | elseif a:x < 173 41 | return 5 42 | elseif a:x < 196 43 | return 6 44 | elseif a:x < 219 45 | return 7 46 | elseif a:x < 243 47 | return 8 48 | else 49 | return 9 50 | endif 51 | else 52 | if a:x < 14 53 | return 0 54 | else 55 | let l:n = (a:x - 8) / 10 56 | let l:m = (a:x - 8) % 10 57 | if l:m < 5 58 | return l:n 59 | else 60 | return l:n + 1 61 | endif 62 | endif 63 | endif 64 | endfun 65 | 66 | " Returns the actual grey level represented by the grey index 67 | fun grey_level(n) 68 | if &t_Co == 88 69 | if a:n == 0 70 | return 0 71 | elseif a:n == 1 72 | return 46 73 | elseif a:n == 2 74 | return 92 75 | elseif a:n == 3 76 | return 115 77 | elseif a:n == 4 78 | return 139 79 | elseif a:n == 5 80 | return 162 81 | elseif a:n == 6 82 | return 185 83 | elseif a:n == 7 84 | return 208 85 | elseif a:n == 8 86 | return 231 87 | else 88 | return 255 89 | endif 90 | else 91 | if a:n == 0 92 | return 0 93 | else 94 | return 8 + (a:n * 10) 95 | endif 96 | endif 97 | endfun 98 | 99 | " Returns the palette index for the given grey index 100 | fun grey_colour(n) 101 | if &t_Co == 88 102 | if a:n == 0 103 | return 16 104 | elseif a:n == 9 105 | return 79 106 | else 107 | return 79 + a:n 108 | endif 109 | else 110 | if a:n == 0 111 | return 16 112 | elseif a:n == 25 113 | return 231 114 | else 115 | return 231 + a:n 116 | endif 117 | endif 118 | endfun 119 | 120 | " Returns an approximate colour index for the given colour level 121 | fun rgb_number(x) 122 | if &t_Co == 88 123 | if a:x < 69 124 | return 0 125 | elseif a:x < 172 126 | return 1 127 | elseif a:x < 230 128 | return 2 129 | else 130 | return 3 131 | endif 132 | else 133 | if a:x < 75 134 | return 0 135 | else 136 | let l:n = (a:x - 55) / 40 137 | let l:m = (a:x - 55) % 40 138 | if l:m < 20 139 | return l:n 140 | else 141 | return l:n + 1 142 | endif 143 | endif 144 | endif 145 | endfun 146 | 147 | " Returns the actual colour level for the given colour index 148 | fun rgb_level(n) 149 | if &t_Co == 88 150 | if a:n == 0 151 | return 0 152 | elseif a:n == 1 153 | return 139 154 | elseif a:n == 2 155 | return 205 156 | else 157 | return 255 158 | endif 159 | else 160 | if a:n == 0 161 | return 0 162 | else 163 | return 55 + (a:n * 40) 164 | endif 165 | endif 166 | endfun 167 | 168 | " Returns the palette index for the given R/G/B colour indices 169 | fun rgb_colour(x, y, z) 170 | if &t_Co == 88 171 | return 16 + (a:x * 16) + (a:y * 4) + a:z 172 | else 173 | return 16 + (a:x * 36) + (a:y * 6) + a:z 174 | endif 175 | endfun 176 | 177 | " Returns the palette index to approximate the given R/G/B colour levels 178 | fun colour(r, g, b) 179 | " Get the closest grey 180 | let l:gx = grey_number(a:r) 181 | let l:gy = grey_number(a:g) 182 | let l:gz = grey_number(a:b) 183 | 184 | " Get the closest colour 185 | let l:x = rgb_number(a:r) 186 | let l:y = rgb_number(a:g) 187 | let l:z = rgb_number(a:b) 188 | 189 | if l:gx == l:gy && l:gy == l:gz 190 | " There are two possibilities 191 | let l:dgr = grey_level(l:gx) - a:r 192 | let l:dgg = grey_level(l:gy) - a:g 193 | let l:dgb = grey_level(l:gz) - a:b 194 | let l:dgrey = (l:dgr * l:dgr) + (l:dgg * l:dgg) + (l:dgb * l:dgb) 195 | let l:dr = rgb_level(l:gx) - a:r 196 | let l:dg = rgb_level(l:gy) - a:g 197 | let l:db = rgb_level(l:gz) - a:b 198 | let l:drgb = (l:dr * l:dr) + (l:dg * l:dg) + (l:db * l:db) 199 | if l:dgrey < l:drgb 200 | " Use the grey 201 | return grey_colour(l:gx) 202 | else 203 | " Use the colour 204 | return rgb_colour(l:x, l:y, l:z) 205 | endif 206 | else 207 | " Only one possibility 208 | return rgb_colour(l:x, l:y, l:z) 209 | endif 210 | endfun 211 | 212 | " Returns the palette index to approximate the 'rrggbb' hex string 213 | fun rgb(rgb) 214 | let l:r = ("0x" . strpart(a:rgb, 0, 2)) + 0 215 | let l:g = ("0x" . strpart(a:rgb, 2, 2)) + 0 216 | let l:b = ("0x" . strpart(a:rgb, 4, 2)) + 0 217 | 218 | return colour(l:r, l:g, l:b) 219 | endfun 220 | 221 | " Sets the highlighting for the given group 222 | fun X(group, fg, bg, attr) 223 | if a:fg != "" 224 | exec "hi " . a:group . " guifg=#" . a:fg . " ctermfg=" . rgb(a:fg) 225 | endif 226 | if a:bg != "" 227 | exec "hi " . a:group . " guibg=#" . a:bg . " ctermbg=" . rgb(a:bg) 228 | endif 229 | if a:attr != "" 230 | exec "hi " . a:group . " gui=" . a:attr . " cterm=" . a:attr 231 | endif 232 | endfun 233 | 234 | " Vim Highlighting 235 | call X("Normal", s:foreground, s:background, "") 236 | call X("LineNr", s:selection, "", "") 237 | call X("NonText", s:selection, "", "") 238 | call X("SpecialKey", s:selection, "", "") 239 | call X("Search", s:background, s:yellow, "") 240 | call X("TabLine", s:foreground, s:background, "reverse") 241 | call X("StatusLine", s:window, s:yellow, "reverse") 242 | call X("StatusLineNC", s:window, s:foreground, "reverse") 243 | call X("VertSplit", s:window, s:window, "none") 244 | call X("Visual", "", s:selection, "") 245 | call X("Directory", s:blue, "", "") 246 | call X("ModeMsg", s:green, "", "") 247 | call X("MoreMsg", s:green, "", "") 248 | call X("Question", s:green, "", "") 249 | call X("WarningMsg", s:red, "", "") 250 | call X("MatchParen", "", s:selection, "") 251 | call X("Folded", s:comment, s:background, "") 252 | call X("FoldColumn", "", s:background, "") 253 | if version >= 700 254 | call X("CursorLine", "", s:line, "none") 255 | call X("CursorColumn", "", s:line, "none") 256 | call X("PMenu", s:foreground, s:selection, "none") 257 | call X("PMenuSel", s:foreground, s:selection, "reverse") 258 | end 259 | if version >= 703 260 | call X("ColorColumn", "", s:line, "none") 261 | end 262 | 263 | " Standard Highlighting 264 | call X("Comment", s:comment, "", "") 265 | call X("Todo", s:comment, s:background, "") 266 | call X("Title", s:comment, "", "") 267 | call X("Identifier", s:red, "", "none") 268 | call X("Statement", s:foreground, "", "") 269 | call X("Conditional", s:foreground, "", "") 270 | call X("Repeat", s:foreground, "", "") 271 | call X("Structure", s:purple, "", "") 272 | call X("Function", s:blue, "", "") 273 | call X("Constant", s:orange, "", "") 274 | call X("String", s:green, "", "") 275 | call X("Special", s:foreground, "", "") 276 | call X("PreProc", s:purple, "", "") 277 | call X("Operator", s:aqua, "", "none") 278 | call X("Type", s:blue, "", "none") 279 | call X("Define", s:purple, "", "none") 280 | call X("Include", s:blue, "", "") 281 | "call X("Ignore", "666666", "", "") 282 | 283 | " Vim Highlighting 284 | call X("vimCommand", s:red, "", "none") 285 | 286 | " C Highlighting 287 | call X("cType", s:yellow, "", "") 288 | call X("cStorageClass", s:purple, "", "") 289 | call X("cConditional", s:purple, "", "") 290 | call X("cRepeat", s:purple, "", "") 291 | 292 | " PHP Highlighting 293 | call X("phpVarSelector", s:red, "", "") 294 | call X("phpKeyword", s:purple, "", "") 295 | call X("phpRepeat", s:purple, "", "") 296 | call X("phpConditional", s:purple, "", "") 297 | call X("phpStatement", s:purple, "", "") 298 | call X("phpMemberSelector", s:foreground, "", "") 299 | 300 | " Ruby Highlighting 301 | call X("rubySymbol", s:green, "", "") 302 | call X("rubyConstant", s:yellow, "", "") 303 | call X("rubyAccess", s:yellow, "", "") 304 | call X("rubyAttribute", s:blue, "", "") 305 | call X("rubyInclude", s:blue, "", "") 306 | call X("rubyLocalVariableOrMethod", s:orange, "", "") 307 | call X("rubyCurlyBlock", s:orange, "", "") 308 | call X("rubyStringDelimiter", s:green, "", "") 309 | call X("rubyInterpolationDelimiter", s:orange, "", "") 310 | call X("rubyConditional", s:purple, "", "") 311 | call X("rubyRepeat", s:purple, "", "") 312 | call X("rubyControl", s:purple, "", "") 313 | call X("rubyException", s:purple, "", "") 314 | 315 | " Python Highlighting 316 | call X("pythonInclude", s:purple, "", "") 317 | call X("pythonStatement", s:purple, "", "") 318 | call X("pythonConditional", s:purple, "", "") 319 | call X("pythonRepeat", s:purple, "", "") 320 | call X("pythonException", s:purple, "", "") 321 | call X("pythonFunction", s:blue, "", "") 322 | call X("pythonPreCondit", s:purple, "", "") 323 | call X("pythonRepeat", s:aqua, "", "") 324 | call X("pythonExClass", s:orange, "", "") 325 | 326 | " JavaScript Highlighting 327 | call X("javaScriptBraces", s:foreground, "", "") 328 | call X("javaScriptFunction", s:purple, "", "") 329 | call X("javaScriptConditional", s:purple, "", "") 330 | call X("javaScriptRepeat", s:purple, "", "") 331 | call X("javaScriptNumber", s:orange, "", "") 332 | call X("javaScriptMember", s:orange, "", "") 333 | 334 | " HTML Highlighting 335 | call X("htmlTag", s:red, "", "") 336 | call X("htmlTagName", s:red, "", "") 337 | call X("htmlArg", s:red, "", "") 338 | call X("htmlScriptTag", s:red, "", "") 339 | 340 | " Diff Highlighting 341 | call X("diffAdded", s:green, "", "") 342 | call X("diffRemoved", s:red, "", "") 343 | 344 | " Lua Highlighting 345 | call X("luaStatement", s:purple, "", "") 346 | call X("luaRepeat", s:purple, "", "") 347 | call X("luaCondStart", s:purple, "", "") 348 | call X("luaCondElseif", s:purple, "", "") 349 | call X("luaCond", s:purple, "", "") 350 | call X("luaCondEnd", s:purple, "", "") 351 | 352 | " Cucumber Highlighting 353 | call X("cucumberGiven", s:blue, "", "") 354 | call X("cucumberGivenAnd", s:blue, "", "") 355 | 356 | " Go Highlighting 357 | call X("goDirective", s:purple, "", "") 358 | call X("goDeclaration", s:purple, "", "") 359 | call X("goStatement", s:purple, "", "") 360 | call X("goConditional", s:purple, "", "") 361 | call X("goConstants", s:orange, "", "") 362 | call X("goTodo", s:yellow, "", "") 363 | call X("goDeclType", s:blue, "", "") 364 | call X("goBuiltins", s:purple, "", "") 365 | 366 | " Delete Functions 367 | delf X 368 | delf rgb 369 | delf colour 370 | delf rgb_colour 371 | delf rgb_level 372 | delf rgb_number 373 | delf grey_colour 374 | delf grey_level 375 | delf grey_number 376 | endif 377 | 378 | set background=dark 379 | -------------------------------------------------------------------------------- /nvim/colors/Tomorrow-Night.vim: -------------------------------------------------------------------------------- 1 | " Tomorrow Night - Full Colour and 256 Colour 2 | " http://chriskempson.com 3 | " 4 | " Hex colour conversion functions borrowed from the theme "Desert256"" 5 | 6 | " Default GUI Colours 7 | let s:foreground = "c5c8c6" 8 | let s:background = "1d1f21" 9 | let s:selection = "373b41" 10 | let s:line = "282a2e" 11 | let s:comment = "969896" 12 | let s:red = "cc6666" 13 | let s:orange = "de935f" 14 | let s:yellow = "f0c674" 15 | let s:green = "b5bd68" 16 | let s:aqua = "8abeb7" 17 | let s:blue = "81a2be" 18 | let s:purple = "b294bb" 19 | let s:window = "4d5057" 20 | 21 | " Console 256 Colours 22 | if !has("gui_running") 23 | let s:background = "303030" 24 | let s:window = "5e5e5e" 25 | let s:line = "3a3a3a" 26 | let s:selection = "585858" 27 | end 28 | 29 | hi clear 30 | syntax reset 31 | 32 | let g:colors_name = "Tomorrow-Night" 33 | 34 | if has("gui_running") || &t_Co == 88 || &t_Co == 256 35 | " Returns an approximate grey index for the given grey level 36 | fun grey_number(x) 37 | if &t_Co == 88 38 | if a:x < 23 39 | return 0 40 | elseif a:x < 69 41 | return 1 42 | elseif a:x < 103 43 | return 2 44 | elseif a:x < 127 45 | return 3 46 | elseif a:x < 150 47 | return 4 48 | elseif a:x < 173 49 | return 5 50 | elseif a:x < 196 51 | return 6 52 | elseif a:x < 219 53 | return 7 54 | elseif a:x < 243 55 | return 8 56 | else 57 | return 9 58 | endif 59 | else 60 | if a:x < 14 61 | return 0 62 | else 63 | let l:n = (a:x - 8) / 10 64 | let l:m = (a:x - 8) % 10 65 | if l:m < 5 66 | return l:n 67 | else 68 | return l:n + 1 69 | endif 70 | endif 71 | endif 72 | endfun 73 | 74 | " Returns the actual grey level represented by the grey index 75 | fun grey_level(n) 76 | if &t_Co == 88 77 | if a:n == 0 78 | return 0 79 | elseif a:n == 1 80 | return 46 81 | elseif a:n == 2 82 | return 92 83 | elseif a:n == 3 84 | return 115 85 | elseif a:n == 4 86 | return 139 87 | elseif a:n == 5 88 | return 162 89 | elseif a:n == 6 90 | return 185 91 | elseif a:n == 7 92 | return 208 93 | elseif a:n == 8 94 | return 231 95 | else 96 | return 255 97 | endif 98 | else 99 | if a:n == 0 100 | return 0 101 | else 102 | return 8 + (a:n * 10) 103 | endif 104 | endif 105 | endfun 106 | 107 | " Returns the palette index for the given grey index 108 | fun grey_colour(n) 109 | if &t_Co == 88 110 | if a:n == 0 111 | return 16 112 | elseif a:n == 9 113 | return 79 114 | else 115 | return 79 + a:n 116 | endif 117 | else 118 | if a:n == 0 119 | return 16 120 | elseif a:n == 25 121 | return 231 122 | else 123 | return 231 + a:n 124 | endif 125 | endif 126 | endfun 127 | 128 | " Returns an approximate colour index for the given colour level 129 | fun rgb_number(x) 130 | if &t_Co == 88 131 | if a:x < 69 132 | return 0 133 | elseif a:x < 172 134 | return 1 135 | elseif a:x < 230 136 | return 2 137 | else 138 | return 3 139 | endif 140 | else 141 | if a:x < 75 142 | return 0 143 | else 144 | let l:n = (a:x - 55) / 40 145 | let l:m = (a:x - 55) % 40 146 | if l:m < 20 147 | return l:n 148 | else 149 | return l:n + 1 150 | endif 151 | endif 152 | endif 153 | endfun 154 | 155 | " Returns the actual colour level for the given colour index 156 | fun rgb_level(n) 157 | if &t_Co == 88 158 | if a:n == 0 159 | return 0 160 | elseif a:n == 1 161 | return 139 162 | elseif a:n == 2 163 | return 205 164 | else 165 | return 255 166 | endif 167 | else 168 | if a:n == 0 169 | return 0 170 | else 171 | return 55 + (a:n * 40) 172 | endif 173 | endif 174 | endfun 175 | 176 | " Returns the palette index for the given R/G/B colour indices 177 | fun rgb_colour(x, y, z) 178 | if &t_Co == 88 179 | return 16 + (a:x * 16) + (a:y * 4) + a:z 180 | else 181 | return 16 + (a:x * 36) + (a:y * 6) + a:z 182 | endif 183 | endfun 184 | 185 | " Returns the palette index to approximate the given R/G/B colour levels 186 | fun colour(r, g, b) 187 | " Get the closest grey 188 | let l:gx = grey_number(a:r) 189 | let l:gy = grey_number(a:g) 190 | let l:gz = grey_number(a:b) 191 | 192 | " Get the closest colour 193 | let l:x = rgb_number(a:r) 194 | let l:y = rgb_number(a:g) 195 | let l:z = rgb_number(a:b) 196 | 197 | if l:gx == l:gy && l:gy == l:gz 198 | " There are two possibilities 199 | let l:dgr = grey_level(l:gx) - a:r 200 | let l:dgg = grey_level(l:gy) - a:g 201 | let l:dgb = grey_level(l:gz) - a:b 202 | let l:dgrey = (l:dgr * l:dgr) + (l:dgg * l:dgg) + (l:dgb * l:dgb) 203 | let l:dr = rgb_level(l:gx) - a:r 204 | let l:dg = rgb_level(l:gy) - a:g 205 | let l:db = rgb_level(l:gz) - a:b 206 | let l:drgb = (l:dr * l:dr) + (l:dg * l:dg) + (l:db * l:db) 207 | if l:dgrey < l:drgb 208 | " Use the grey 209 | return grey_colour(l:gx) 210 | else 211 | " Use the colour 212 | return rgb_colour(l:x, l:y, l:z) 213 | endif 214 | else 215 | " Only one possibility 216 | return rgb_colour(l:x, l:y, l:z) 217 | endif 218 | endfun 219 | 220 | " Returns the palette index to approximate the 'rrggbb' hex string 221 | fun rgb(rgb) 222 | let l:r = ("0x" . strpart(a:rgb, 0, 2)) + 0 223 | let l:g = ("0x" . strpart(a:rgb, 2, 2)) + 0 224 | let l:b = ("0x" . strpart(a:rgb, 4, 2)) + 0 225 | 226 | return colour(l:r, l:g, l:b) 227 | endfun 228 | 229 | " Sets the highlighting for the given group 230 | fun X(group, fg, bg, attr) 231 | if a:fg != "" 232 | exec "hi " . a:group . " guifg=#" . a:fg . " ctermfg=" . rgb(a:fg) 233 | endif 234 | if a:bg != "" 235 | exec "hi " . a:group . " guibg=#" . a:bg . " ctermbg=" . rgb(a:bg) 236 | endif 237 | if a:attr != "" 238 | exec "hi " . a:group . " gui=" . a:attr . " cterm=" . a:attr 239 | endif 240 | endfun 241 | 242 | " Vim Highlighting 243 | call X("Normal", s:foreground, s:background, "") 244 | call X("LineNr", s:selection, "", "") 245 | call X("NonText", s:selection, "", "") 246 | call X("SpecialKey", s:selection, "", "") 247 | call X("Search", s:background, s:yellow, "") 248 | call X("TabLine", s:window, s:foreground, "reverse") 249 | call X("TabLineFill", s:window, s:foreground, "reverse") 250 | call X("StatusLine", s:window, s:yellow, "reverse") 251 | call X("StatusLineNC", s:window, s:foreground, "reverse") 252 | call X("VertSplit", s:window, s:window, "none") 253 | call X("Visual", "", s:selection, "") 254 | call X("Directory", s:blue, "", "") 255 | call X("ModeMsg", s:green, "", "") 256 | call X("MoreMsg", s:green, "", "") 257 | call X("Question", s:green, "", "") 258 | call X("WarningMsg", s:red, "", "") 259 | call X("MatchParen", "", s:selection, "") 260 | call X("Folded", s:comment, s:background, "") 261 | call X("FoldColumn", "", s:background, "") 262 | if version >= 700 263 | call X("CursorLine", "", s:line, "none") 264 | call X("CursorColumn", "", s:line, "none") 265 | call X("PMenu", s:foreground, s:selection, "none") 266 | call X("PMenuSel", s:foreground, s:selection, "reverse") 267 | call X("SignColumn", "", s:background, "none") 268 | end 269 | if version >= 703 270 | call X("ColorColumn", "", s:line, "none") 271 | end 272 | 273 | " Standard Highlighting 274 | call X("Comment", s:comment, "", "") 275 | call X("Todo", s:comment, s:background, "") 276 | call X("Title", s:comment, "", "") 277 | call X("Identifier", s:red, "", "none") 278 | call X("Statement", s:foreground, "", "") 279 | call X("Conditional", s:foreground, "", "") 280 | call X("Repeat", s:foreground, "", "") 281 | call X("Structure", s:purple, "", "") 282 | call X("Function", s:blue, "", "") 283 | call X("Constant", s:orange, "", "") 284 | call X("String", s:green, "", "") 285 | call X("Special", s:foreground, "", "") 286 | call X("PreProc", s:purple, "", "") 287 | call X("Operator", s:aqua, "", "none") 288 | call X("Type", s:blue, "", "none") 289 | call X("Define", s:purple, "", "none") 290 | call X("Include", s:blue, "", "") 291 | "call X("Ignore", "666666", "", "") 292 | 293 | " Vim Highlighting 294 | call X("vimCommand", s:red, "", "none") 295 | 296 | " C Highlighting 297 | call X("cType", s:yellow, "", "") 298 | call X("cStorageClass", s:purple, "", "") 299 | call X("cConditional", s:purple, "", "") 300 | call X("cRepeat", s:purple, "", "") 301 | 302 | " PHP Highlighting 303 | call X("phpVarSelector", s:red, "", "") 304 | call X("phpKeyword", s:purple, "", "") 305 | call X("phpRepeat", s:purple, "", "") 306 | call X("phpConditional", s:purple, "", "") 307 | call X("phpStatement", s:purple, "", "") 308 | call X("phpMemberSelector", s:foreground, "", "") 309 | 310 | " Ruby Highlighting 311 | call X("rubySymbol", s:green, "", "") 312 | call X("rubyConstant", s:yellow, "", "") 313 | call X("rubyAccess", s:yellow, "", "") 314 | call X("rubyAttribute", s:blue, "", "") 315 | call X("rubyInclude", s:blue, "", "") 316 | call X("rubyLocalVariableOrMethod", s:orange, "", "") 317 | call X("rubyCurlyBlock", s:orange, "", "") 318 | call X("rubyStringDelimiter", s:green, "", "") 319 | call X("rubyInterpolationDelimiter", s:orange, "", "") 320 | call X("rubyConditional", s:purple, "", "") 321 | call X("rubyRepeat", s:purple, "", "") 322 | call X("rubyControl", s:purple, "", "") 323 | call X("rubyException", s:purple, "", "") 324 | 325 | " Python Highlighting 326 | call X("pythonInclude", s:purple, "", "") 327 | call X("pythonStatement", s:purple, "", "") 328 | call X("pythonConditional", s:purple, "", "") 329 | call X("pythonRepeat", s:purple, "", "") 330 | call X("pythonException", s:purple, "", "") 331 | call X("pythonFunction", s:blue, "", "") 332 | call X("pythonPreCondit", s:purple, "", "") 333 | call X("pythonRepeat", s:aqua, "", "") 334 | call X("pythonExClass", s:orange, "", "") 335 | 336 | " JavaScript Highlighting 337 | call X("javaScriptBraces", s:foreground, "", "") 338 | call X("javaScriptFunction", s:purple, "", "") 339 | call X("javaScriptConditional", s:purple, "", "") 340 | call X("javaScriptRepeat", s:purple, "", "") 341 | call X("javaScriptNumber", s:orange, "", "") 342 | call X("javaScriptMember", s:orange, "", "") 343 | 344 | " HTML Highlighting 345 | call X("htmlTag", s:red, "", "") 346 | call X("htmlTagName", s:red, "", "") 347 | call X("htmlArg", s:red, "", "") 348 | call X("htmlScriptTag", s:red, "", "") 349 | 350 | " Diff Highlighting 351 | call X("diffAdded", s:green, "", "") 352 | call X("diffRemoved", s:red, "", "") 353 | 354 | " ShowMarks Highlighting 355 | call X("ShowMarksHLl", s:orange, s:background, "none") 356 | call X("ShowMarksHLo", s:purple, s:background, "none") 357 | call X("ShowMarksHLu", s:yellow, s:background, "none") 358 | call X("ShowMarksHLm", s:aqua, s:background, "none") 359 | 360 | " Cucumber Highlighting 361 | call X("cucumberGiven", s:blue, "", "") 362 | call X("cucumberGivenAnd", s:blue, "", "") 363 | 364 | " Go Highlighting 365 | call X("goDirective", s:purple, "", "") 366 | call X("goDeclaration", s:purple, "", "") 367 | call X("goStatement", s:purple, "", "") 368 | call X("goConditional", s:purple, "", "") 369 | call X("goConstants", s:orange, "", "") 370 | call X("goTodo", s:yellow, "", "") 371 | call X("goDeclType", s:blue, "", "") 372 | call X("goBuiltins", s:purple, "", "") 373 | 374 | " Lua Highlighting 375 | call X("luaStatement", s:purple, "", "") 376 | call X("luaRepeat", s:purple, "", "") 377 | call X("luaCondStart", s:purple, "", "") 378 | call X("luaCondElseif", s:purple, "", "") 379 | call X("luaCond", s:purple, "", "") 380 | call X("luaCondEnd", s:purple, "", "") 381 | 382 | " Delete Functions 383 | delf X 384 | delf rgb 385 | delf colour 386 | delf rgb_colour 387 | delf rgb_level 388 | delf rgb_number 389 | delf grey_colour 390 | delf grey_level 391 | delf grey_number 392 | endif 393 | 394 | set background=dark 395 | -------------------------------------------------------------------------------- /nvim/plugin_config.vim: -------------------------------------------------------------------------------- 1 | """""""""""""""""""""" 2 | "Numbers vim toggle 3 | nnoremap :NumbersToggle 4 | 5 | let g:deoplete#enable_at_startup = 1 6 | 7 | "Necomplete + Neo snippets key-mappings. 8 | " 9 | let g:neosnippet#snippets_directory='~/.vim/bundle/vim-snippets/snippets' 10 | let g:neosnippet#enable_snipmate_compatibility = 1 11 | 12 | " SuperTab like snippets behavior. 13 | imap neosnippet#expandable_or_jumpable() ? 14 | \ "\(neosnippet_expand_or_jump)" 15 | \: pumvisible() ? "\" : "\" 16 | smap neosnippet#expandable_or_jumpable() ? 17 | \ "\(neosnippet_expand_or_jump)" 18 | \: "\" 19 | 20 | if has('conceal') 21 | set conceallevel=2 concealcursor=i 22 | 23 | endif 24 | vnoremap a :EasyAlign 25 | nmap ga (EasyAlign) 26 | nmap e gaip 27 | 28 | let g:syntastic_javascript_checkers = ['eslint'] 29 | "Fugitive related key mappings 30 | nnoremap gs :Gstatus 31 | nnoremap ga :Git add -A 32 | nnoremap gd :Gdiff 33 | nnoremap go :Gread 34 | nnoremap gr :Git rebase -i HEAD~ 35 | nnoremap gc :Gcommit 36 | nnoremap gb :Gblame 37 | nnoremap gp :Gpush 38 | nnoremap gP :Gpull 39 | nnoremap gi :exe "Git " input("enter a git command : ") 40 | nnoremap gm :Gmerge 41 | nnoremap gw :Gwrite 42 | autocmd FileType gitcommit nmap U :Git checkout -- 43 | autocmd BufReadPost fugitive://* set bufhidden=delete 44 | 45 | "For gitv plugin 46 | nnoremap gl :Gitv 47 | "this setting would show the history of a file, really nice to see how your 48 | "file transforms" 49 | nnoremap gv :Gitv! 50 | 51 | "Enunch 52 | nmap u [eunuch] 53 | nnoremap [eunuch] 54 | 55 | nnoremap [eunuch]u :Unlink 56 | nnoremap [eunuch]r :Remove 57 | nnoremap [eunuch]d :Mkdir 58 | nnoremap [eunuch]m :Move 59 | "change the name 60 | nnoremap [eunuch]c :Rename 61 | nnoremap [eunuch]w :Wall 62 | " wall writes all files 63 | 64 | nnoremap [eunuch]s :SudoWrite 65 | nnoremap [eunuch]e :SudoEdit 66 | nnoremap [eunuch]h :Chmod 67 | nnoremap [eunuch]f :Find 68 | nnoremap [eunuch]l :Locate 69 | 70 | "Rails vim 71 | nnoremap rf :find 72 | nnoremap rr :e config/routes.rb 73 | nnoremap rq :Etask 74 | nnoremap rv :Rview 75 | nnoremap rl :Elayout 76 | nnoremap rj :Ejavascript 77 | nnoremap ro :Eserializer 78 | nnoremap ru :Espec serializers/ 79 | nnoremap re :Eenvironment 80 | nnoremap rt :Espec 81 | nnoremap rf :Efixtures 82 | nnoremap rhh :Eschema 83 | nnoremap rhe :Eschema 84 | nnoremap rs :Estylesheet 85 | nnoremap rc :Econtroller 86 | nnoremap rp :Epreview 87 | nnoremap rn :Emailer 88 | nnoremap ri :Einitializer 89 | nnoremap rx :Echannel 90 | 91 | nnoremap a :A 92 | nnoremap av :AV 93 | nnoremap r :R 94 | nnoremap rv :RV 95 | 96 | "Rake 97 | nnoremap rkk :Rake 98 | nnoremap rkm :Rake db:migrate 99 | nnoremap rkr :Rake db:rollback 100 | nnoremap rkd :Rake db:drop 101 | 102 | "Rails generate vim 103 | nnoremap rg :Rgenerate 104 | nnoremap rgc :Rgenerate controller 105 | nnoremap rgm :Rgenerate model 106 | nnoremap rgd :Rgenerate migration 107 | nnoremap rgr :Rgenerate resource 108 | nnoremap rgs :Rgenerate scaffold 109 | nnoremap rgt :Rgenerate task 110 | nnoremap rgl :Rgenerate mailer 111 | "Destroy 112 | nnoremap rdc :Rdestroy controller 113 | nnoremap rdm :Rdestroy model 114 | nnoremap rdd :Rdestroy migration 115 | nnoremap rdr :Rdestroy resource 116 | nnoremap rdt :Rdestroy task 117 | 118 | nnoremap rm :Emodel 119 | 120 | let g:rails_projections = { 121 | \ "spec/mailers/previews/*_preview.rb": { 122 | \ "command": "preview", 123 | \ "alternate": "app/mailers/%s.rb", 124 | \ "template": "class %SPreview < ActionMailer::Preview\nend" 125 | \ }, 126 | \ 127 | \ "app/serializers/*_serializer.rb": { 128 | \ "command": "serializer", 129 | \ "affinity": "model", 130 | \ "test": "spec/serializers/%s_spec.rb", 131 | \ "related": "app/models/%s.rb", 132 | \ "template": "class %SSerializer < ActiveModel::Serializer\nend" 133 | \ } 134 | \ } 135 | 136 | " Projections for simple ruby project 137 | let g:projectionist_heuristics = { 138 | \ "lib|spec": { 139 | \ "lib/*.rb": { 140 | \ "type": "lib", 141 | \ "alternate": "spec/{}_spec.rb" 142 | \ }}} 143 | 144 | " Ember projections using ember-cli 145 | let g:projectionist_heuristics = { 146 | \ "Brocfile.js": { 147 | \ "tests/acceptance/*.js": { 148 | \ "type": "lib", 149 | \ "alternate": "test/{}_test.exs" 150 | \ } 151 | \ } 152 | \ } 153 | nnoremap eu :e app/router.js 154 | 155 | "Common key strokes for ruby, elixi proj 156 | nnoremap el :Elib 157 | nnoremap eq :Etest 158 | 159 | "Common keystrokes for ember-cli, phoenix 160 | nnoremap eea :Eacceptance 161 | nnoremap eeu :Eunit 162 | nnoremap em :Emodel 163 | nnoremap ec :Ecomponent 164 | nnoremap ea :Econtroller 165 | nnoremap es :Estylesheet 166 | nnoremap ev :Eview 167 | nnoremap er :Eroute 168 | nnoremap et :Etemplate 169 | 170 | "phoenix projections 171 | nnoremap per :e web/router.ex 172 | 173 | " Projections for elixir project 174 | let g:projectionist_heuristics = { 175 | \ "mix.exs": { 176 | \ "lib/*.ex": { 177 | \ "type": "lib", 178 | \ "alternate": "test/{}_test.exs", 179 | \ "template": "defmodule {camelcase|capitalize|dot} do\nend" 180 | \ }, 181 | \ "test/*_test.exs": { 182 | \ "type": "test", 183 | \ "alternate": "lib/{}.ex", 184 | \ "template": "defmodule {camelcase|capitalize|dot}Test do\n use ExUnit.Case\nend" 185 | \ } 186 | \ } 187 | \ } 188 | nnoremap mx :e mix.exs 189 | "Neomake 190 | let g:neomake_javascript_enabled_makers = ['jscs'] 191 | autocmd! BufWritePost * Neomake 192 | 193 | nnoremap n :Neomake 194 | " to see the output of the quick fix window 195 | nnoremap co :copen 196 | 197 | let test#strategy = "dispatch" 198 | nmap dd :TestNearest 199 | nmap df :TestFile 200 | nmap da :TestSuite 201 | nmap dl :TestLast 202 | nmap dv :TestVisit 203 | 204 | "Vim signify" 205 | nmap gj (signify-next-hunk) 206 | nmap gk (signify-prev-hunk) 207 | 208 | "emmet zencoding 209 | let g:user_emmet_settings = { 210 | \ 'php' : { 211 | \ 'extends' : 'html', 212 | \ 'filters' : 'c', 213 | \ }, 214 | \ 'xml' : { 215 | \ 'extends' : 'html', 216 | \ }, 217 | \ 'haml' : { 218 | \ 'extends' : 'html', 219 | \ }, 220 | \ 'eruby' : { 221 | \ 'extends' : 'html', 222 | \ }, 223 | \} 224 | 225 | 226 | nnoremap np :Nyancat 227 | 228 | "Matchit ftw 229 | runtime! macros/matchit.vim 230 | au Filetype css,javascript 231 | \ let b:match_words = &matchpairs 232 | 233 | 234 | "Startify related settings" 235 | nnoremap s :Startify 236 | let g:startify_files_number = 8 237 | let g:startify_session_persistence = 1 238 | let g:startify_session_autoload = 1 239 | let g:startify_enable_special = 0 240 | let g:startify_files_number = 5 241 | let g:startify_change_to_dir = 0 242 | 243 | 244 | let g:startify_skiplist = [ 245 | \ 'COMMIT_EDITMSG', 246 | \ $VIMRUNTIME .'/doc', 247 | \ 'bundle/.*/doc', 248 | \ ] 249 | 250 | let g:startify_bookmarks = [ 251 | \ '~/dotfiles/vim/vimrc', 252 | \ ] 253 | 254 | hi StartifyBracket ctermfg=240 255 | hi StartifyNumber ctermfg=215 256 | hi StartifyPath ctermfg=245 257 | hi StartifySlash ctermfg=240 258 | hi StartifySpecial ctermfg=240 259 | hi StartifyHeader ctermfg=114 260 | hi StartifyFooter ctermfg=240 261 | hi StartifyFile ctermfg=111 262 | 263 | let g:airline#extensions#tabline#enabled = 1 264 | 265 | set noshowmode 266 | set noruler 267 | set laststatus=0 268 | set noshowcmd 269 | nnoremap z :Goyo 270 | let g:goyo_width = 115 271 | function! s:goyo_enter() 272 | silent !tmux set status off 273 | set noshowmode 274 | set noshowcmd 275 | set scrolloff=999 276 | Limelight 277 | " ... 278 | endfunction 279 | 280 | function! s:goyo_leave() 281 | silent !tmux set status on 282 | set showmode 283 | set showcmd 284 | set scrolloff=5 285 | Limelight! 286 | " ... 287 | endfunction 288 | 289 | autocmd! User GoyoEnter 290 | autocmd! User GoyoLeave 291 | autocmd User GoyoEnter nested call goyo_enter() 292 | autocmd User GoyoLeave nested call goyo_leave() 293 | "let g:github_access_token = "" 294 | 295 | " wildfire 296 | map w (wildfire-fuel) 297 | map m (wildfire-water) 298 | let g:wildfire_objects = { 299 | \ "*" : ["i'", 'i"', "i)", "i]", "i}"] 300 | \ } 301 | 302 | cal wildfire#triggers#Add("", { 303 | \ "html,xml,erb,hbs" : ["at", "it"], 304 | \ }) 305 | 306 | 307 | ""Osyo-manga" 308 | "OverCommandLine plugin 309 | " 310 | function! VisualFindAndReplace(param) 311 | :exe "OverCommandLine ". a:param 312 | :w 313 | endfunction 314 | function! VisualFindAndReplaceWithSelection(param) range 315 | :exe "'<,'>OverCommandLine ". a:param 316 | :w 317 | endfunction 318 | nnoremap s :call VisualFindAndReplace('%s/') 319 | xnoremap s :call VisualFindAndReplaceWithSelection('s/') 320 | nnoremap S :call VisualFindAndReplace('%S/') 321 | xnoremap S :call VisualFindAndReplaceWithSelection('S/') 322 | "search and replace word under cursor 323 | nnoremap sw :call VisualFindAndReplace('%S//') 324 | xnoremap sw :call VisualFindAndReplaceWithSelection('S//') 325 | 326 | "incsearch.vim 327 | let g:incsearch#auto_nohlsearch = 1 328 | map / (incsearch-forward) 329 | map ? (incsearch-backward) 330 | map g/ (incsearch-stay) 331 | map n (incsearch-nohl-n) 332 | map N (incsearch-nohl-N) 333 | map * (incsearch-nohl-*) 334 | map # (incsearch-nohl-#) 335 | map g* (incsearch-nohl-g*) 336 | map g# (incsearch-nohl-g#) 337 | 338 | "nnoremap / /\v 339 | "vnoremap / /\v 340 | "anzu 341 | " mapping 342 | nmap n (anzu-n-with-echo) 343 | nmap N (anzu-N-with-echo) 344 | nmap * (anzu-star-with-echo) 345 | nmap # (anzu-sharp-with-echo) 346 | " clear status 347 | nmap (anzu-clear-search-status) 348 | " statusline 349 | 350 | nnoremap :tabe %:p:h 351 | "Fzf 352 | let $FZF_DEFAULT_COMMAND = 'ag -l -g ""' 353 | nnoremap :FZF! 354 | nnoremap g :GitFiles! 355 | nnoremap f :Files 356 | nnoremap b :Buffers! 357 | nnoremap ag :Ag! 358 | nnoremap m :History! 359 | nnoremap ; :Marks 360 | " mru 361 | nnoremap h :History/ 362 | nnoremap / :Lines! 363 | 364 | nnoremap c :Commits! 365 | nnoremap l :BCommits! 366 | nnoremap t :BTags 367 | 368 | function! s:fzf_statusline() 369 | " Override statusline as you like 370 | highlight fzf1 ctermfg=161 ctermbg=251 371 | highlight fzf2 ctermfg=23 ctermbg=251 372 | highlight fzf3 ctermfg=237 ctermbg=251 373 | setlocal statusline=%#fzf1#\ >\ %#fzf2#fz%#fzf3#f 374 | endfunction 375 | 376 | autocmd! User FzfStatusLine call fzf_statusline() 377 | let g:jsx_ext_required = 0 378 | 379 | augroup elixir 380 | nnoremap K :call Exdoc() 381 | 382 | function! s:Opendoc(query) 383 | silent! execute 'botright new' 384 | call termopen('elixir -pa "_build/**/**/ebin" -e "require IEx.Helpers; IEx.Helpers.h '.a:query.'"') 385 | execute 'nnoremap q :bd!' 386 | endfunction 387 | command! -nargs=1 ExDoc call s:Opendoc() 388 | nnoremap de :ExDoc 389 | autocmd! 390 | " bits stolen from alchemist-vim and slightly modified 391 | function! Exdoc(...) 392 | let query = '' 393 | if empty(a:000) 394 | let query = Lookup_name_under_cursor() 395 | else 396 | let query = a:000[0] 397 | endif 398 | silent! execute 'botright new' 399 | call termopen('elixir -pa "_build/**/**/ebin" -e "require IEx.Helpers; IEx.Helpers.h '.query.'"') 400 | execute 'nnoremap q :bd!' 401 | endfunction 402 | 403 | function! Lookup_name_under_cursor() 404 | let module_func_match = '[A-Za-z0-9\._?!]\+' 405 | let before_cursor = strpart(getline('.'), 0, col('.')) 406 | let after_cursor = strpart(getline('.'), col('.')) 407 | let elixir_erlang_module_func_match = ':\?' . module_func_match 408 | let before_match = matchlist(before_cursor, elixir_erlang_module_func_match . '$') 409 | let after_match = matchlist(after_cursor, '^' . module_func_match) 410 | let query = '' 411 | let before = '' 412 | if len(before_match) > 0 413 | let before = before_match[0] 414 | endif 415 | let after = '' 416 | if len(after_match) > 0 417 | let after = after_match[0] 418 | endif 419 | if before =~ '\.$' 420 | "case before = List.Chars. after = to_char_list 421 | let query = substitute(before, '[.]$', '', '') 422 | elseif after =~ '^\.' 423 | "case before = List.Chars after = .to_char_list 424 | let query = before 425 | elseif after =~ '.*\.' 426 | "case before = OptionParse after = r.parse 427 | "case before = Mix.Shel after = l.IO.cmd 428 | let up_to_dot = matchlist(after, '\([A-Za-z0-9_]\+\)\.') 429 | let query = before . up_to_dot[1] 430 | else 431 | let query = before . after 432 | endif 433 | return query 434 | endfunction 435 | augroup END 436 | -------------------------------------------------------------------------------- /nvim/colors/jellybeans.vim: -------------------------------------------------------------------------------- 1 | " Vim color file 2 | " 3 | " " __ _ _ _ " 4 | " " \ \ ___| | |_ _| |__ ___ __ _ _ __ ___ " 5 | " " \ \/ _ \ | | | | | _ \ / _ \/ _ | _ \/ __| " 6 | " " /\_/ / __/ | | |_| | |_| | __/ |_| | | | \__ \ " 7 | " " \___/ \___|_|_|\__ |____/ \___|\____|_| |_|___/ " 8 | " " \___/ " 9 | " 10 | " "A colorful, dark color scheme for Vim." 11 | " 12 | " File: jellybeans.vim 13 | " URL: github.com/nanotech/jellybeans.vim 14 | " Scripts URL: vim.org/scripts/script.php?script_id=2555 15 | " Maintainer: NanoTech (nanotech.nanotechcorp.net) 16 | " Version: 1.6~git 17 | " Last Change: January 15th, 2012 18 | " License: MIT 19 | " Contributors: Daniel Herbert (pocketninja) 20 | " Henry So, Jr. 21 | " David Liang 22 | " Rich Healey (richo) 23 | " Andrew Wong (w0ng) 24 | " 25 | " Copyright (c) 2009-2012 NanoTech 26 | " 27 | " Permission is hereby granted, free of charge, to any per‐ 28 | " son obtaining a copy of this software and associated doc‐ 29 | " umentation files (the “Software”), to deal in the Soft‐ 30 | " ware without restriction, including without limitation 31 | " the rights to use, copy, modify, merge, publish, distrib‐ 32 | " ute, sublicense, and/or sell copies of the Software, and 33 | " to permit persons to whom the Software is furnished to do 34 | " so, subject to the following conditions: 35 | " 36 | " The above copyright notice and this permission notice 37 | " shall be included in all copies or substantial portions 38 | " of the Software. 39 | " 40 | " THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY 41 | " KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO 42 | " THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICU‐ 43 | " LAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 44 | " AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 45 | " DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CON‐ 46 | " TRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CON‐ 47 | " NECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 48 | " THE SOFTWARE. 49 | 50 | set background=dark 51 | 52 | hi clear 53 | 54 | if exists("syntax_on") 55 | syntax reset 56 | endif 57 | 58 | let colors_name = "jellybeans" 59 | 60 | if has("gui_running") || &t_Co == 88 || &t_Co == 256 61 | let s:low_color = 0 62 | else 63 | let s:low_color = 1 64 | endif 65 | 66 | " Color approximation functions by Henry So, Jr. and David Liang {{{ 67 | " Added to jellybeans.vim by Daniel Herbert 68 | 69 | " returns an approximate grey index for the given grey level 70 | fun! s:grey_number(x) 71 | if &t_Co == 88 72 | if a:x < 23 73 | return 0 74 | elseif a:x < 69 75 | return 1 76 | elseif a:x < 103 77 | return 2 78 | elseif a:x < 127 79 | return 3 80 | elseif a:x < 150 81 | return 4 82 | elseif a:x < 173 83 | return 5 84 | elseif a:x < 196 85 | return 6 86 | elseif a:x < 219 87 | return 7 88 | elseif a:x < 243 89 | return 8 90 | else 91 | return 9 92 | endif 93 | else 94 | if a:x < 14 95 | return 0 96 | else 97 | let l:n = (a:x - 8) / 10 98 | let l:m = (a:x - 8) % 10 99 | if l:m < 5 100 | return l:n 101 | else 102 | return l:n + 1 103 | endif 104 | endif 105 | endif 106 | endfun 107 | 108 | " returns the actual grey level represented by the grey index 109 | fun! s:grey_level(n) 110 | if &t_Co == 88 111 | if a:n == 0 112 | return 0 113 | elseif a:n == 1 114 | return 46 115 | elseif a:n == 2 116 | return 92 117 | elseif a:n == 3 118 | return 115 119 | elseif a:n == 4 120 | return 139 121 | elseif a:n == 5 122 | return 162 123 | elseif a:n == 6 124 | return 185 125 | elseif a:n == 7 126 | return 208 127 | elseif a:n == 8 128 | return 231 129 | else 130 | return 255 131 | endif 132 | else 133 | if a:n == 0 134 | return 0 135 | else 136 | return 8 + (a:n * 10) 137 | endif 138 | endif 139 | endfun 140 | 141 | " returns the palette index for the given grey index 142 | fun! s:grey_color(n) 143 | if &t_Co == 88 144 | if a:n == 0 145 | return 16 146 | elseif a:n == 9 147 | return 79 148 | else 149 | return 79 + a:n 150 | endif 151 | else 152 | if a:n == 0 153 | return 16 154 | elseif a:n == 25 155 | return 231 156 | else 157 | return 231 + a:n 158 | endif 159 | endif 160 | endfun 161 | 162 | " returns an approximate color index for the given color level 163 | fun! s:rgb_number(x) 164 | if &t_Co == 88 165 | if a:x < 69 166 | return 0 167 | elseif a:x < 172 168 | return 1 169 | elseif a:x < 230 170 | return 2 171 | else 172 | return 3 173 | endif 174 | else 175 | if a:x < 75 176 | return 0 177 | else 178 | let l:n = (a:x - 55) / 40 179 | let l:m = (a:x - 55) % 40 180 | if l:m < 20 181 | return l:n 182 | else 183 | return l:n + 1 184 | endif 185 | endif 186 | endif 187 | endfun 188 | 189 | " returns the actual color level for the given color index 190 | fun! s:rgb_level(n) 191 | if &t_Co == 88 192 | if a:n == 0 193 | return 0 194 | elseif a:n == 1 195 | return 139 196 | elseif a:n == 2 197 | return 205 198 | else 199 | return 255 200 | endif 201 | else 202 | if a:n == 0 203 | return 0 204 | else 205 | return 55 + (a:n * 40) 206 | endif 207 | endif 208 | endfun 209 | 210 | " returns the palette index for the given R/G/B color indices 211 | fun! s:rgb_color(x, y, z) 212 | if &t_Co == 88 213 | return 16 + (a:x * 16) + (a:y * 4) + a:z 214 | else 215 | return 16 + (a:x * 36) + (a:y * 6) + a:z 216 | endif 217 | endfun 218 | 219 | " returns the palette index to approximate the given R/G/B color levels 220 | fun! s:color(r, g, b) 221 | " get the closest grey 222 | let l:gx = s:grey_number(a:r) 223 | let l:gy = s:grey_number(a:g) 224 | let l:gz = s:grey_number(a:b) 225 | 226 | " get the closest color 227 | let l:x = s:rgb_number(a:r) 228 | let l:y = s:rgb_number(a:g) 229 | let l:z = s:rgb_number(a:b) 230 | 231 | if l:gx == l:gy && l:gy == l:gz 232 | " there are two possibilities 233 | let l:dgr = s:grey_level(l:gx) - a:r 234 | let l:dgg = s:grey_level(l:gy) - a:g 235 | let l:dgb = s:grey_level(l:gz) - a:b 236 | let l:dgrey = (l:dgr * l:dgr) + (l:dgg * l:dgg) + (l:dgb * l:dgb) 237 | let l:dr = s:rgb_level(l:gx) - a:r 238 | let l:dg = s:rgb_level(l:gy) - a:g 239 | let l:db = s:rgb_level(l:gz) - a:b 240 | let l:drgb = (l:dr * l:dr) + (l:dg * l:dg) + (l:db * l:db) 241 | if l:dgrey < l:drgb 242 | " use the grey 243 | return s:grey_color(l:gx) 244 | else 245 | " use the color 246 | return s:rgb_color(l:x, l:y, l:z) 247 | endif 248 | else 249 | " only one possibility 250 | return s:rgb_color(l:x, l:y, l:z) 251 | endif 252 | endfun 253 | 254 | " returns the palette index to approximate the 'rrggbb' hex string 255 | fun! s:rgb(rgb) 256 | let l:r = ("0x" . strpart(a:rgb, 0, 2)) + 0 257 | let l:g = ("0x" . strpart(a:rgb, 2, 2)) + 0 258 | let l:b = ("0x" . strpart(a:rgb, 4, 2)) + 0 259 | return s:color(l:r, l:g, l:b) 260 | endfun 261 | 262 | " sets the highlighting for the given group 263 | fun! s:X(group, fg, bg, attr, lcfg, lcbg) 264 | if s:low_color 265 | let l:fge = empty(a:lcfg) 266 | let l:bge = empty(a:lcbg) 267 | 268 | if !l:fge && !l:bge 269 | exec "hi ".a:group." ctermfg=".a:lcfg." ctermbg=".a:lcbg 270 | elseif !l:fge && l:bge 271 | exec "hi ".a:group." ctermfg=".a:lcfg." ctermbg=NONE" 272 | elseif l:fge && !l:bge 273 | exec "hi ".a:group." ctermfg=NONE ctermbg=".a:lcbg 274 | endif 275 | else 276 | let l:fge = empty(a:fg) 277 | let l:bge = empty(a:bg) 278 | 279 | if !l:fge && !l:bge 280 | exec "hi ".a:group." guifg=#".a:fg." guibg=#".a:bg." ctermfg=".s:rgb(a:fg)." ctermbg=".s:rgb(a:bg) 281 | elseif !l:fge && l:bge 282 | exec "hi ".a:group." guifg=#".a:fg." guibg=NONE ctermfg=".s:rgb(a:fg)." ctermbg=NONE" 283 | elseif l:fge && !l:bge 284 | exec "hi ".a:group." guifg=NONE guibg=#".a:bg." ctermfg=NONE ctermbg=".s:rgb(a:bg) 285 | endif 286 | endif 287 | 288 | if a:attr == "" 289 | exec "hi ".a:group." gui=none cterm=none" 290 | else 291 | let l:noitalic = join(filter(split(a:attr, ","), "v:val !=? 'italic'"), ",") 292 | if empty(l:noitalic) 293 | let l:noitalic = "none" 294 | endif 295 | exec "hi ".a:group." gui=".a:attr." cterm=".l:noitalic 296 | endif 297 | endfun 298 | " }}} 299 | 300 | if !exists("g:jellybeans_background_color") 301 | let g:jellybeans_background_color = "151515" 302 | end 303 | 304 | call s:X("Normal","e8e8d3",g:jellybeans_background_color,"","White","") 305 | set background=dark 306 | 307 | if !exists("g:jellybeans_use_lowcolor_black") || g:jellybeans_use_lowcolor_black 308 | let s:termBlack = "Black" 309 | else 310 | let s:termBlack = "Grey" 311 | endif 312 | 313 | if version >= 700 314 | call s:X("CursorLine","","1c1c1c","","",s:termBlack) 315 | call s:X("CursorColumn","","1c1c1c","","",s:termBlack) 316 | call s:X("MatchParen","ffffff","556779","bold","","DarkCyan") 317 | 318 | call s:X("TabLine","000000","b0b8c0","italic","",s:termBlack) 319 | call s:X("TabLineFill","9098a0","","","",s:termBlack) 320 | call s:X("TabLineSel","000000","f0f0f0","italic,bold",s:termBlack,"White") 321 | 322 | " Auto-completion 323 | call s:X("Pmenu","ffffff","606060","","White",s:termBlack) 324 | call s:X("PmenuSel","101010","eeeeee","",s:termBlack,"White") 325 | endif 326 | 327 | call s:X("Visual","","404040","","",s:termBlack) 328 | call s:X("Cursor",g:jellybeans_background_color,"b0d0f0","","","") 329 | 330 | call s:X("LineNr","605958",g:jellybeans_background_color,"none",s:termBlack,"") 331 | call s:X("CursorLineNr","ccc5c4","","none","White","") 332 | call s:X("Comment","888888","","italic","Grey","") 333 | call s:X("Todo","c7c7c7","","bold","White",s:termBlack) 334 | 335 | call s:X("StatusLine","000000","dddddd","italic","","White") 336 | call s:X("StatusLineNC","ffffff","403c41","italic","White","Black") 337 | call s:X("VertSplit","777777","403c41","",s:termBlack,s:termBlack) 338 | call s:X("WildMenu","f0a0c0","302028","","Magenta","") 339 | 340 | call s:X("Folded","a0a8b0","384048","italic",s:termBlack,"") 341 | call s:X("FoldColumn","535D66","1f1f1f","","",s:termBlack) 342 | call s:X("SignColumn","777777","333333","","",s:termBlack) 343 | call s:X("ColorColumn","","000000","","",s:termBlack) 344 | 345 | call s:X("Title","70b950","","bold","Green","") 346 | 347 | call s:X("Constant","cf6a4c","","","Red","") 348 | call s:X("Special","799d6a","","","Green","") 349 | call s:X("Delimiter","668799","","","Grey","") 350 | 351 | call s:X("String","99ad6a","","","Green","") 352 | call s:X("StringDelimiter","556633","","","DarkGreen","") 353 | 354 | call s:X("Identifier","c6b6ee","","","LightCyan","") 355 | call s:X("Structure","8fbfdc","","","LightCyan","") 356 | call s:X("Function","fad07a","","","Yellow","") 357 | call s:X("Statement","8197bf","","","DarkBlue","") 358 | call s:X("PreProc","8fbfdc","","","LightBlue","") 359 | 360 | hi! link Operator Structure 361 | 362 | call s:X("Type","ffb964","","","Yellow","") 363 | call s:X("NonText","606060",g:jellybeans_background_color,"",s:termBlack,"") 364 | 365 | call s:X("SpecialKey","444444","1c1c1c","",s:termBlack,"") 366 | 367 | call s:X("Search","f0a0c0","302028","underline","Magenta","") 368 | 369 | call s:X("Directory","dad085","","","Yellow","") 370 | call s:X("ErrorMsg","","902020","","","DarkRed") 371 | hi! link Error ErrorMsg 372 | hi! link MoreMsg Special 373 | call s:X("Question","65C254","","","Green","") 374 | 375 | 376 | " Spell Checking 377 | 378 | call s:X("SpellBad","","902020","underline","","DarkRed") 379 | call s:X("SpellCap","","0000df","underline","","Blue") 380 | call s:X("SpellRare","","540063","underline","","DarkMagenta") 381 | call s:X("SpellLocal","","2D7067","underline","","Green") 382 | 383 | " Diff 384 | 385 | hi! link diffRemoved Constant 386 | hi! link diffAdded String 387 | 388 | " VimDiff 389 | 390 | call s:X("DiffAdd","D2EBBE","437019","","White","DarkGreen") 391 | call s:X("DiffDelete","40000A","700009","","DarkRed","DarkRed") 392 | call s:X("DiffChange","","2B5B77","","White","DarkBlue") 393 | call s:X("DiffText","8fbfdc","000000","reverse","Yellow","") 394 | 395 | " PHP 396 | 397 | hi! link phpFunctions Function 398 | call s:X("StorageClass","c59f6f","","","Red","") 399 | hi! link phpSuperglobal Identifier 400 | hi! link phpQuoteSingle StringDelimiter 401 | hi! link phpQuoteDouble StringDelimiter 402 | hi! link phpBoolean Constant 403 | hi! link phpNull Constant 404 | hi! link phpArrayPair Operator 405 | hi! link phpOperator Normal 406 | hi! link phpRelation Normal 407 | hi! link phpVarSelector Identifier 408 | 409 | " Python 410 | 411 | hi! link pythonOperator Statement 412 | 413 | " Ruby 414 | 415 | hi! link rubySharpBang Comment 416 | call s:X("rubyClass","447799","","","DarkBlue","") 417 | call s:X("rubyIdentifier","c6b6fe","","","Cyan","") 418 | hi! link rubyConstant Type 419 | hi! link rubyFunction Function 420 | 421 | call s:X("rubyInstanceVariable","c6b6fe","","","Cyan","") 422 | call s:X("rubySymbol","7697d6","","","Blue","") 423 | hi! link rubyGlobalVariable rubyInstanceVariable 424 | hi! link rubyModule rubyClass 425 | call s:X("rubyControl","7597c6","","","Blue","") 426 | 427 | hi! link rubyString String 428 | hi! link rubyStringDelimiter StringDelimiter 429 | hi! link rubyInterpolationDelimiter Identifier 430 | 431 | call s:X("rubyRegexpDelimiter","540063","","","Magenta","") 432 | call s:X("rubyRegexp","dd0093","","","DarkMagenta","") 433 | call s:X("rubyRegexpSpecial","a40073","","","Magenta","") 434 | 435 | call s:X("rubyPredefinedIdentifier","de5577","","","Red","") 436 | 437 | " Erlang 438 | 439 | hi! link erlangAtom rubySymbol 440 | hi! link erlangBIF rubyPredefinedIdentifier 441 | hi! link erlangFunction rubyPredefinedIdentifier 442 | hi! link erlangDirective Statement 443 | hi! link erlangNode Identifier 444 | 445 | " JavaScript 446 | 447 | hi! link javaScriptValue Constant 448 | hi! link javaScriptRegexpString rubyRegexp 449 | 450 | " CoffeeScript 451 | 452 | hi! link coffeeRegExp javaScriptRegexpString 453 | 454 | " Lua 455 | 456 | hi! link luaOperator Conditional 457 | 458 | " C 459 | 460 | hi! link cFormat Identifier 461 | hi! link cOperator Constant 462 | 463 | " Objective-C/Cocoa 464 | 465 | hi! link objcClass Type 466 | hi! link cocoaClass objcClass 467 | hi! link objcSubclass objcClass 468 | hi! link objcSuperclass objcClass 469 | hi! link objcDirective rubyClass 470 | hi! link objcStatement Constant 471 | hi! link cocoaFunction Function 472 | hi! link objcMethodName Identifier 473 | hi! link objcMethodArg Normal 474 | hi! link objcMessageName Identifier 475 | 476 | " Vimscript 477 | 478 | hi! link vimOper Normal 479 | 480 | " Debugger.vim 481 | 482 | call s:X("DbgCurrent","DEEBFE","345FA8","","White","DarkBlue") 483 | call s:X("DbgBreakPt","","4F0037","","","DarkMagenta") 484 | 485 | " vim-indent-guides 486 | 487 | if !exists("g:indent_guides_auto_colors") 488 | let g:indent_guides_auto_colors = 0 489 | endif 490 | call s:X("IndentGuidesOdd","","232323","","","") 491 | call s:X("IndentGuidesEven","","1b1b1b","","","") 492 | 493 | " Plugins, etc. 494 | 495 | hi! link TagListFileName Directory 496 | call s:X("PreciseJumpTarget","B9ED67","405026","","White","Green") 497 | 498 | if !exists("g:jellybeans_background_color_256") 499 | let g:jellybeans_background_color_256=233 500 | end 501 | " Manual overrides for 256-color terminals. Dark colors auto-map badly. 502 | if !s:low_color 503 | hi StatusLineNC ctermbg=235 504 | hi Folded ctermbg=236 505 | hi FoldColumn ctermbg=234 506 | hi SignColumn ctermbg=236 507 | hi CursorColumn ctermbg=234 508 | hi CursorLine ctermbg=234 509 | hi SpecialKey ctermbg=234 510 | exec "hi NonText ctermbg=".g:jellybeans_background_color_256 511 | exec "hi LineNr ctermbg=".g:jellybeans_background_color_256 512 | hi DiffText ctermfg=81 513 | exec "hi Normal ctermbg=".g:jellybeans_background_color_256 514 | hi DbgBreakPt ctermbg=53 515 | hi IndentGuidesOdd ctermbg=235 516 | hi IndentGuidesEven ctermbg=234 517 | endif 518 | 519 | if exists("g:jellybeans_overrides") 520 | fun! s:load_colors(defs) 521 | for [l:group, l:v] in items(a:defs) 522 | call s:X(l:group, get(l:v, 'guifg', ''), get(l:v, 'guibg', ''), 523 | \ get(l:v, 'attr', ''), 524 | \ get(l:v, 'ctermfg', ''), get(l:v, 'ctermbg', '')) 525 | if !s:low_color 526 | for l:prop in ['ctermfg', 'ctermbg'] 527 | let l:override_key = '256'.l:prop 528 | if has_key(l:v, l:override_key) 529 | exec "hi ".l:group." ".l:prop."=".l:v[l:override_key] 530 | endif 531 | endfor 532 | endif 533 | unlet l:group 534 | unlet l:v 535 | endfor 536 | endfun 537 | call s:load_colors(g:jellybeans_overrides) 538 | delf s:load_colors 539 | endif 540 | 541 | " delete functions {{{ 542 | delf s:X 543 | delf s:rgb 544 | delf s:color 545 | delf s:rgb_color 546 | delf s:rgb_level 547 | delf s:rgb_number 548 | delf s:grey_color 549 | delf s:grey_level 550 | delf s:grey_number 551 | " }}} 552 | -------------------------------------------------------------------------------- /nvim/snippets/ruby.snippets: -------------------------------------------------------------------------------- 1 | # encoding for Ruby 1.9 2 | snippet enc 3 | # encoding: utf-8 4 | 5 | # #!/usr/bin/env ruby 6 | snippet #! 7 | #!/usr/bin/env ruby 8 | # encoding: utf-8 9 | 10 | # New Block 11 | snippet =b 12 | =begin rdoc 13 | ${0} 14 | =end 15 | snippet prot 16 | protected 17 | 18 | ${0} 19 | snippet priv 20 | private 21 | 22 | ${0} 23 | snippet y 24 | :yields: ${0:arguments} 25 | snippet rb 26 | #!/usr/bin/env ruby -wKU 27 | snippet beg 28 | begin 29 | ${0} 30 | rescue ${1:Exception} => ${2:e} 31 | end 32 | 33 | snippet req require 34 | require '${1}' 35 | snippet reqr 36 | require_relative '${1}' 37 | snippet # 38 | # => 39 | snippet end 40 | __END__ 41 | snippet case 42 | case ${1:object} 43 | when ${2:condition} 44 | ${0} 45 | end 46 | snippet when 47 | when ${1:condition} 48 | ${0} 49 | snippet def 50 | def ${1:method_name} 51 | ${0} 52 | end 53 | snippet deft 54 | def test_${1:case_name} 55 | ${0} 56 | end 57 | snippet descendants 58 | class Class 59 | def descendants 60 | ObjectSpace.each_object(::Class).select { |klass| klass < self } 61 | end 62 | end 63 | snippet if 64 | if ${1:condition} 65 | ${0} 66 | end 67 | snippet ife 68 | if ${1:condition} 69 | ${2} 70 | else 71 | ${0} 72 | end 73 | snippet eif 74 | elsif ${1:condition} 75 | ${0} 76 | snippet ifee 77 | if ${1:condition} 78 | $2 79 | elsif ${3:condition} 80 | $4 81 | else 82 | $0 83 | end 84 | snippet unless 85 | unless ${1:condition} 86 | ${0} 87 | end 88 | snippet unlesse 89 | unless ${1:condition} 90 | $2 91 | else 92 | $0 93 | end 94 | snippet unlesee 95 | unless ${1:condition} 96 | $2 97 | elsif ${3:condition} 98 | $4 99 | else 100 | $0 101 | end 102 | snippet wh 103 | while ${1:condition} 104 | ${0} 105 | end 106 | snippet for 107 | for ${1:e} in ${2:c} 108 | ${0} 109 | end 110 | snippet until 111 | until ${1:condition} 112 | ${0} 113 | end 114 | snippet cla class .. end 115 | class ${1:`substitute(vim_snippets#Filename(), '\(_\|^\)\(.\)', '\u\2', 'g')`} 116 | ${0} 117 | end 118 | snippet cla class .. initialize .. end 119 | class ${1:`substitute(vim_snippets#Filename(), '\(_\|^\)\(.\)', '\u\2', 'g')`} 120 | def initialize(${2:args}) 121 | ${0} 122 | end 123 | end 124 | snippet cla class .. < ParentClass .. initialize .. end 125 | class ${1:`substitute(vim_snippets#Filename(), '\(_\|^\)\(.\)', '\u\2', 'g')`} < ${2:ParentClass} 126 | def initialize(${3:args}) 127 | ${0} 128 | end 129 | end 130 | snippet cla ClassName = Struct .. do .. end 131 | ${1:`substitute(vim_snippets#Filename(), '\(_\|^\)\(.\)', '\u\2', 'g')`} = Struct.new(:${2:attr_names}) do 132 | def ${3:method_name} 133 | ${0} 134 | end 135 | end 136 | snippet cla class BlankSlate .. initialize .. end 137 | class ${0:BlankSlate} 138 | instance_methods.each { |meth| undef_method(meth) unless meth =~ /\A__/ } 139 | end 140 | snippet cla class << self .. end 141 | class << ${1:self} 142 | ${0} 143 | end 144 | # class .. < DelegateClass .. initialize .. end 145 | snippet cla- 146 | class ${1:`substitute(vim_snippets#Filename(), '\(_\|^\)\(.\)', '\u\2', 'g')`} < DelegateClass(${2:ParentClass}) 147 | def initialize(${3:args}) 148 | super(${4:del_obj}) 149 | 150 | ${0} 151 | end 152 | end 153 | snippet mod module .. end 154 | module ${1:`substitute(vim_snippets#Filename(), '\(_\|^\)\(.\)', '\u\2', 'g')`} 155 | ${0} 156 | end 157 | snippet mod module .. module_function .. end 158 | module ${1:`substitute(vim_snippets#Filename(), '\(_\|^\)\(.\)', '\u\2', 'g')`} 159 | module_function 160 | 161 | ${0} 162 | end 163 | snippet mod module .. ClassMethods .. end 164 | module ${1:`substitute(vim_snippets#Filename(), '\(_\|^\)\(.\)', '\u\2', 'g')`} 165 | module ClassMethods 166 | ${0} 167 | end 168 | 169 | module InstanceMethods 170 | 171 | end 172 | 173 | def self.included(receiver) 174 | receiver.extend ClassMethods 175 | receiver.send :include, InstanceMethods 176 | end 177 | end 178 | # attr_reader 179 | snippet r 180 | attr_reader :${0:attr_names} 181 | # attr_writer 182 | snippet w 183 | attr_writer :${0:attr_names} 184 | # attr_accessor 185 | snippet rw 186 | attr_accessor :${0:attr_names} 187 | snippet atp 188 | attr_protected :${0:attr_names} 189 | snippet ata 190 | attr_accessible :${0:attr_names} 191 | snippet ana 192 | accepts_nested_attributes_for :${0:association} 193 | # ivc == instance variable cache 194 | snippet ivc 195 | @${1:variable_name} ||= ${0:cached_value} 196 | # include Enumerable 197 | snippet Enum 198 | include Enumerable 199 | 200 | def each(&block) 201 | ${0} 202 | end 203 | # include Comparable 204 | snippet Comp 205 | include Comparable 206 | 207 | def <=>(other) 208 | ${0} 209 | end 210 | # extend Forwardable 211 | snippet Forw- 212 | extend Forwardable 213 | # def self 214 | snippet defs 215 | def self.${1:class_method_name} 216 | ${0} 217 | end 218 | # def initialize 219 | snippet definit 220 | def initialize(${1:args}) 221 | ${0} 222 | end 223 | # def method_missing 224 | snippet defmm 225 | def method_missing(meth, *args, &blk) 226 | ${0} 227 | end 228 | snippet defd 229 | def_delegator :${1:@del_obj}, :${2:del_meth}, :${0:new_name} 230 | snippet defds 231 | def_delegators :${1:@del_obj}, :${0:del_methods} 232 | snippet am 233 | alias_method :${1:new_name}, :${0:old_name} 234 | snippet app 235 | if __FILE__ == $PROGRAM_NAME 236 | ${0} 237 | end 238 | # usage_if() 239 | snippet usai 240 | if ARGV.${1} 241 | abort "Usage: #{$PROGRAM_NAME} ${2:ARGS_GO_HERE}"${0} 242 | end 243 | # usage_unless() 244 | snippet usau 245 | unless ARGV.${1} 246 | abort "Usage: #{$PROGRAM_NAME} ${2:ARGS_GO_HERE}"${0} 247 | end 248 | snippet array 249 | Array.new(${1:10}) { |${2:i}| ${0} } 250 | snippet hash 251 | Hash.new { |${1:hash}, ${2:key}| $1[$2] = ${0} } 252 | snippet file File.foreach() { |line| .. } 253 | File.foreach(${1:'path/to/file'}) { |${2:line}| ${0} } 254 | snippet file File.read() 255 | File.read(${1:'path/to/file'}) 256 | snippet Dir Dir.global() { |file| .. } 257 | Dir.glob(${1:'dir/glob/*'}) { |${2:file}| ${0} } 258 | snippet Dir Dir[".."] 259 | Dir[${1:'glob/**/*.rb'}] 260 | snippet dir 261 | Filename.dirname(__FILE__) 262 | snippet deli 263 | delete_if { |${1:e}| ${0} } 264 | snippet fil 265 | fill(${1:range}) { |${2:i}| ${0} } 266 | # flatten_once() 267 | snippet flao 268 | reduce(Array.new) { |${1:arr}, ${2:a}| $1.push(*$2) } 269 | snippet zip 270 | zip(${1:enums}) { |${2:row}| ${0} } 271 | # downto(0) { |n| .. } 272 | snippet dow 273 | downto(${1:0}) { |${2:n}| ${0} } 274 | snippet ste 275 | step(${1:2}) { |${2:n}| ${0} } 276 | snippet tim 277 | times { |${1:n}| ${0} } 278 | snippet upt 279 | upto(${1:1.0/0.0}) { |${2:n}| ${0} } 280 | snippet loo 281 | loop { ${0} } 282 | snippet ea 283 | each { |${1:e}| ${0} } 284 | snippet ead 285 | each do |${1:e}| 286 | ${0} 287 | end 288 | snippet eab 289 | each_byte { |${1:byte}| ${0} } 290 | snippet eac- each_char { |chr| .. } 291 | each_char { |${1:chr}| ${0} } 292 | snippet eac- each_cons(..) { |group| .. } 293 | each_cons(${1:2}) { |${2:group}| ${0} } 294 | snippet eai 295 | each_index { |${1:i}| ${0} } 296 | snippet eaid 297 | each_index do |${1:i}| 298 | ${0} 299 | end 300 | snippet eak 301 | each_key { |${1:key}| ${0} } 302 | snippet eakd 303 | each_key do |${1:key}| 304 | ${0} 305 | end 306 | snippet eal 307 | each_line { |${1:line}| ${0} } 308 | snippet eald 309 | each_line do |${1:line}| 310 | ${0} 311 | end 312 | snippet eap 313 | each_pair { |${1:name}, ${2:val}| ${0} } 314 | snippet eapd 315 | each_pair do |${1:name}, ${2:val}| 316 | ${0} 317 | end 318 | snippet eas- 319 | each_slice(${1:2}) { |${2:group}| ${0} } 320 | snippet easd- 321 | each_slice(${1:2}) do |${2:group}| 322 | ${0} 323 | end 324 | snippet eav 325 | each_value { |${1:val}| ${0} } 326 | snippet eavd 327 | each_value do |${1:val}| 328 | ${0} 329 | end 330 | snippet eawi 331 | each_with_index { |${1:e}, ${2:i}| ${0} } 332 | snippet eawid 333 | each_with_index do |${1:e}, ${2:i}| 334 | ${0} 335 | end 336 | snippet eawo 337 | each_with_object(${1:init}) { |${2:e}, ${3:var}| ${0} } 338 | snippet eawod 339 | each_with_object(${1:init}) do |${2:e}, ${3:var}| 340 | ${0} 341 | end 342 | snippet reve 343 | reverse_each { |${1:e}| ${0} } 344 | snippet reved 345 | reverse_each do |${1:e}| 346 | ${0} 347 | end 348 | snippet inj 349 | inject(${1:init}) { |${2:mem}, ${3:var}| ${0} } 350 | snippet injd 351 | inject(${1:init}) do |${2:mem}, ${3:var}| 352 | ${0} 353 | end 354 | snippet red 355 | reduce(${1:init}) { |${2:mem}, ${3:var}| ${0} } 356 | snippet redd 357 | reduce(${1:init}) do |${2:mem}, ${3:var}| 358 | ${0} 359 | end 360 | snippet map 361 | map { |${1:e}| ${0} } 362 | snippet mapd 363 | map do |${1:e}| 364 | ${0} 365 | end 366 | snippet mapwi- 367 | enum_with_index.map { |${1:e}, ${2:i}| ${0} } 368 | snippet sor 369 | sort { |a, b| ${0} } 370 | snippet sorb 371 | sort_by { |${1:e}| ${0} } 372 | snippet ran 373 | sort_by { rand } 374 | snippet all 375 | all? { |${1:e}| ${0} } 376 | snippet any 377 | any? { |${1:e}| ${0} } 378 | snippet cl 379 | classify { |${1:e}| ${0} } 380 | snippet col 381 | collect { |${1:e}| ${0} } 382 | snippet cold 383 | collect do |${1:e}| 384 | ${0} 385 | end 386 | snippet det 387 | detect { |${1:e}| ${0} } 388 | snippet detd 389 | detect do |${1:e}| 390 | ${0} 391 | end 392 | snippet fet 393 | fetch(${1:name}) { |${2:key}| ${0} } 394 | snippet fin 395 | find { |${1:e}| ${0} } 396 | snippet find 397 | find do |${1:e}| 398 | ${0} 399 | end 400 | snippet fina 401 | find_all { |${1:e}| ${0} } 402 | snippet finad 403 | find_all do |${1:e}| 404 | ${0} 405 | end 406 | snippet gre 407 | grep(${1:/pattern/}) { |${2:match}| ${0} } 408 | snippet sub 409 | ${1:g}sub(${2:/pattern/}) { |${3:match}| ${0} } 410 | snippet sca 411 | scan(${1:/pattern/}) { |${2:match}| ${0} } 412 | snippet scad 413 | scan(${1:/pattern/}) do |${2:match}| 414 | ${0} 415 | end 416 | snippet max 417 | max { |a, b| ${0} } 418 | snippet min 419 | min { |a, b| ${0} } 420 | snippet par 421 | partition { |${1:e}| ${0} } 422 | snippet pard 423 | partition do |${1:e}| 424 | ${0} 425 | end 426 | snippet rej 427 | reject { |${1:e}| ${0} } 428 | snippet rejd 429 | reject do |${1:e}| 430 | ${0} 431 | end 432 | snippet sel 433 | select { |${1:e}| ${0} } 434 | snippet seld 435 | select do |${1:e}| 436 | ${0} 437 | end 438 | snippet lam 439 | lambda { |${1:args}| ${0} } 440 | snippet -> 441 | -> { ${0} } 442 | snippet ->a 443 | ->(${1:args}) { ${0} } 444 | # I'm pretty sure that ruby users expect do to expand to do .. end 445 | snippet do 446 | do 447 | ${0} 448 | end 449 | # this is for one or more variables. typing a ", " is that cheap that it may 450 | # not be worth adding another snippet. should 0/1 placeholders change order? 451 | # its a good idea to think about the var name, so use it first 452 | snippet dov 453 | do |${1:v}| 454 | ${2} 455 | end 456 | snippet : 457 | ${1:key}: ${2:'value'} 458 | snippet ope 459 | open('${1:path/or/url/or/pipe}', '${2:w}') { |${3:io}| ${0} } 460 | # path_from_here() 461 | snippet fpath 462 | File.join(File.dirname(__FILE__), *['${1:rel path here}']) 463 | # unix_filter {} 464 | snippet unif 465 | ARGF.each_line${1} do |${2:line}| 466 | ${0} 467 | end 468 | # option_parse {} 469 | snippet optp 470 | require 'optparse' 471 | 472 | options = { ${0:default: 'args'} } 473 | 474 | ARGV.options do |opts| 475 | opts.banner = "Usage: #{File.basename($PROGRAM_NAME)}" 476 | end 477 | snippet opt 478 | opts.on('-${1:o}', '--${2:long-option-name}', ${3:String}, '${4:Option description.}') do |${5:opt}| 479 | ${0} 480 | end 481 | snippet tc 482 | require 'test/unit' 483 | 484 | require '${1:library_file_name}' 485 | 486 | class Test${2:$1} < Test::Unit::TestCase 487 | def test_${3:case_name} 488 | ${0} 489 | end 490 | end 491 | snippet ts 492 | require 'test/unit' 493 | 494 | require 'tc_${1:test_case_file}' 495 | require 'tc_${2:test_case_file}' 496 | snippet as 497 | assert ${1:test}, '${2:Failure message.}' 498 | snippet ase 499 | assert_equal ${1:expected}, ${2:actual} 500 | snippet asne 501 | assert_not_equal ${1:unexpected}, ${2:actual} 502 | snippet asid 503 | assert_in_delta ${1:expected_float}, ${2:actual_float}, ${3:2**-20} 504 | snippet asi 505 | assert_includes ${1:collection}, ${2:object} 506 | snippet asio 507 | assert_instance_of ${1:ExpectedClass}, ${2:actual_instance} 508 | snippet asko 509 | assert_kind_of ${1:ExpectedKind}, ${2:actual_instance} 510 | snippet asn 511 | assert_nil ${1:instance} 512 | snippet asnn 513 | assert_not_nil ${1:instance} 514 | snippet asm 515 | assert_match(/${1:expected_pattern}/, ${2:actual_string}) 516 | snippet asnm 517 | assert_no_match(/${1:unexpected_pattern}/, ${2:actual_string}) 518 | snippet aso 519 | assert_operator ${1:left}, :${2:operator}, ${3:right} 520 | snippet asr 521 | assert_raise ${1:Exception} { ${0} } 522 | snippet asrd 523 | assert_raise ${1:Exception} do 524 | ${0} 525 | end 526 | snippet asnr 527 | assert_nothing_raised ${1:Exception} { ${0} } 528 | snippet asnrd 529 | assert_nothing_raised ${1:Exception} do 530 | ${0} 531 | end 532 | snippet asrt 533 | assert_respond_to ${1:object}, :${2:method} 534 | snippet ass assert_same(..) 535 | assert_same ${1:expected}, ${2:actual} 536 | snippet ass assert_send(..) 537 | assert_send [${1:object}, :${2:message}, ${3:args}] 538 | snippet asns 539 | assert_not_same ${1:unexpected}, ${2:actual} 540 | snippet ast 541 | assert_throws :${1:expected}, -> { ${0} } 542 | snippet astd 543 | assert_throws :${1:expected} do 544 | ${0} 545 | end 546 | snippet asnt 547 | assert_nothing_thrown { ${0} } 548 | snippet asntd 549 | assert_nothing_thrown do 550 | ${0} 551 | end 552 | snippet fl 553 | flunk '${1:Failure message.}' 554 | # Benchmark.bmbm do .. end 555 | snippet bm- 556 | TESTS = ${1:10_000} 557 | Benchmark.bmbm do |results| 558 | ${0} 559 | end 560 | snippet rep 561 | results.report('${1:name}:') { TESTS.times { ${0} } } 562 | # Marshal.dump(.., file) 563 | snippet Md 564 | File.open('${1:path/to/file.dump}', 'wb') { |${2:file}| Marshal.dump(${3:obj}, $2) } 565 | # Mashal.load(obj) 566 | snippet Ml 567 | File.open('${1:path/to/file.dump}', 'rb') { |${2:file}| Marshal.load($2) } 568 | # deep_copy(..) 569 | snippet deec 570 | Marshal.load(Marshal.dump(${1:obj_to_copy})) 571 | snippet Pn- 572 | PStore.new('${1:file_name.pstore}') 573 | snippet tra 574 | transaction(${1:true}) { ${0} } 575 | # xmlread(..) 576 | snippet xml- 577 | REXML::Document.new(File.read('${1:path/to/file}')) 578 | # xpath(..) { .. } 579 | snippet xpa 580 | elements.each('${1://Xpath}') do |${2:node}| 581 | ${0} 582 | end 583 | # class_from_name() 584 | snippet clafn 585 | split('::').inject(Object) { |par, const| par.const_get(const) } 586 | # singleton_class() 587 | snippet sinc 588 | class << self; self end 589 | snippet nam 590 | namespace :${1:`vim_snippets#Filename()`} do 591 | ${0} 592 | end 593 | snippet tas 594 | desc '${1:Task description}' 595 | task ${2:task_name: [:dependent, :tasks]} do 596 | ${0} 597 | end 598 | # block 599 | snippet b 600 | { |${1:var}| ${0} } 601 | snippet begin 602 | begin 603 | fail 'A test exception.' 604 | rescue Exception => e 605 | puts e.message 606 | puts e.backtrace.inspect 607 | else 608 | # other exception 609 | ensure 610 | # always executed 611 | end 612 | 613 | # Rails specific 614 | snippet rcf 615 | Rails.cache.fetch(${1:key_name}) do 616 | ${2:values} 617 | end 618 | 619 | snippet rcd 620 | Rails.cache.delete(${1:key_name}) 621 | 622 | #debugging 623 | snippet debug 624 | require 'byebug'; byebug 625 | snippet debug19 626 | require 'debugger'; debugger 627 | snippet debug18 628 | require 'ruby-debug'; debugger 629 | snippet pry 630 | require 'pry'; binding.pry 631 | snippet strf 632 | strftime('${1:%Y-%m-%d %H:%M:%S %z}')${0} 633 | # 634 | # Minitest snippets 635 | # 636 | snippet mb 637 | must_be ${0} 638 | snippet wb 639 | wont_be ${0} 640 | snippet mbe 641 | must_be_empty 642 | snippet wbe 643 | wont_be_empty 644 | snippet mbio 645 | must_be_instance_of ${0:Class} 646 | snippet wbio 647 | wont_be_instance_of ${0:Class} 648 | snippet mbko 649 | must_be_kind_of ${0:Class} 650 | snippet wbko 651 | wont_be_kind_of ${0:Class} 652 | snippet mbn 653 | must_be_nil 654 | snippet wbn 655 | wont_be_nil 656 | snippet mbsa 657 | must_be_same_as ${0:other} 658 | snippet wbsa 659 | wont_be_same_as ${0:other} 660 | snippet mbsi 661 | -> { ${0} }.must_be_silent 662 | snippet mbwd 663 | must_be_within_delta ${1:0.1}, ${2:0.1} 664 | snippet wbwd 665 | wont_be_within_delta ${1:0.1}, ${2:0.1} 666 | snippet mbwe 667 | must_be_within_epsilon ${1:0.1}, ${2:0.1} 668 | snippet wbwe 669 | wont_be_within_epsilon ${1:0.1}, ${2:0.1} 670 | snippet me 671 | must_equal ${0:other} 672 | snippet we 673 | wont_equal ${0:other} 674 | snippet mi 675 | must_include ${0:what} 676 | snippet wi 677 | wont_include ${0:what} 678 | snippet mm 679 | must_match /${0:regex}/ 680 | snippet wm 681 | wont_match /${0:regex}/ 682 | snippet mout 683 | -> { ${1} }.must_output '${0}' 684 | snippet mra 685 | -> { ${1} }.must_raise ${0:Exception} 686 | snippet mrt 687 | must_respond_to :${0:method} 688 | snippet wrt 689 | wont_respond_to :${0:method} 690 | snippet msend 691 | must_send [ ${1:what}, :${2:method}, ${3:args} ] 692 | snippet mthrow 693 | -> { throw :${1:error} }.must_throw :${2:error} 694 | ########################## 695 | # Rspec snippets # 696 | ########################## 697 | snippet rsd 698 | require 'spec_helper' 699 | require '${1:`substitute(vim_snippets#Filename(), '_spec$', '', '')`}' 700 | RSpec.describe ${2:`substitute(substitute(vim_snippets#Filename(), '_spec$', '', ''), '\(_\|^\)\(.\)', '\u\2', 'g')`} do 701 | ${3} 702 | end 703 | snippet desc 704 | RSpec.describe ${1:`substitute(substitute(vim_snippets#Filename(), '_spec$', '', ''), '\(_\|^\)\(.\)', '\u\2', 'g')`} do 705 | ${0} 706 | end 707 | snippet descm 708 | describe '${1:#method}' do 709 | ${0:pending 'Not implemented'} 710 | end 711 | snippet cont 712 | context '${1:message}' do 713 | ${0} 714 | end 715 | snippet bef 716 | before :${1:each} do 717 | ${0} 718 | end 719 | snippet aft 720 | after :${1:each} do 721 | ${0} 722 | end 723 | snippet let 724 | let(:${1:object}) { ${0} } 725 | snippet let! 726 | let!(:${1:object}) { ${0} } 727 | snippet subj 728 | subject { ${0} } 729 | snippet s. 730 | subject.${0:method} 731 | snippet spec 732 | specify { subject.${0} } 733 | snippet exp 734 | expect(${1:object}).to ${0} 735 | snippet expb 736 | expect { ${1:object} }.to ${0} 737 | snippet experr 738 | expect { ${1:object} }.to raise_error ${2:StandardError}, /${0:message_regex}/ 739 | snippet shared 740 | shared_examples ${0:'shared examples name'} 741 | snippet ibl 742 | it_behaves_like ${0:'shared examples name'} 743 | snippet it 744 | it '${1:spec_name}' do 745 | ${0} 746 | end 747 | snippet its 748 | it { is_expected.to ${0} } 749 | snippet is 750 | it { should ${0} } 751 | snippet isn 752 | it { should_not ${0} } 753 | 754 | -------------------------------------------------------------------------------- /nvim/colors/gruvbox.vim: -------------------------------------------------------------------------------- 1 | " ----------------------------------------------------------------------------- 2 | " File: gruvbox.vim 3 | " Description: Retro groove color scheme for Vim 4 | " Author: morhetz 5 | " Source: https://github.com/morhetz/gruvbox 6 | " Last Modified: 10 Nov 2014 7 | " ----------------------------------------------------------------------------- 8 | 9 | " Supporting code ------------------------------------------------------------- 10 | " Initialisation: {{{ 11 | 12 | if version > 580 13 | hi clear 14 | if exists("syntax_on") 15 | syntax reset 16 | endif 17 | endif 18 | 19 | let g:colors_name='gruvbox' 20 | 21 | if !has('gui_running') && &t_Co != 256 22 | finish 23 | endif 24 | 25 | " }}} 26 | " Global Settings: {{{ 27 | 28 | if !exists('g:gruvbox_bold') 29 | let g:gruvbox_bold=1 30 | endif 31 | if !exists('g:gruvbox_italic') 32 | if has('gui_running') || $TERM_ITALICS == 'true' 33 | let g:gruvbox_italic=1 34 | else 35 | let g:gruvbox_italic=0 36 | endif 37 | endif 38 | if !exists('g:gruvbox_undercurl') 39 | let g:gruvbox_undercurl=1 40 | endif 41 | if !exists('g:gruvbox_underline') 42 | let g:gruvbox_underline=1 43 | endif 44 | 45 | if !exists('g:gruvbox_italicize_comments') 46 | let g:gruvbox_italicize_comments=1 47 | endif 48 | if !exists('g:gruvbox_italicize_strings') 49 | let g:gruvbox_italicize_strings=0 50 | endif 51 | 52 | if !exists('g:gruvbox_improved_strings') 53 | let g:gruvbox_improved_strings=0 54 | endif 55 | 56 | if !exists('g:gruvbox_improved_warnings') 57 | let g:gruvbox_improved_warnings=0 58 | endif 59 | 60 | if !exists('g:gruvbox_termcolors') 61 | let g:gruvbox_termcolors=256 62 | endif 63 | 64 | if !exists('g:gruvbox_invert_indent_guides') 65 | let g:gruvbox_invert_indent_guides=0 66 | endif 67 | 68 | if !exists('g:gruvbox_hls_cursor') 69 | let g:gruvbox_hls_cursor='orange' 70 | endif 71 | 72 | if !exists('g:gruvbox_sign_column') 73 | let g:gruvbox_sign_column='dark1' 74 | endif 75 | 76 | if !exists('g:gruvbox_color_column') 77 | let g:gruvbox_color_column='dark1' 78 | endif 79 | 80 | if !exists('g:gruvbox_vert_split') 81 | let g:gruvbox_vert_split='dark2' 82 | endif 83 | 84 | if !exists('g:gruvbox_invert_signs') 85 | let g:gruvbox_invert_signs=0 86 | endif 87 | 88 | if !exists('g:gruvbox_invert_selection') 89 | let g:gruvbox_invert_selection=1 90 | endif 91 | 92 | if !exists('g:gruvbox_contrast') 93 | let g:gruvbox_contrast='medium' 94 | endif 95 | 96 | if !exists('g:gruvbox_contrast_dark') 97 | let g:gruvbox_contrast_dark='medium' 98 | endif 99 | 100 | if !exists('g:gruvbox_contrast_light') 101 | let g:gruvbox_contrast_light='medium' 102 | endif 103 | 104 | if !exists('g:gruvbox_invert_tabline') 105 | let g:gruvbox_invert_tabline=0 106 | endif 107 | 108 | let s:is_dark=(&background == 'dark') 109 | 110 | " }}} 111 | " Palette: {{{ 112 | 113 | let s:gb = {} 114 | 115 | if s:is_dark 116 | let s:gb.dark0 = ['282828', 235] " 40-40-40 117 | let s:gb.dark1 = ['3c3836', 237] " 60-56-54 118 | let s:gb.dark2 = ['504945', 239] " 80-73-69 119 | let s:gb.dark3 = ['665c54', 241] " 102-92-84 120 | let s:gb.dark4 = ['7c6f64', 243] " 124-111-100 121 | 122 | let s:gb.medium = ['928374', 245] " 146-131-116 123 | 124 | let s:gb.light0 = ['fdf4c1', 229] " 253-244-193 125 | let s:gb.light1 = ['ebdbb2', 223] " 235-219-178 126 | let s:gb.light2 = ['d5c4a1', 250] " 213-196-161 127 | let s:gb.light3 = ['bdae93', 248] " 189-174-147 128 | let s:gb.light4 = ['a89984', 246] " 168-153-132 129 | 130 | let s:gb.light4_256 = ['a89984', 246] " 168-153-132 131 | 132 | let s:gb.red = ['fb4934', 167] " 251-73-52 133 | let s:gb.green = ['b8bb26', 142] " 184-187-38 134 | let s:gb.yellow = ['fabd2f', 214] " 250-189-47 135 | let s:gb.blue = ['83a598', 109] " 131-165-152 136 | let s:gb.purple = ['d3869b', 175] " 211-134-155 137 | let s:gb.aqua = ['8ec07c', 108] " 142-192-124 138 | let s:gb.orange = ['fe8019', 208] " 254-128-25 139 | 140 | if g:gruvbox_termcolors == 16 141 | let s:gb.dark0 = ['282828', 0] 142 | let s:gb.light4 = ['a89984', 7] 143 | let s:gb.medium = ['928374', 8] 144 | let s:gb.red = ['fb4934', 9] 145 | let s:gb.green = ['b8bb26', 10] 146 | let s:gb.yellow = ['fabd2f', 11] 147 | let s:gb.blue = ['83a598', 12] 148 | let s:gb.purple = ['d3869b', 13] 149 | let s:gb.aqua = ['8ec07c', 14] 150 | let s:gb.light1 = ['ebdbb2', 15] 151 | endif 152 | 153 | if g:gruvbox_contrast == 'soft' 154 | let s:gb.dark0 = ['32302f', 236] " 50-48-47 155 | endif 156 | 157 | if g:gruvbox_contrast == 'hard' 158 | let s:gb.dark0 = ['1d2021', 234] " 29-32-33 159 | endif 160 | 161 | if g:gruvbox_contrast_dark == 'soft' 162 | let s:gb.dark0 = ['32302f', 236] " 50-48-47 163 | endif 164 | 165 | if g:gruvbox_contrast_dark == 'hard' 166 | let s:gb.dark0 = ['1d2021', 234] " 29-32-33 167 | endif 168 | else 169 | let s:gb.dark0 = ['fbf1c7', 229] " 251-241-199 170 | let s:gb.dark1 = ['ebdbb2', 223] " 235-219-178 171 | let s:gb.dark2 = ['d5c4a1', 250] " 213-196-161 172 | let s:gb.dark3 = ['bdae93', 248] " 189-174-147 173 | let s:gb.dark4 = ['a89984', 246] " 168-153-132 174 | 175 | let s:gb.medium = ['928374', 244] " 146-131-116 176 | 177 | let s:gb.light0 = ['282828', 235] " 40-40-40 178 | let s:gb.light1 = ['3c3836', 237] " 60-56-54 179 | let s:gb.light2 = ['504945', 239] " 80-73-69 180 | let s:gb.light3 = ['665c54', 241] " 102-92-84 181 | let s:gb.light4 = ['7c6f64', 243] " 124-111-100 182 | 183 | let s:gb.light4_256 = ['7c6f64', 243] " 124-111-100 184 | 185 | let s:gb.red = ['9d0006', 88] " 157-0-6 186 | let s:gb.green = ['79740e', 100] " 121-116-14 187 | let s:gb.yellow = ['b57614', 136] " 181-118-20 188 | let s:gb.blue = ['076678', 24] " 7-102-120 189 | let s:gb.purple = ['8f3f71', 96] " 143-63-113 190 | let s:gb.aqua = ['427b58', 66] " 66-123-88 191 | let s:gb.orange = ['af3a03', 130] " 175-58-3 192 | 193 | if g:gruvbox_termcolors == 16 194 | let s:gb.dark0 = ['fbf1c7', 0] 195 | let s:gb.light4 = ['7c6f64', 7] 196 | let s:gb.medium = ['928374', 8] 197 | let s:gb.red = ['9d0006', 9] 198 | let s:gb.green = ['79740e', 10] 199 | let s:gb.yellow = ['b57614', 11] 200 | let s:gb.blue = ['076678', 12] 201 | let s:gb.purple = ['8f3f71', 13] 202 | let s:gb.aqua = ['427b58', 14] 203 | let s:gb.light1 = ['3c3836', 15] 204 | endif 205 | 206 | if g:gruvbox_contrast == 'soft' 207 | let s:gb.dark0 = ['f2e5bc', 228] " 242-229-188 208 | endif 209 | 210 | if g:gruvbox_contrast == 'hard' 211 | let s:gb.dark0 = ['f9f5d7', 230] " 249-245-215 212 | endif 213 | 214 | if g:gruvbox_contrast_light == 'soft' 215 | let s:gb.dark0 = ['f2e5bc', 228] " 242-229-188 216 | endif 217 | 218 | if g:gruvbox_contrast_light == 'hard' 219 | let s:gb.dark0 = ['f9f5d7', 230] " 249-245-215 220 | endif 221 | endif 222 | 223 | " }}} 224 | " Highlighting Function: {{{ 225 | 226 | function! s:HL(group, fg, ...) 227 | " Arguments: group, guifg, guibg, gui, guisp 228 | 229 | let histring = 'hi ' . a:group . ' ' 230 | 231 | if strlen(a:fg) 232 | if a:fg == 'fg' 233 | let histring .= 'guifg=fg ctermfg=fg ' 234 | elseif a:fg == 'bg' 235 | let histring .= 'guifg=bg ctermfg=bg ' 236 | elseif a:fg == 'none' 237 | let histring .= 'guifg=NONE ctermfg=NONE ' 238 | else 239 | let c = get(s:gb, a:fg) 240 | let histring .= 'guifg=#' . c[0] . ' ctermfg=' . c[1] . ' ' 241 | endif 242 | endif 243 | 244 | if a:0 >= 1 && strlen(a:1) 245 | if a:1 == 'bg' 246 | let histring .= 'guibg=bg ctermbg=bg ' 247 | elseif a:fg == 'fg' 248 | let histring .= 'guibg=fg ctermbg=fg ' 249 | elseif a:1 == 'none' 250 | let histring .= 'guibg=NONE ctermbg=NONE ' 251 | else 252 | let c = get(s:gb, a:1) 253 | let histring .= 'guibg=#' . c[0] . ' ctermbg=' . c[1] . ' ' 254 | endif 255 | else 256 | let histring .= 'guibg=NONE ctermbg=NONE ' 257 | endif 258 | 259 | " Hotfixing #24; 260 | " TODO: get rid of this spaghetti 261 | if a:0 >= 2 && strlen(a:2) 262 | if a:2 == 'none' 263 | let histring .= 'gui=NONE cterm=NONE ' 264 | elseif a:2 == 'italic' && g:gruvbox_italic == 0 265 | let histring .= 'gui=NONE cterm=NONE ' 266 | elseif a:2 == 'bold' && g:gruvbox_bold == 0 267 | let histring .= 'gui=NONE cterm=NONE ' 268 | elseif a:2 == 'bold,inverse' && g:gruvbox_bold == 0 269 | let histring .= 'gui=inverse cterm=inverse ' 270 | elseif a:2 == 'undercurl' && g:gruvbox_undercurl == 0 271 | let histring .= 'gui=NONE cterm=NONE ' 272 | elseif a:2 == 'underline' && g:gruvbox_underline == 0 273 | let histring .= 'gui=NONE cterm=NONE ' 274 | elseif a:2 == 'bold,italic' 275 | if g:gruvbox_italic == 0 && g:gruvbox_bold == 0 276 | let histring .= 'gui=NONE cterm=NONE ' 277 | elseif g:gruvbox_italic == 0 278 | let histring .= 'gui=bold cterm=bold ' 279 | elseif g:gruvbox_bold == 0 280 | let histring .= 'gui=italic cterm=italic ' 281 | else 282 | let histring .= 'gui=' . a:2 . ' cterm=' . a:2 . ' ' 283 | endif 284 | elseif a:2 == 'bold,underline' 285 | if g:gruvbox_underline == 0 && g:gruvbox_bold == 0 286 | let histring .= 'gui=NONE cterm=NONE ' 287 | elseif g:gruvbox_underline == 0 288 | let histring .= 'gui=bold cterm=bold ' 289 | elseif g:gruvbox_bold == 0 290 | let histring .= 'gui=underline cterm=underline ' 291 | else 292 | let histring .= 'gui=' . a:2 . ' cterm=' . a:2 . ' ' 293 | endif 294 | elseif a:2 == 'underline,italic' 295 | if g:gruvbox_underline == 0 && g:gruvbox_italic == 0 296 | let histring .= 'gui=NONE cterm=NONE ' 297 | elseif g:gruvbox_underline == 0 298 | let histring .= 'gui=italic cterm=italic ' 299 | elseif g:gruvbox_italic == 0 300 | let histring .= 'gui=underline cterm=underline ' 301 | else 302 | let histring .= 'gui=' . a:2 . ' cterm=' . a:2 . ' ' 303 | endif 304 | elseif a:2 == 'bold,underline,italic' 305 | if g:gruvbox_italic == 0 && g:gruvbox_bold == 0 306 | let histring .= 'gui=underline cterm=underline ' 307 | elseif g:gruvbox_italic == 0 308 | let histring .= 'gui=bold,underline cterm=bold,underline ' 309 | elseif g:gruvbox_bold == 0 310 | let histring .= 'gui=italic,underline cterm=italic,underline ' 311 | else 312 | let histring .= 'gui=' . a:2 . ' cterm=' . a:2 . ' ' 313 | endif 314 | else 315 | let histring .= 'gui=' . a:2 . ' cterm=' . a:2 . ' ' 316 | endif 317 | else 318 | let histring .= 'gui=NONE cterm=NONE ' 319 | endif 320 | 321 | if a:0 >= 3 && strlen(a:3) 322 | if a:3 == 'none' 323 | let histring .= 'guisp=NONE ' 324 | else 325 | let c = get(s:gb, a:3) 326 | let histring .= 'guisp=#' . c[0] . ' ' 327 | endif 328 | endif 329 | 330 | execute histring 331 | endfunction 332 | 333 | " }}} 334 | 335 | " Vanilla colorscheme --------------------------------------------------------- 336 | " General UI: {{{ 337 | 338 | " Normal text 339 | call s:HL('Normal', 'light1', 'dark0') 340 | 341 | " Correct background (see issue #7): 342 | " --- Problem with changing between dark and light on 256 color terminal 343 | " --- https://github.com/morhetz/gruvbox/issues/7 344 | if s:is_dark 345 | set background=dark 346 | else 347 | set background=light 348 | endif 349 | 350 | if version >= 700 351 | " Screen line that the cursor is 352 | call s:HL('CursorLine', 'none', 'dark1') 353 | " Screen column that the cursor is 354 | call s:HL('CursorColumn', 'none', 'dark1') 355 | 356 | if g:gruvbox_invert_tabline == 0 357 | " Tab pages line filler 358 | call s:HL('TabLineFill', 'dark4', 'bg') 359 | " Active tab page label 360 | call s:HL('TabLineSel', 'bg', 'dark4', 'bold') 361 | " Not active tab page label 362 | call s:HL('TabLine', 'dark4', 'bg') 363 | else 364 | call s:HL('TabLineFill', 'bg', 'dark4') 365 | call s:HL('TabLineSel', 'dark4', 'bg', 'bold') 366 | call s:HL('TabLine', 'bg', 'dark4') 367 | endif 368 | 369 | " Match paired bracket under the cursor 370 | call s:HL('MatchParen', 'none', 'dark3', 'bold') 371 | endif 372 | 373 | if version >= 703 374 | " Highlighted screen columns 375 | call s:HL('ColorColumn', 'none', g:gruvbox_color_column) 376 | 377 | " Concealed element: \lambda → λ 378 | call s:HL('Conceal', 'blue', 'none') 379 | 380 | " Line number of CursorLine 381 | call s:HL('CursorLineNr', 'yellow', 'dark1') 382 | endif 383 | 384 | call s:HL('NonText', 'dark2') 385 | call s:HL('SpecialKey', 'dark2') 386 | 387 | if g:gruvbox_invert_selection == 0 388 | call s:HL('Visual', 'none', 'dark2') 389 | call s:HL('VisualNOS', 'none', 'dark2') 390 | else 391 | call s:HL('Visual', 'none', 'dark3', 'inverse') 392 | call s:HL('VisualNOS', 'none', 'dark3', 'inverse') 393 | endif 394 | 395 | call s:HL('Search', 'dark0', 'yellow') 396 | call s:HL('IncSearch', 'dark0', g:gruvbox_hls_cursor) 397 | 398 | call s:HL('Underlined', 'blue', 'none', 'underline') 399 | 400 | call s:HL('StatusLine', 'dark4', 'dark0', 'bold,inverse') 401 | call s:HL('StatusLineNC', 'dark2', 'light4', 'bold,inverse') 402 | 403 | " The column separating vertically split windows 404 | call s:HL('VertSplit', 'light4', g:gruvbox_vert_split) 405 | 406 | " Current match in wildmenu completion 407 | call s:HL('WildMenu', 'blue', 'dark2', 'bold') 408 | 409 | " Directory names, special names in listing 410 | call s:HL('Directory', 'green', 'none', 'bold') 411 | 412 | " Titles for output from :set all, :autocmd, etc. 413 | call s:HL('Title', 'green', 'none', 'bold') 414 | 415 | " Error messages on the command line 416 | call s:HL('ErrorMsg', 'bg', 'red', 'bold') 417 | " More prompt: -- More -- 418 | call s:HL('MoreMsg', 'yellow', 'none', 'bold') 419 | " Current mode message: -- INSERT -- 420 | call s:HL('ModeMsg', 'yellow', 'none', 'bold') 421 | " 'Press enter' prompt and yes/no questions 422 | call s:HL('Question', 'orange', 'none', 'bold') 423 | " Warning messages 424 | call s:HL('WarningMsg', 'red', 'none', 'bold') 425 | 426 | " }}} 427 | " Gutter: {{{ 428 | 429 | " Line number for :number and :# commands 430 | call s:HL('LineNr', 'dark4') 431 | 432 | " Column where signs are displayed 433 | call s:HL('SignColumn', 'none', g:gruvbox_sign_column) 434 | 435 | " Line used for closed folds 436 | call s:HL('Folded', 'medium', 'dark1', 'italic') 437 | " Column where folds are displayed 438 | call s:HL('FoldColumn', 'medium', 'dark1') 439 | 440 | " }}} 441 | " Cursor: {{{ 442 | 443 | " Character under cursor 444 | call s:HL('Cursor', 'none', 'none', 'inverse') 445 | " Visual mode cursor, selection 446 | call s:HL('vCursor', 'none', 'none', 'inverse') 447 | " Input moder cursor 448 | call s:HL('iCursor', 'none', 'none', 'inverse') 449 | " Language mapping cursor 450 | call s:HL('lCursor', 'none', 'none', 'inverse') 451 | 452 | " }}} 453 | " Syntax Highlighting: {{{ 454 | 455 | if g:gruvbox_improved_strings == 0 456 | call s:HL('Special', 'orange') 457 | else 458 | call s:HL('Special', 'dark1', 'orange', 'italic') 459 | endif 460 | 461 | if g:gruvbox_italicize_comments == 0 462 | call s:HL('Comment', 'medium', 'none') 463 | else 464 | call s:HL('Comment', 'medium', 'none', 'italic') 465 | endif 466 | call s:HL('Todo', 'fg', 'bg', 'bold') 467 | call s:HL('Error', 'bg', 'red', 'bold') 468 | 469 | " Generic statement 470 | call s:HL('Statement', 'red') 471 | " if, then, else, endif, swicth, etc. 472 | call s:HL('Conditional', 'red') 473 | " for, do, while, etc. 474 | call s:HL('Repeat', 'red') 475 | " case, default, etc. 476 | call s:HL('Label', 'red') 477 | " try, catch, throw 478 | call s:HL('Exception', 'red') 479 | " sizeof, "+", "*", etc. 480 | hi! link Operator Normal 481 | " Any other keyword 482 | call s:HL('Keyword', 'red') 483 | 484 | " Variable name 485 | call s:HL('Identifier', 'blue') 486 | " Function name 487 | call s:HL('Function', 'green', 'none', 'bold') 488 | 489 | " Generic preprocessor 490 | call s:HL('PreProc', 'aqua') 491 | " Preprocessor #include 492 | call s:HL('Include', 'aqua') 493 | " Preprocessor #define 494 | call s:HL('Define', 'aqua') 495 | " Same as Define 496 | call s:HL('Macro', 'aqua') 497 | " Preprocessor #if, #else, #endif, etc. 498 | call s:HL('PreCondit', 'aqua') 499 | 500 | " Generic constant 501 | call s:HL('Constant', 'purple') 502 | " Character constant: 'c', '/n' 503 | call s:HL('Character', 'purple') 504 | " String constant: "this is a string" 505 | if g:gruvbox_italicize_strings == 0 506 | call s:HL('String', 'green') 507 | else 508 | if g:gruvbox_improved_strings == 0 509 | call s:HL('String', 'green', 'none', 'italic') 510 | else 511 | call s:HL('String', 'dark1', 'light1', 'italic') 512 | endif 513 | endif 514 | " Boolean constant: TRUE, false 515 | call s:HL('Boolean', 'purple') 516 | " Number constant: 234, 0xff 517 | call s:HL('Number', 'purple') 518 | " Floating point constant: 2.3e10 519 | call s:HL('Float', 'purple') 520 | 521 | " Generic type 522 | call s:HL('Type', 'yellow') 523 | " static, register, volatile, etc 524 | call s:HL('StorageClass', 'orange') 525 | " struct, union, enum, etc. 526 | call s:HL('Structure', 'aqua') 527 | " typedef 528 | call s:HL('Typedef', 'yellow') 529 | 530 | " }}} 531 | " Completion Menu: {{{ 532 | 533 | if version >= 700 534 | " Popup menu: normal item 535 | call s:HL('Pmenu', 'light1', 'dark2') 536 | " Popup menu: selected item 537 | call s:HL('PmenuSel', 'dark2', 'blue', 'bold') 538 | " Popup menu: scrollbar 539 | call s:HL('PmenuSbar', 'none', 'dark2') 540 | " Popup menu: scrollbar thumb 541 | call s:HL('PmenuThumb', 'none', 'dark4') 542 | endif 543 | 544 | " }}} 545 | " Diffs: {{{ 546 | 547 | call s:HL('DiffDelete', 'dark0', 'red') 548 | call s:HL('DiffAdd', 'dark0', 'green') 549 | "call s:HL('DiffChange', 'dark0', 'blue') 550 | "call s:HL('DiffText', 'dark0', 'yellow') 551 | 552 | " Alternative setting 553 | call s:HL('DiffChange', 'dark0', 'aqua') 554 | call s:HL('DiffText', 'dark0', 'yellow') 555 | 556 | " }}} 557 | " Spelling: {{{ 558 | 559 | if has("spell") 560 | " Not capitalised word, or compile warnings 561 | if g:gruvbox_improved_warnings == 0 562 | call s:HL('SpellCap', 'none', 'none', 'undercurl', 'red') 563 | else 564 | call s:HL('SpellCap', 'green', 'none', 'italic,bold') 565 | endif 566 | " Not recognized word 567 | call s:HL('SpellBad', 'none', 'none', 'undercurl', 'blue') 568 | " Wrong spelling for selected region 569 | call s:HL('SpellLocal', 'none', 'none', 'undercurl', 'aqua') 570 | " Rare word 571 | call s:HL('SpellRare', 'none', 'none', 'undercurl', 'purple') 572 | endif 573 | 574 | " }}} 575 | 576 | " Plugin specific ------------------------------------------------------------- 577 | " EasyMotion: {{{ 578 | 579 | hi! link EasyMotionTarget Search 580 | hi! link EasyMotionShade Comment 581 | 582 | " }}} 583 | " Sneak: {{{ 584 | 585 | hi! link SneakPluginTarget Search 586 | hi! link SneakStreakTarget Search 587 | call s:HL('SneakStreakMask', 'yellow', 'yellow') 588 | hi! link SneakStreakStatusLine Search 589 | 590 | " }}} 591 | " Indent Guides: {{{ 592 | 593 | let g:indent_guides_auto_colors = 0 594 | 595 | if g:gruvbox_invert_indent_guides == 0 596 | call s:HL('IndentGuidesOdd', 'bg', 'dark2') 597 | call s:HL('IndentGuidesEven', 'bg', 'dark1') 598 | else 599 | call s:HL('IndentGuidesOdd', 'bg', 'dark2', 'inverse') 600 | call s:HL('IndentGuidesEven', 'bg', 'dark3', 'inverse') 601 | endif 602 | 603 | " }}} 604 | " IndentLine: {{{ 605 | 606 | let g:indentLine_color_term = s:gb.dark2[1] 607 | let g:indentLine_color_gui = '#' . s:gb.dark2[0] 608 | 609 | " }}} 610 | " Rainbow Parentheses: {{{ 611 | 612 | if !exists('g:rbpt_colorpairs') 613 | let g:rbpt_colorpairs = 614 | \ [ 615 | \ ['blue', '#458588'], ['magenta', '#b16286'], 616 | \ ['red', '#cc241d'], ['166', '#d65d0e'] 617 | \ ] 618 | endif 619 | 620 | let g:rainbow_guifgs = [ '#d65d0e', '#cc241d', '#b16286', '#458588' ] 621 | let g:rainbow_ctermfgs = [ '166', 'red', 'magenta', 'blue' ] 622 | 623 | if !exists('g:rainbow_conf') 624 | let g:rainbow_conf = {} 625 | endif 626 | if !has_key(g:rainbow_conf, 'guifgs') 627 | let g:rainbow_conf['guifgs'] = g:rainbow_guifgs 628 | endif 629 | if !has_key(g:rainbow_conf, 'ctermfgs') 630 | let g:rainbow_conf['ctermfgs'] = g:rainbow_ctermfgs 631 | endif 632 | 633 | let g:niji_dark_colours = g:rbpt_colorpairs 634 | let g:niji_light_colours = g:rbpt_colorpairs 635 | 636 | "}}} 637 | " GitGutter: {{{ 638 | 639 | if g:gruvbox_invert_signs == 0 640 | call s:HL('GitGutterAdd', 'green', g:gruvbox_sign_column) 641 | call s:HL('GitGutterChange', 'aqua', g:gruvbox_sign_column) 642 | call s:HL('GitGutterDelete', 'red', g:gruvbox_sign_column) 643 | call s:HL('GitGutterChangeDelete', 'aqua', g:gruvbox_sign_column) 644 | else 645 | call s:HL('GitGutterAdd', 'green', g:gruvbox_sign_column, 'inverse') 646 | call s:HL('GitGutterChange', 'aqua', g:gruvbox_sign_column, 'inverse') 647 | call s:HL('GitGutterDelete', 'red', g:gruvbox_sign_column, 'inverse') 648 | call s:HL('GitGutterChangeDelete', 'aqua', g:gruvbox_sign_column, 'inverse') 649 | endif 650 | 651 | " }}} 652 | " gitcommit highlighting "{{{ 653 | 654 | call s:HL('gitcommitSelectedFile', 'green') 655 | call s:HL('gitcommitDiscardedFile', 'red') 656 | 657 | " }}} 658 | " Signify: {{{ 659 | 660 | if g:gruvbox_invert_signs == 0 661 | call s:HL('SignifySignAdd', 'green', g:gruvbox_sign_column) 662 | call s:HL('SignifySignChange ', 'aqua', g:gruvbox_sign_column) 663 | call s:HL('SignifySignDelete', 'red', g:gruvbox_sign_column) 664 | else 665 | call s:HL('SignifySignAdd', 'green', g:gruvbox_sign_column, 'inverse') 666 | call s:HL('SignifySignChange ', 'aqua', g:gruvbox_sign_column, 'inverse') 667 | call s:HL('SignifySignDelete', 'red', g:gruvbox_sign_column, 'inverse') 668 | endif 669 | 670 | " }}} 671 | " Syntastic: {{{ 672 | 673 | call s:HL('SyntasticError', 'none', 'none', 'undercurl', 'red') 674 | call s:HL('SyntasticWarning', 'none', 'none', 'undercurl', 'yellow') 675 | 676 | if g:gruvbox_invert_signs == 0 677 | call s:HL('SyntasticErrorSign', 'red', g:gruvbox_sign_column) 678 | call s:HL('SyntasticWarningSign', 'yellow', g:gruvbox_sign_column) 679 | else 680 | call s:HL('SyntasticErrorSign', 'red', g:gruvbox_sign_column, 'inverse') 681 | call s:HL('SyntasticWarningSign', 'yellow', g:gruvbox_sign_column, 'inverse') 682 | endif 683 | 684 | " }}} 685 | " Signature: {{{ 686 | 687 | if g:gruvbox_invert_signs == 0 688 | call s:HL('SignatureMarkerText', 'purple', g:gruvbox_sign_column) 689 | call s:HL('SignatureMarkText', 'blue', g:gruvbox_sign_column) 690 | else 691 | call s:HL('SignatureMarkerText', 'purple', g:gruvbox_sign_column, 'inverse') 692 | call s:HL('SignatureMarkText', 'blue', g:gruvbox_sign_column, 'inverse') 693 | endif 694 | 695 | let g:SignatureMarkerTextHL='"SignatureMarkerText"' 696 | let g:SignatureMarkTextHL='"SignatureMarkText"' 697 | 698 | " }}} 699 | " ShowMarks: {{{ 700 | 701 | if g:gruvbox_invert_signs == 0 702 | call s:HL('ShowMarksHLl', 'blue', g:gruvbox_sign_column) 703 | call s:HL('ShowMarksHLu', 'blue', g:gruvbox_sign_column) 704 | call s:HL('ShowMarksHLo', 'blue', g:gruvbox_sign_column) 705 | call s:HL('ShowMarksHLm', 'blue', g:gruvbox_sign_column) 706 | else 707 | call s:HL('ShowMarksHLl', 'blue', g:gruvbox_sign_column, 'inverse') 708 | call s:HL('ShowMarksHLu', 'blue', g:gruvbox_sign_column, 'inverse') 709 | call s:HL('ShowMarksHLo', 'blue', g:gruvbox_sign_column, 'inverse') 710 | call s:HL('ShowMarksHLm', 'blue', g:gruvbox_sign_column, 'inverse') 711 | endif 712 | 713 | " }}} 714 | " CtrlP: {{{ 715 | 716 | call s:HL('CtrlPMatch', 'yellow') 717 | call s:HL('CtrlPNoEntries', 'red') 718 | call s:HL('CtrlPPrtBase', 'dark2') 719 | call s:HL('CtrlPPrtCursor', 'blue') 720 | call s:HL('CtrlPLinePre', 'dark2') 721 | 722 | call s:HL('CtrlPMode1', 'blue', 'dark2', 'bold') 723 | call s:HL('CtrlPMode2', 'dark0', 'blue', 'bold') 724 | call s:HL('CtrlPStats', 'light4', 'dark2', 'bold') 725 | 726 | " }}} 727 | " Startify: {{{ 728 | 729 | call s:HL('StartifyBracket', 'light3') 730 | call s:HL('StartifyFile', 'light0') 731 | call s:HL('StartifyNumber', 'blue') 732 | call s:HL('StartifyPath', 'medium') 733 | call s:HL('StartifySlash', 'medium') 734 | call s:HL('StartifySection', 'yellow') 735 | call s:HL('StartifySpecial', 'dark2') 736 | call s:HL('StartifyHeader', 'orange') 737 | call s:HL('StartifyFooter', 'dark2') 738 | 739 | " }}} 740 | " Vimshell: {{{ 741 | 742 | let g:vimshell_escape_colors = map(split( 743 | \ 'dark4 red green yellow blue purple aqua light4 ' . 744 | \ 'dark0 red green orange blue purple aqua light0' 745 | \ ), '"#" . s:gb[v:val][0]') 746 | 747 | " }}} 748 | 749 | " Filetype specific ----------------------------------------------------------- 750 | " Diff: {{{ 751 | 752 | call s:HL('diffAdded', 'green') 753 | call s:HL('diffRemoved', 'red') 754 | call s:HL('diffChanged', 'aqua') 755 | 756 | call s:HL('diffFile', 'orange') 757 | call s:HL('diffNewFile', 'yellow') 758 | 759 | call s:HL('diffLine', 'blue') 760 | 761 | " }}} 762 | " Html: {{{ 763 | 764 | call s:HL('htmlTag', 'blue') 765 | call s:HL('htmlEndTag', 'blue') 766 | 767 | call s:HL('htmlTagName', 'aqua', 'none', 'bold') 768 | call s:HL('htmlArg', 'aqua') 769 | 770 | call s:HL('htmlScriptTag', 'purple') 771 | call s:HL('htmlTagN', 'light1') 772 | call s:HL('htmlSpecialTagName', 'aqua', 'none', 'bold') 773 | 774 | call s:HL('htmlLink', 'light4', 'none', 'underline') 775 | 776 | call s:HL('htmlSpecialChar', 'orange') 777 | 778 | call s:HL('htmlBold', 'fg', 'bg', 'bold') 779 | call s:HL('htmlBoldUnderline', 'fg', 'bg', 'bold,underline') 780 | call s:HL('htmlBoldItalic', 'fg', 'bg', 'bold,italic') 781 | call s:HL('htmlBoldUnderlineItalic', 'fg', 'bg', 'bold,underline,italic') 782 | 783 | call s:HL('htmlUnderline', 'fg', 'bg', 'underline') 784 | call s:HL('htmlUnderlineItalic', 'fg', 'bg', 'underline,italic') 785 | call s:HL('htmlItalic', 'fg', 'bg', 'italic') 786 | 787 | " }}} 788 | " Xml: {{{ 789 | 790 | call s:HL('xmlTag', 'blue') 791 | call s:HL('xmlEndTag', 'blue') 792 | call s:HL('xmlTagName', 'blue') 793 | call s:HL('xmlEqual', 'blue') 794 | call s:HL('docbkKeyword', 'aqua', 'none', 'bold') 795 | 796 | call s:HL('xmlDocTypeDecl', 'medium') 797 | call s:HL('xmlDocTypeKeyword', 'purple') 798 | call s:HL('xmlCdataStart', 'medium') 799 | call s:HL('xmlCdataCdata', 'purple') 800 | call s:HL('dtdFunction', 'medium') 801 | call s:HL('dtdTagName', 'purple') 802 | 803 | call s:HL('xmlAttrib', 'aqua') 804 | call s:HL('xmlProcessingDelim', 'medium') 805 | call s:HL('dtdParamEntityPunct', 'medium') 806 | call s:HL('dtdParamEntityDPunct', 'medium') 807 | call s:HL('xmlAttribPunct', 'medium') 808 | 809 | call s:HL('xmlEntity', 'orange') 810 | call s:HL('xmlEntityPunct', 'orange') 811 | " }}} 812 | " Vim: {{{ 813 | 814 | if g:gruvbox_italicize_comments == 0 815 | call s:HL('vimCommentTitle', 'light4_256', 'none', 'bold') 816 | else 817 | call s:HL('vimCommentTitle', 'light4_256', 'none', 'bold,italic') 818 | endif 819 | call s:HL('vimNotation', 'orange') 820 | call s:HL('vimBracket', 'orange') 821 | call s:HL('vimMapModKey', 'orange') 822 | call s:HL('vimFuncSID', 'light3') 823 | call s:HL('vimSetSep', 'light3') 824 | call s:HL('vimSep', 'light3') 825 | call s:HL('vimContinue', 'light3') 826 | 827 | " }}} 828 | " Clojure: {{{ 829 | 830 | call s:HL('clojureKeyword', 'blue') 831 | call s:HL('clojureCond', 'orange') 832 | call s:HL('clojureSpecial', 'orange') 833 | call s:HL('clojureDefine', 'orange') 834 | 835 | call s:HL('clojureFunc', 'yellow') 836 | call s:HL('clojureRepeat', 'yellow') 837 | call s:HL('clojureCharacter', 'aqua') 838 | call s:HL('clojureStringEscape', 'aqua') 839 | call s:HL('clojureException', 'red') 840 | 841 | call s:HL('clojureRegexp', 'aqua') 842 | call s:HL('clojureRegexpEscape', 'aqua') 843 | call s:HL('clojureRegexpCharClass', 'light3', 'none', 'bold') 844 | call s:HL('clojureRegexpMod', 'light3', 'none', 'bold') 845 | call s:HL('clojureRegexpQuantifier', 'light3', 'none', 'bold') 846 | 847 | call s:HL('clojureParen', 'light3') 848 | call s:HL('clojureAnonArg', 'yellow') 849 | call s:HL('clojureVariable', 'blue') 850 | call s:HL('clojureMacro', 'orange') 851 | 852 | call s:HL('clojureMeta', 'yellow') 853 | call s:HL('clojureDeref', 'yellow') 854 | call s:HL('clojureQuote', 'yellow') 855 | call s:HL('clojureUnquote', 'yellow') 856 | 857 | " }}} 858 | " C: {{{ 859 | 860 | call s:HL('cOperator', 'purple') 861 | call s:HL('cStructure', 'orange') 862 | 863 | " }}} 864 | " Python: {{{ 865 | 866 | call s:HL('pythonBuiltin', 'orange') 867 | call s:HL('pythonBuiltinObj', 'orange') 868 | call s:HL('pythonBuiltinFunc', 'orange') 869 | call s:HL('pythonFunction', 'aqua') 870 | call s:HL('pythonDecorator', 'red') 871 | call s:HL('pythonInclude', 'blue') 872 | call s:HL('pythonImport', 'blue') 873 | call s:HL('pythonRun', 'blue') 874 | call s:HL('pythonCoding', 'blue') 875 | call s:HL('pythonOperator', 'red') 876 | call s:HL('pythonExceptions', 'purple') 877 | call s:HL('pythonBoolean', 'purple') 878 | call s:HL('pythonDot', 'light3') 879 | 880 | " }}} 881 | " CSS: {{{ 882 | 883 | call s:HL('cssBraces', 'blue') 884 | call s:HL('cssFunctionName', 'yellow') 885 | call s:HL('cssIdentifier', 'orange') 886 | call s:HL('cssClassName', 'green') 887 | call s:HL('cssColor', 'blue') 888 | call s:HL('cssSelectorOp', 'blue') 889 | call s:HL('cssSelectorOp2', 'blue') 890 | call s:HL('cssImportant', 'green') 891 | call s:HL('cssVendor', 'light1') 892 | 893 | call s:HL('cssTextProp', 'aqua') 894 | call s:HL('cssAnimationProp', 'aqua') 895 | call s:HL('cssUIProp', 'yellow') 896 | call s:HL('cssTransformProp', 'aqua') 897 | call s:HL('cssTransitionProp', 'aqua') 898 | call s:HL('cssPrintProp', 'aqua') 899 | call s:HL('cssPositioningProp', 'yellow') 900 | call s:HL('cssBoxProp', 'aqua') 901 | call s:HL('cssFontDescriptorProp', 'aqua') 902 | call s:HL('cssFlexibleBoxProp', 'aqua') 903 | call s:HL('cssBorderOutlineProp', 'aqua') 904 | call s:HL('cssBackgroundProp', 'aqua') 905 | call s:HL('cssMarginProp', 'aqua') 906 | call s:HL('cssListProp', 'aqua') 907 | call s:HL('cssTableProp', 'aqua') 908 | call s:HL('cssFontProp', 'aqua') 909 | call s:HL('cssPaddingProp', 'aqua') 910 | call s:HL('cssDimensionProp', 'aqua') 911 | call s:HL('cssRenderProp', 'aqua') 912 | call s:HL('cssColorProp', 'aqua') 913 | call s:HL('cssGeneratedContentProp', 'aqua') 914 | 915 | " }}} 916 | " JavaScript: {{{ 917 | 918 | call s:HL('javaScriptBraces', 'orange') 919 | call s:HL('javaScriptFunction', 'aqua') 920 | call s:HL('javaScriptIdentifier', 'red') 921 | call s:HL('javaScriptMember', 'blue') 922 | call s:HL('javaScriptNumber', 'purple') 923 | call s:HL('javaScriptNull', 'purple') 924 | call s:HL('javaScriptParens', 'light3') 925 | 926 | " }}} 927 | " CoffeeScript: {{{ 928 | 929 | call s:HL('coffeeExtendedOp', 'light3') 930 | call s:HL('coffeeSpecialOp', 'light3') 931 | call s:HL('coffeeCurly', 'orange') 932 | call s:HL('coffeeParen', 'light3') 933 | call s:HL('coffeeBracket', 'orange') 934 | 935 | " }}} 936 | " Ruby: {{{ 937 | 938 | call s:HL('rubyStringDelimiter', 'green') 939 | call s:HL('rubyInterpolationDelimiter', 'aqua') 940 | 941 | " }}} 942 | " ObjectiveC: {{{ 943 | 944 | call s:HL('objcTypeModifier', 'red') 945 | call s:HL('objcDirective', 'blue') 946 | 947 | " }}} 948 | " Go: {{{ 949 | 950 | call s:HL('goDirective', 'aqua') 951 | call s:HL('goConstants', 'purple') 952 | call s:HL('goDeclaration', 'red') 953 | call s:HL('goDeclType', 'blue') 954 | call s:HL('goBuiltins', 'orange') 955 | 956 | " }}} 957 | " Lua: {{{ 958 | 959 | call s:HL('luaIn', 'red') 960 | call s:HL('luaFunction', 'aqua') 961 | call s:HL('luaTable', 'orange') 962 | 963 | " }}} 964 | " MoonScript: {{{ 965 | 966 | call s:HL('moonSpecialOp', 'light3') 967 | call s:HL('moonExtendedOp', 'light3') 968 | call s:HL('moonFunction', 'light3') 969 | call s:HL('moonObject', 'yellow') 970 | 971 | " }}} 972 | " Java: {{{ 973 | 974 | call s:HL('javaAnnotation', 'blue') 975 | call s:HL('javaDocTags', 'aqua') 976 | hi! link javaCommentTitle vimCommentTitle 977 | call s:HL('javaParen', 'light3') 978 | call s:HL('javaParen1', 'light3') 979 | call s:HL('javaParen2', 'light3') 980 | call s:HL('javaParen3', 'light3') 981 | call s:HL('javaParen4', 'light3') 982 | call s:HL('javaParen5', 'light3') 983 | call s:HL('javaOperator', 'orange') 984 | 985 | call s:HL('javaVarArg', 'green') 986 | 987 | " }}} 988 | " Elixir: {{{ 989 | 990 | hi! link elixirDocString Comment 991 | 992 | call s:HL('elixirStringDelimiter', 'green') 993 | call s:HL('elixirInterpolationDelimiter', 'aqua') 994 | 995 | " }}} 996 | " Scala: {{{ 997 | 998 | " NB: scala vim syntax file is kinda horrible 999 | call s:HL('scalaNameDefinition', 'light1') 1000 | call s:HL('scalaCaseFollowing', 'light1') 1001 | call s:HL('scalaCapitalWord', 'light1') 1002 | call s:HL('scalaTypeExtension', 'light1') 1003 | 1004 | call s:HL('scalaKeyword', 'red') 1005 | call s:HL('scalaKeywordModifier', 'red') 1006 | 1007 | call s:HL('scalaSpecial', 'aqua') 1008 | call s:HL('scalaOperator', 'light1') 1009 | 1010 | call s:HL('scalaTypeDeclaration', 'yellow') 1011 | call s:HL('scalaTypeTypePostDeclaration', 'yellow') 1012 | 1013 | call s:HL('scalaInstanceDeclaration', 'light1') 1014 | call s:HL('scalaInterpolation', 'aqua') 1015 | 1016 | " }}} 1017 | " Markdown: {{{ 1018 | 1019 | call s:HL('markdownItalic', 'light3', 'none', 'italic') 1020 | 1021 | call s:HL('markdownH1', 'green', 'none', 'bold') 1022 | call s:HL('markdownH2', 'green', 'none', 'bold') 1023 | call s:HL('markdownH3', 'yellow', 'none', 'bold') 1024 | call s:HL('markdownH4', 'yellow', 'none', 'bold') 1025 | call s:HL('markdownH5', 'yellow') 1026 | call s:HL('markdownH6', 'yellow') 1027 | 1028 | call s:HL('markdownCode', 'aqua') 1029 | call s:HL('markdownCodeBlock', 'aqua') 1030 | call s:HL('markdownCodeDelimiter', 'aqua') 1031 | 1032 | call s:HL('markdownBlockquote', 'medium') 1033 | call s:HL('markdownListMarker', 'medium') 1034 | call s:HL('markdownOrderedListMarker', 'medium') 1035 | call s:HL('markdownRule', 'medium') 1036 | call s:HL('markdownHeadingRule', 'medium') 1037 | 1038 | call s:HL('markdownUrlDelimiter', 'light3') 1039 | call s:HL('markdownLinkDelimiter', 'light3') 1040 | call s:HL('markdownLinkTextDelimiter', 'light3') 1041 | 1042 | call s:HL('markdownHeadingDelimiter', 'orange') 1043 | call s:HL('markdownUrl', 'purple') 1044 | call s:HL('markdownUrlTitleDelimiter', 'green') 1045 | 1046 | call s:HL('markdownLinkText', 'medium', 'none', 'underline') 1047 | call s:HL('markdownIdDeclaration', 'medium', 'none', 'underline') 1048 | 1049 | " }}} 1050 | 1051 | " Functions ------------------------------------------------------------------- 1052 | " Search Highlighting Cursor {{{ 1053 | 1054 | function! GruvboxHlsShowCursor() 1055 | call s:HL('Cursor', 'dark0', g:gruvbox_hls_cursor) 1056 | call s:HL('vCursor', 'dark0', g:gruvbox_hls_cursor) 1057 | call s:HL('iCursor', 'dark0', g:gruvbox_hls_cursor) 1058 | call s:HL('lCursor', 'dark0', g:gruvbox_hls_cursor) 1059 | endfunction 1060 | 1061 | function! GruvboxHlsHideCursor() 1062 | call s:HL('Cursor', 'none', 'none', 'inverse') 1063 | call s:HL('vCursor', 'none', 'none', 'inverse') 1064 | call s:HL('iCursor', 'none', 'none', 'inverse') 1065 | call s:HL('lCursor', 'none', 'none', 'inverse') 1066 | endfunction 1067 | 1068 | " }}} 1069 | 1070 | " vim: set sw=3 ts=3 sts=3 noet tw=80 ft=vim fdm=marker: 1071 | --------------------------------------------------------------------------------