├── .bash_profile ├── .gitconfig ├── .gitignore_global ├── .tmux-cssh ├── .tmux.conf ├── README.md ├── allacritty └── alacritty.yml ├── bootstrap.sh ├── git.sh ├── install_apps.sh ├── log.sh ├── nvim ├── colors │ └── gruvbox.vim └── init.vim ├── osx.sh ├── python.sh ├── screenshot.png ├── uninstall.sh └── vim.sh /.bash_profile: -------------------------------------------------------------------------------- 1 | # Set CLICOLOR if you want Ansi Colors in iTerm2 2 | export CLICOLOR=1 3 | 4 | # Set colors to match iTerm2 Terminal Colors 5 | export TERM=xterm-256color 6 | 7 | export PATH="$PATH:$HOME/.rvm/bin" 8 | 9 | export GOPATH=$HOME/golang 10 | export GOROOT=/usr/local/opt/go/libexec 11 | export GOBIN=$HOME/golang/bin 12 | export PATH=$PATH:$GOPATH/bin 13 | export PATH=$PATH:$GOROOT/bin 14 | export JAVA_HOME="/Library/Java/JavaVirtualMachines/jdk1.8.0_112.jdk/Contents/Home" 15 | 16 | # Git Aliases 17 | alias gs='git status' 18 | alias gl='git log' 19 | alias gp='git push' 20 | alias gpo='git push origin' 21 | alias gpurb='git pull --rebase' 22 | alias gpu='git pull' 23 | alias gc='git commit -m' 24 | alias gu='git add -u' 25 | alias ga='git add -A' 26 | alias grmc='git rm -r --cached' 27 | alias gru='git clean -d -fx ""' 28 | alias gf='git diff' 29 | alias gcb='git checkout -B' 30 | alias gv='git log --graph --decorate --oneline' 31 | 32 | # Forgot root 33 | alias fuck='sudo $(history -p \!\!)' 34 | 35 | # Docker alias 36 | alias dck-stop-all='docker stop $(docker ps -a -q)' 37 | alias dck-rm-all='docker rm $(docker ps -a -q)' 38 | 39 | 40 | # AWS envvars 41 | export AWS_ACCESS_KEY_ID="foo" 42 | export AWS_ACCESS_KEY="bar" 43 | export AWS_SECRET_ACCESS_KEY="foo" 44 | export AWS_SECRET_KEY="bar" 45 | 46 | # Swift 47 | export PATH=/Library/Developer/Toolchains/swift-latest.xctoolchain/usr/bin:"${PATH}" 48 | 49 | # Swiftenv 50 | export SWIFTENV_ROOT="$HOME/.swiftenv" 51 | export PATH="$SWIFTENV_ROOT/bin:$PATH" 52 | eval "$(swiftenv init -)" 53 | 54 | # tmuxinator 55 | source ~/.bin/tmuxinator.zsh 56 | . $HOME/.asdf/asdf.sh 57 | 58 | 59 | -------------------------------------------------------------------------------- /.gitconfig: -------------------------------------------------------------------------------- 1 | [user] 2 | name = Vinicius Souza 3 | email = vinicius@codemakers.com.br 4 | [color] 5 | diff = auto 6 | status = auto 7 | ui = true 8 | [color "branch"] 9 | current = yellow reverse 10 | local = yellow 11 | remote = green 12 | [color "diff"] 13 | meta = yellow bold 14 | frag = magenta bold 15 | old = red bold 16 | new = green bold 17 | [color "status"] 18 | added = cyan bold 19 | branch = cyan bold 20 | changed = magenta bold 21 | deleted = red bold 22 | untracked = yellow bold 23 | [push] 24 | default = simple 25 | [core] 26 | excludesfile = ~/.gitignore_global 27 | editor = vim 28 | [credential] 29 | helper = osxkeychain 30 | useHttpPath = true 31 | -------------------------------------------------------------------------------- /.gitignore_global: -------------------------------------------------------------------------------- 1 | # Mac OS X generated files 2 | .DS_Store 3 | .DS_Store? 4 | ._* 5 | .Spotlight-V100 6 | .Trashes 7 | ehthumbs.db 8 | Thumbs.db 9 | .swp 10 | tags 11 | -------------------------------------------------------------------------------- /.tmux-cssh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vsouza/dotfiles/449b4eab128a0af0a9fb5bf0735828d453ee4521/.tmux-cssh -------------------------------------------------------------------------------- /.tmux.conf: -------------------------------------------------------------------------------- 1 | # Split windows 2 | bind | split-window -h 3 | bind - split-window -v 4 | 5 | setw -g mode-keys vi 6 | bind-key -t vi-copy v begin-selection 7 | # copy selected text to the system's clipboard 8 | bind-key -t vi-copy y copy-pipe "reattach-to-user-namespace pbcopy" 9 | 10 | set -g base-index 1 # window index from 1, not zero 11 | set -s escape-time 0 12 | 13 | bind r source-file ~/.tmux.conf \; display "Reloaded!" 14 | 15 | set-option -g allow-rename off # prevent system from renaming our window 16 | 17 | 18 | set -g default-terminal "screen-256color" 19 | 20 | set -g status-justify left 21 | set -g status-interval 1 22 | set -g status-position top 23 | set -g status-bg colour234 24 | set -g status-fg colour137 25 | set -g status-attr dim 26 | set -g status-left '' 27 | 28 | # status 29 | set -g status-right '#[fg=colour233,bg=colour241,bold] %d/%m #[fg=colour233,bg=colour245,bold] %H:%M:%S ' 30 | set -g status-right-length 50 31 | set -g status-left-length 20 32 | 33 | # windows Prefix+w 34 | setw -g clock-mode-colour colour135 35 | setw -g mode-attr bold 36 | setw -g mode-fg colour15 37 | setw -g mode-bg colour238 38 | 39 | # pane border 40 | set -g pane-border-bg colour235 41 | set -g pane-border-fg colour238 42 | set -g pane-active-border-bg colour236 43 | set -g pane-active-border-fg colour15 44 | 45 | # status current windows 46 | setw -g window-status-current-fg colour81 47 | setw -g window-status-current-bg colour238 48 | setw -g window-status-current-attr bold 49 | setw -g window-status-current-format ' #I#[fg=colour250]:#[fg=colour255]#W#[fg=colour50]#F ' 50 | 51 | # default status windows 52 | setw -g window-status-fg colour138 53 | setw -g window-status-bg colour235 54 | setw -g window-status-attr none 55 | setw -g window-status-format ' #I#[fg=colour237]:#[fg=colour250]#W#[fg=colour244]#F ' 56 | 57 | setw -g window-status-bell-attr bold 58 | setw -g window-status-bell-fg colour255 59 | setw -g window-status-bell-bg colour1 60 | 61 | # message 62 | set -g message-attr bold 63 | #set -g message-fg colour232 64 | set -g message-fg colour15 65 | set -g message-bg colour236 66 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # dotfiles 2 | 3 | ![Preview](screenshot.png) 4 | 5 | My Mac Settings and includes quite a select list of apps installed automatically 6 | 7 | __vim__ 8 | 9 | My setup came from this [repo](https://github.com/vsouza/.vimrc), if you wanna just vim setup, feel free to clone and 10 | contribute. 11 | 12 | __golang__ 13 | 14 | Golang setup in MacOSX it's very simple, check this [gist](https://gist.github.com/vsouza/77e6b20520d07652ed7d) 15 | 16 | __osx__ 17 | 18 | I have some customizations on my osx enviroment. Like a time for show and hide dock e etc. 19 | 20 | __apps__ 21 | 22 | Homebrew-cask is a nice project, i've added some apps to my bootstrap setup. If you want to add more, check this: 23 | [Homebrew-cask website](http://caskroom.io/) 24 | 25 | __python__ 26 | 27 | Ipdb and virtualenvwrapper it is included on this project. 28 | 29 | 30 | ## Install 31 | 32 | __Make sure that you already have installed xcode !__ 33 | 34 | ```sh 35 | $ curl -L https://raw.github.com/vsouza/dotfiles/master/bootstrap.sh | sh 36 | ``` 37 | 38 | This will clone this repository and symlink the appropriate files in `~/dotfiles` to your home directory. 39 | 40 | ## What's included? 41 | 42 | All my command-line tools and its configurations. Have fun :) 43 | 44 | #### Apps 45 | 46 | * Google Chrome 47 | * Sublime Text 48 | * Transmit 49 | * dash 50 | * robomongo 51 | * fitbit-connect 52 | * iTerm2 53 | * littleipsum 54 | * VirtualBox 55 | * Mysql Workbench 56 | * Vagrant 57 | * Skype 58 | * Spotify 59 | * Vlc Media Player 60 | * Cloud App 61 | * Keka 62 | * Caffeine 63 | * Transmission 64 | * Slack 65 | * Telegram 66 | * Razorsql 67 | 68 | 69 | #### Shell 70 | 71 | * [ZSH](http://www.zsh.org/) for shell 72 | * [Oh my ZSH](https://github.com/robbyrussell/oh-my-zsh) for ZSH tweaking 73 | 74 | ##### Theme 75 | 76 | * [Dracula](https://github.com/zenorocha/dracula-theme) by [@zenorocha](https://github.com/zenorocha) 77 | 78 | #### General 79 | 80 | * [Homebrew](http://mxcl.github.com/homebrew/) for MacOS X package management 81 | * [Homebrew Cask](http://caskroom.io/) to install apps easily 82 | * [Golang](http://golang.org) Google's language 83 | * [Git](http://git-scm.com) for code versioning 84 | 85 | #### .osx Configuration 86 | 87 | Thanks to [brandonb927](https://gist.github.com/brandonb927/3195465) for this great hack. 88 | 89 | ## Credits 90 | 91 | * This project is a customized version of: [@zenorocha old-dotfiles](https://github.com/zenorocha/old-dotfiles) 92 | 93 | ## License 94 | 95 | [MIT License](http://vsouza.mit-license.org/) © Vinicius Souza -------------------------------------------------------------------------------- /allacritty/alacritty.yml: -------------------------------------------------------------------------------- 1 | # Configuration for Alacritty, the GPU enhanced terminal emulator. 2 | 3 | # Any items in the `env` entry below will be added as 4 | # environment variables. Some entries may override variables 5 | # set by alacritty itself. 6 | env: 7 | # TERM variable 8 | # 9 | # This value is used to set the `$TERM` environment variable for 10 | # each instance of Alacritty. If it is not present, alacritty will 11 | # check the local terminfo database and use 'alacritty' if it is 12 | # available, otherwise 'xterm-256color' is used. 13 | TERM: xterm-256color 14 | 15 | window: 16 | # Window dimensions (changes require restart) 17 | # 18 | # Specified in number of columns/lines, not pixels. 19 | # If both are `0`, this setting is ignored. 20 | dimensions: 21 | columns: 160 22 | lines: 58 23 | 24 | # Window padding (changes require restart) 25 | # 26 | # Blank space added around the window in pixels. This padding is scaled 27 | # by DPI and the specified value is always added at both opposing sides. 28 | padding: 29 | x: 2 30 | y: 2 31 | 32 | # Spread additional padding evenly around the terminal content. 33 | dynamic_padding: false 34 | 35 | # Window decorations 36 | # 37 | # Available values: 38 | # - `full`: Window with title bar and title bar buttons 39 | # - `none`: Window without title bar, rounded corners, or drop shadow 40 | # - `transparent`: Window with title bar with transparent background and title 41 | # bar buttons 42 | # - `buttonless`: Window with title bar with transparent background and no 43 | # title bar buttons 44 | # Window decorations 45 | # 46 | # Values for `decorations`: 47 | # - full: Borders and title bar 48 | # - none: Neither borders nor title bar 49 | # - buttonless: Title bar, transparent background and title bar buttons 50 | # - transparent: Title bar, transparent background, but no title bar buttons 51 | decorations: buttonless 52 | 53 | # When true, alacritty starts maximized. 54 | start_maximized: false 55 | 56 | scrolling: 57 | # Maximum number of lines in the scrollback buffer. 58 | # Specifying '0' will disable scrolling. 59 | history: 10000 60 | 61 | # Number of lines the viewport will move for every line scrolled when 62 | # scrollback is enabled (history > 0). 63 | multiplier: 3 64 | 65 | # Faux Scrolling 66 | # 67 | # The `faux_multiplier` setting controls the number of lines the terminal 68 | # should scroll when the alternate screen buffer is active. This is used 69 | # to allow mouse scrolling for applications like `man`. 70 | # 71 | # Specifying `0` will disable faux scrolling. 72 | faux_multiplier: 3 73 | 74 | # Scroll to the bottom when new text is written to the terminal. 75 | auto_scroll: false 76 | 77 | # Spaces per Tab (changes require restart) 78 | # 79 | # This setting defines the width of a tab in cells. 80 | # 81 | # Some applications, like Emacs, rely on knowing about the width of a tab. 82 | # To prevent unexpected behavior in these applications, it's also required to 83 | # change the `it` value in terminfo when altering this setting. 84 | tabspaces: 4 85 | 86 | # Font configuration (changes require restart) 87 | font: 88 | # Normal (roman) font face 89 | normal: 90 | family: Hack 91 | style: Regular 92 | 93 | # Bold font face 94 | bold: 95 | family: Hack 96 | style: Bold 97 | 98 | # Italic font face 99 | italic: 100 | family: Hack 101 | style: Italic 102 | 103 | # Point size 104 | size: 11.5 105 | 106 | # Offset is the extra space around each character. `offset.y` can be thought of 107 | # as modifying the line spacing, and `offset.x` as modifying the letter spacing. 108 | offset: 109 | x: 0 110 | y: 0 111 | 112 | # Glyph offset determines the locations of the glyphs within their cells with 113 | # the default being at the bottom. Increasing `x` moves the glyph to the right, 114 | # increasing `y` moves the glyph upwards. 115 | glyph_offset: 116 | x: 0 117 | y: 0 118 | 119 | # Thin stroke font rendering (OS X only) 120 | # 121 | # Thin strokes are suitable for retina displays, but for non-retina screens 122 | # it is recommended to set `use_thin_strokes` to `false` 123 | # 124 | # macOS >= 10.14.x: 125 | # 126 | # If the font quality on non-retina display looks bad then set 127 | # `use_thin_strokes` to `true` and enable font smoothing by running the 128 | # following command: 129 | # `defaults write -g CGFontRenderingFontSmoothingDisabled -bool NO` 130 | # 131 | # This is a global setting and will require a log out or restart to take 132 | # effect. 133 | use_thin_strokes: true 134 | 135 | # Display the time it takes to redraw each frame. 136 | render_timer: false 137 | 138 | # Keep the log file after quitting Alacritty. 139 | persistent_logging: false 140 | 141 | # If `true`, bold text is drawn using the bright color variants. 142 | draw_bold_text_with_bright_colors: true 143 | 144 | # Colors (Tomorrow Night Bright) 145 | colors: 146 | # Default colors 147 | primary: 148 | background: '0x000000' 149 | foreground: '0xeaeaea' 150 | 151 | # Bright and dim foreground colors 152 | # 153 | # The dimmed foreground color is calculated automatically if it is not present. 154 | # If the bright foreground color is not set, or `draw_bold_text_with_bright_colors` 155 | # is `false`, the normal foreground color will be used. 156 | #dim_foreground: '0x9a9a9a' 157 | #bright_foreground: '0xffffff' 158 | 159 | # Cursor colors 160 | # 161 | # Colors which should be used to draw the terminal cursor. If these are unset, 162 | # the cursor color will be the inverse of the cell color. 163 | #cursor: 164 | # text: '0x000000' 165 | # cursor: '0xffffff' 166 | 167 | # Normal colors 168 | normal: 169 | black: '0x000000' 170 | red: '0xd54e53' 171 | green: '0xb9ca4a' 172 | yellow: '0xe6c547' 173 | blue: '0x7aa6da' 174 | magenta: '0xc397d8' 175 | cyan: '0x70c0ba' 176 | white: '0xffffff' 177 | 178 | # Bright colors 179 | bright: 180 | black: '0x666666' 181 | red: '0xff3334' 182 | green: '0x9ec400' 183 | yellow: '0xe7c547' 184 | blue: '0x7aa6da' 185 | magenta: '0xb77ee0' 186 | cyan: '0x54ced6' 187 | white: '0xffffff' 188 | 189 | # Dim colors 190 | # 191 | # If the dim colors are not set, they will be calculated automatically based 192 | # on the `normal` colors. 193 | dim: 194 | black: '0x333333' 195 | red: '0xf2777a' 196 | green: '0x99cc99' 197 | yellow: '0xffcc66' 198 | blue: '0x6699cc' 199 | magenta: '0xcc99cc' 200 | cyan: '0x66cccc' 201 | white: '0xdddddd' 202 | 203 | # Indexed Colors 204 | # 205 | # The indexed colors include all colors from 16 to 256. 206 | # When these are not set, they're filled with sensible defaults. 207 | #indexed_colors: 208 | # - { index: 16, color: '0x000000' } 209 | 210 | # Visual Bell 211 | # 212 | # Any time the BEL code is received, Alacritty "rings" the visual bell. Once 213 | # rung, the terminal background will be set to white and transition back to the 214 | # default background color. You can control the rate of this transition by 215 | # setting the `duration` property (represented in milliseconds). You can also 216 | # configure the transition function by setting the `animation` property. 217 | # 218 | # Values for `animation`: 219 | # - Ease 220 | # - EaseOut 221 | # - EaseOutSine 222 | # - EaseOutQuad 223 | # - EaseOutCubic 224 | # - EaseOutQuart 225 | # - EaseOutQuint 226 | # - EaseOutExpo 227 | # - EaseOutCirc 228 | # - Linear 229 | # 230 | # Specifying a `duration` of `0` will disable the visual bell. 231 | visual_bell: 232 | animation: EaseOutExpo 233 | duration: 0 234 | 235 | # Background opacity 236 | # 237 | # Window opacity as a floating point number from `0.0` to `1.0`. 238 | # The value `0.0` is completely transparent and `1.0` is opaque. 239 | background_opacity: 1.0 240 | 241 | # Mouse bindings 242 | # 243 | # Available fields: 244 | # - mouse 245 | # - action 246 | # - mods (optional) 247 | # 248 | # Values for `mouse`: 249 | # - Middle 250 | # - Left 251 | # - Right 252 | # - Numeric identifier such as `5` 253 | # 254 | # All available `mods` and `action` values are documented in the key binding 255 | # section. 256 | mouse_bindings: 257 | - { mouse: Middle, action: PasteSelection } 258 | 259 | mouse: 260 | # Click settings 261 | # 262 | # The `double_click` and `triple_click` settings control the time 263 | # alacritty should wait for accepting multiple clicks as one double 264 | # or triple click. 265 | double_click: { threshold: 300 } 266 | triple_click: { threshold: 300 } 267 | 268 | # If this is `true`, the cursor is temporarily hidden when typing. 269 | hide_when_typing: false 270 | 271 | url: 272 | # URL launcher 273 | # 274 | # This program is executed when clicking on a text which is recognized as a URL. 275 | # The URL is always added to the command as the last parameter. 276 | launcher: open 277 | 278 | # URL modifiers 279 | # 280 | # These are the modifiers that need to be held down for opening URLs when clicking 281 | # on them. The available modifiers are documented in the key binding section. 282 | modifiers: Control|Shift 283 | 284 | selection: 285 | semantic_escape_chars: ",?`|:\"' ()[]{}<>" 286 | 287 | # When set to `true`, selected text will be copied to the primary clipboard. 288 | save_to_clipboard: true 289 | 290 | cursor: 291 | # Cursor style 292 | # 293 | # Values for 'style': 294 | # - ? Block 295 | # - _ Underline 296 | # - | Beam 297 | style: Block 298 | 299 | # If this is `true`, the cursor will be rendered as a hollow box when the 300 | # window is not focused. 301 | unfocused_hollow: true 302 | 303 | # Live config reload (changes require restart) 304 | live_config_reload: true 305 | 306 | # Shell 307 | # 308 | # You can set `shell.program` to the path of your favorite shell, e.g. `/bin/fish`. 309 | # Entries in `shell.args` are passed unmodified as arguments to the shell. 310 | shell: 311 | program: /bin/bash 312 | args: 313 | - --login 314 | 315 | # Key bindings 316 | # 317 | # Key bindings are specified as a list of objects. Each binding will specify 318 | # a key and modifiers required to trigger it, terminal modes where the binding 319 | # is applicable, and what should be done when the key binding fires. It can 320 | # either send a byte sequnce to the running application (`chars`), execute 321 | # a predefined action (`action`) or fork and execute a specified command plus 322 | # arguments (`command`). 323 | # 324 | # Example: 325 | # `- { key: V, mods: Command, action: Paste }` 326 | # 327 | # Available fields: 328 | # - key 329 | # - mods (optional) 330 | # - chars | action | command (exactly one required) 331 | # - mode (optional) 332 | # 333 | # Values for `key`: 334 | # - `A` -> `Z` 335 | # - `F1` -> `F12` 336 | # - `Key1` -> `Key0` 337 | # 338 | # A full list with available key codes can be found here: 339 | # https://docs.rs/glutin/*/glutin/enum.VirtualKeyCode.html#variants 340 | # 341 | # Instead of using the name of the keys, the `key` field also supports using 342 | # the scancode of the desired key. Scancodes have to be specified as a 343 | # decimal number. 344 | # This command will allow you to display the hex scancodes for certain keys: 345 | # `showkey --scancodes` 346 | # 347 | # Values for `mods`: 348 | # - Command 349 | # - Control 350 | # - Shift 351 | # - Alt 352 | # 353 | # Multiple `mods` can be combined using `|` like this: `mods: Control|Shift`. 354 | # Whitespace and capitalization is relevant and must match the example. 355 | # 356 | # Values for `chars`: 357 | # The `chars` field writes the specified string to the terminal. This makes 358 | # it possible to pass escape sequences. 359 | # To find escape codes for bindings like `PageUp` ("\x1b[5~"), you can run 360 | # the command `showkey -a` outside of tmux. 361 | # Note that applications use terminfo to map escape sequences back to 362 | # keys. It is therefore required to update the terminfo when 363 | # changing an escape sequence. 364 | # 365 | # Values for `action`: 366 | # - Paste 367 | # - PasteSelection 368 | # - Copy 369 | # - IncreaseFontSize 370 | # - DecreaseFontSize 371 | # - ResetFontSize 372 | # - ScrollPageUp 373 | # - ScrollPageDown 374 | # - ScrollToTop 375 | # - ScrollToBottom 376 | # - ClearHistory 377 | # - Hide 378 | # - Quit 379 | # - ClearLogNotice 380 | # 381 | # Values for `command`: 382 | # The `command` field must be a map containing a `program` string and 383 | # an `args` array of command line parameter strings. 384 | # 385 | # Example: 386 | # `command: { program: "alacritty", args: ["-e", "vttest"] }` 387 | # 388 | # Values for `mode`: 389 | # - ~AppCursor 390 | # - AppCursor 391 | # - ~AppKeypad 392 | # - AppKeypad 393 | key_bindings: 394 | - { key: V, mods: Command, action: Paste } 395 | - { key: C, mods: Command, action: Copy } 396 | - { key: Paste, action: Paste } 397 | - { key: Copy, action: Copy } 398 | - { key: H, mods: Command, action: Hide } 399 | - { key: Q, mods: Command, action: Quit } 400 | - { key: W, mods: Command, action: Quit } 401 | - { key: Home, chars: "\x1bOH", mode: AppCursor } 402 | - { key: Home, chars: "\x1b[H", mode: ~AppCursor } 403 | - { key: End, chars: "\x1bOF", mode: AppCursor } 404 | - { key: End, chars: "\x1b[F", mode: ~AppCursor } 405 | - { key: Key0, mods: Command, action: ResetFontSize } 406 | - { key: Equals, mods: Command, action: IncreaseFontSize } 407 | - { key: Minus, mods: Command, action: DecreaseFontSize } 408 | - { key: K, mods: Command, action: ClearHistory } 409 | - { key: K, mods: Command, chars: "\x0c" } 410 | - { key: L, mods: Control, action: ClearLogNotice } 411 | - { key: L, mods: Control, chars: "\x0c" } 412 | - { key: PageUp, mods: Shift, chars: "\x1b[5;2~" } 413 | - { key: PageUp, mods: Control, chars: "\x1b[5;5~" } 414 | - { key: PageUp, chars: "\x1b[5~" } 415 | - { key: PageDown, mods: Shift, chars: "\x1b[6;2~" } 416 | - { key: PageDown, mods: Control, chars: "\x1b[6;5~" } 417 | - { key: PageDown, chars: "\x1b[6~" } 418 | - { key: Tab, mods: Shift, chars: "\x1b[Z" } 419 | - { key: Back, chars: "\x7f" } 420 | - { key: Back, mods: Alt, chars: "\x1b\x7f" } 421 | - { key: Insert, chars: "\x1b[2~" } 422 | - { key: Delete, chars: "\x1b[3~" } 423 | - { key: Left, mods: Shift, chars: "\x1b[1;2D" } 424 | - { key: Left, mods: Control, chars: "\x1b[1;5D" } 425 | - { key: Left, mods: Alt, chars: "\x1b[1;3D" } 426 | - { key: Left, chars: "\x1b[D", mode: ~AppCursor } 427 | - { key: Left, chars: "\x1bOD", mode: AppCursor } 428 | - { key: Right, mods: Shift, chars: "\x1b[1;2C" } 429 | - { key: Right, mods: Control, chars: "\x1b[1;5C" } 430 | - { key: Right, mods: Alt, chars: "\x1b[1;3C" } 431 | - { key: Right, chars: "\x1b[C", mode: ~AppCursor } 432 | - { key: Right, chars: "\x1bOC", mode: AppCursor } 433 | - { key: Up, mods: Shift, chars: "\x1b[1;2A" } 434 | - { key: Up, mods: Control, chars: "\x1b[1;5A" } 435 | - { key: Up, mods: Alt, chars: "\x1b[1;3A" } 436 | - { key: Up, chars: "\x1b[A", mode: ~AppCursor } 437 | - { key: Up, chars: "\x1bOA", mode: AppCursor } 438 | - { key: Down, mods: Shift, chars: "\x1b[1;2B" } 439 | - { key: Down, mods: Control, chars: "\x1b[1;5B" } 440 | - { key: Down, mods: Alt, chars: "\x1b[1;3B" } 441 | - { key: Down, chars: "\x1b[B", mode: ~AppCursor } 442 | - { key: Down, chars: "\x1bOB", mode: AppCursor } 443 | - { key: F1, chars: "\x1bOP" } 444 | - { key: F2, chars: "\x1bOQ" } 445 | - { key: F3, chars: "\x1bOR" } 446 | - { key: F4, chars: "\x1bOS" } 447 | - { key: F5, chars: "\x1b[15~" } 448 | - { key: F6, chars: "\x1b[17~" } 449 | - { key: F7, chars: "\x1b[18~" } 450 | - { key: F8, chars: "\x1b[19~" } 451 | - { key: F9, chars: "\x1b[20~" } 452 | - { key: F10, chars: "\x1b[21~" } 453 | - { key: F11, chars: "\x1b[23~" } 454 | - { key: F12, chars: "\x1b[24~" } 455 | - { key: F1, mods: Shift, chars: "\x1b[1;2P" } 456 | - { key: F2, mods: Shift, chars: "\x1b[1;2Q" } 457 | - { key: F3, mods: Shift, chars: "\x1b[1;2R" } 458 | - { key: F4, mods: Shift, chars: "\x1b[1;2S" } 459 | - { key: F5, mods: Shift, chars: "\x1b[15;2~" } 460 | - { key: F6, mods: Shift, chars: "\x1b[17;2~" } 461 | - { key: F7, mods: Shift, chars: "\x1b[18;2~" } 462 | - { key: F8, mods: Shift, chars: "\x1b[19;2~" } 463 | - { key: F9, mods: Shift, chars: "\x1b[20;2~" } 464 | - { key: F10, mods: Shift, chars: "\x1b[21;2~" } 465 | - { key: F11, mods: Shift, chars: "\x1b[23;2~" } 466 | - { key: F12, mods: Shift, chars: "\x1b[24;2~" } 467 | - { key: F1, mods: Control, chars: "\x1b[1;5P" } 468 | - { key: F2, mods: Control, chars: "\x1b[1;5Q" } 469 | - { key: F3, mods: Control, chars: "\x1b[1;5R" } 470 | - { key: F4, mods: Control, chars: "\x1b[1;5S" } 471 | - { key: F5, mods: Control, chars: "\x1b[15;5~" } 472 | - { key: F6, mods: Control, chars: "\x1b[17;5~" } 473 | - { key: F7, mods: Control, chars: "\x1b[18;5~" } 474 | - { key: F8, mods: Control, chars: "\x1b[19;5~" } 475 | - { key: F9, mods: Control, chars: "\x1b[20;5~" } 476 | - { key: F10, mods: Control, chars: "\x1b[21;5~" } 477 | - { key: F11, mods: Control, chars: "\x1b[23;5~" } 478 | - { key: F12, mods: Control, chars: "\x1b[24;5~" } 479 | - { key: F1, mods: Alt, chars: "\x1b[1;6P" } 480 | - { key: F2, mods: Alt, chars: "\x1b[1;6Q" } 481 | - { key: F3, mods: Alt, chars: "\x1b[1;6R" } 482 | - { key: F4, mods: Alt, chars: "\x1b[1;6S" } 483 | - { key: F5, mods: Alt, chars: "\x1b[15;6~" } 484 | - { key: F6, mods: Alt, chars: "\x1b[17;6~" } 485 | - { key: F7, mods: Alt, chars: "\x1b[18;6~" } 486 | - { key: F8, mods: Alt, chars: "\x1b[19;6~" } 487 | - { key: F9, mods: Alt, chars: "\x1b[20;6~" } 488 | - { key: F10, mods: Alt, chars: "\x1b[21;6~" } 489 | - { key: F11, mods: Alt, chars: "\x1b[23;6~" } 490 | - { key: F12, mods: Alt, chars: "\x1b[24;6~" } 491 | - { key: F1, mods: Command, chars: "\x1b[1;3P" } 492 | - { key: F2, mods: Command, chars: "\x1b[1;3Q" } 493 | - { key: F3, mods: Command, chars: "\x1b[1;3R" } 494 | - { key: F4, mods: Command, chars: "\x1b[1;3S" } 495 | - { key: F5, mods: Command, chars: "\x1b[15;3~" } 496 | - { key: F6, mods: Command, chars: "\x1b[17;3~" } 497 | - { key: F7, mods: Command, chars: "\x1b[18;3~" } 498 | - { key: F8, mods: Command, chars: "\x1b[19;3~" } 499 | - { key: F9, mods: Command, chars: "\x1b[20;3~" } 500 | - { key: F10, mods: Command, chars: "\x1b[21;3~" } 501 | - { key: F11, mods: Command, chars: "\x1b[23;3~" } 502 | - { key: F12, mods: Command, chars: "\x1b[24;3~" } 503 | - { key: NumpadEnter, chars: "\n" } 504 | -------------------------------------------------------------------------------- /bootstrap.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | #a 3 | 4 | # Tells the shell script to exit if it encounters an error 5 | set -e 6 | 7 | # -- Log ----------------------------------------------------------------------- 8 | # Duplicated code from log.sh 9 | # since we cannot import a file when installing via cURL 10 | function msg { 11 | echo "\033[0;37m$1\033[0m"; 12 | } 13 | 14 | function msg_ok { 15 | echo "\033[1;32m $1 \033[0m"; 16 | } 17 | 18 | function msg_prompt { 19 | echo "➜\033[1;37m $1 \033[0m"; 20 | } 21 | function msg_nested_done { 22 | echo " * \033[0;37m $1 \033[0m"; 23 | } 24 | function msg_category { 25 | echo " * \033[0;33m $1 \033[0m"; 26 | } 27 | 28 | function msg_nested_lvl_done { 29 | echo " ➜ \033[0;37m $1 \033[0m"; 30 | } 31 | 32 | function msg_config { 33 | echo "➜ \033[1;36m $1 ✔\033[0m"; 34 | } 35 | 36 | function msg_run { 37 | echo "➜\033[1;35m $1 $2\033[0m"; 38 | } 39 | 40 | function msg_done { 41 | echo "✔ \033[1;37m $1 \033[0m"; 42 | } 43 | function show_art { 44 | echo "\033[1;37m $1 \033[0m"; 45 | } 46 | 47 | msg '\n' 48 | 49 | show_art " .:: .:: .:: .:: " 50 | show_art " .:: .:: .: .: .:: " 51 | show_art " .:: .:: .:.: .:.:.: .: .:: .:: .:::: " 52 | show_art " .:: .:: .:: .:: .:: .:: .:: .:: .: .:: .:: " 53 | show_art ".: .::.:: .:: .:: .:: .:: .::.::::: .:: .::: " 54 | show_art ".: .:: .:: .:: .:: .:: .:: .::.: .::" 55 | show_art ".:: .:: .:: .:: .:: .::.::: .:::: .:: .:: " 56 | 57 | 58 | msg '\n' 59 | msg_done 'Initializing setup.' 60 | msg '\n' 61 | 62 | # -- Homebrew ------------------------------------------------------------------ 63 | if hash brew 2> /dev/null; then 64 | msg_done "homebrew" 65 | else 66 | msg_run "homebrew" "ruby -e '$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)'" 67 | ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" 68 | fi 69 | 70 | # -- Git ----------------------------------------------------------------------- 71 | if hash git 2> /dev/null; then 72 | msg_done "git" 73 | else 74 | msg_run "git" 75 | brew install git 2> /dev/null 76 | fi 77 | 78 | # -- Golang ----------------------------------------------------------------------- 79 | if hash go 2> /dev/null; then 80 | msg_done "golang" 81 | else 82 | msg_run "golang" 83 | brew install go 2> /dev/null 84 | fi 85 | 86 | 87 | # -- Dotfiles ------------------------------------------------------------------ 88 | if [[ -d ~/dotfiles ]]; then 89 | msg_done "clone dotfiles from Github" 90 | else 91 | msg "dotfiles" "git clone https://github.com/vsouza/dotfiles.git ~/dotfiles" 92 | git clone https://github.com/vsouza/dotfiles.git ~/dotfiles 93 | fi 94 | 95 | msg_prompt "Install apps with homebrew cask" 96 | sh ~/dotfiles/apps.sh 97 | 98 | # Configure Git 99 | msg_prompt "configure git" 100 | sh ~/dotfiles/git.sh 101 | 102 | # Configure osx directives 103 | msg_prompt "configure osx directives" 104 | sh ~/dotfiles/osx.sh 105 | 106 | # Configure Vim 107 | msg_prompt "configure vim" 108 | sh ~/dotfiles/vim.sh 109 | 110 | # Install and Configure Python 111 | msg_prompt "Install and Configure Python" 112 | sh ~/dotfiles/python.sh 113 | 114 | rm sample.s 115 | 116 | msg_done "Your machine works like a charm! =*" 117 | -------------------------------------------------------------------------------- /git.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | source ~/dotfiles/log.sh 3 | 4 | # -- Config -------------------------------------------------------------------- 5 | if [[ -L ~/.gitconfig ]]; then 6 | rm ~/.gitconfig 7 | fi 8 | 9 | ln -s ~/dotfiles/.gitconfig ~/.gitconfig 10 | msg_nested_done "gitconfig" 11 | 12 | 13 | # -- Global Ignore ------------------------------------------------------------- 14 | if [[ -L ~/.gitignore_global ]]; then 15 | rm ~/.gitignore_global 16 | fi 17 | 18 | msg_nested_done "gitignore_global" 19 | ln -s ~/dotfiles/.gitignore_global ~/.gitignore_global 20 | 21 | msg_done "git configured." 22 | -------------------------------------------------------------------------------- /install_apps.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Install MacOS apps 4 | 5 | BrewCaskApps=( 6 | 'alacritty' 7 | 'dash' 8 | 'docker' 9 | 'franz' 10 | 'keka' 11 | 'skype' 12 | 'slack' 13 | 'spotify' 14 | 'telegram' 15 | 'transmit' 16 | 'virtualbox' 17 | 'vlc' 18 | ) 19 | 20 | BrewApps=( 21 | 'autoconf' 22 | 'go' 23 | 'kubernetes-cli' 24 | 'mongodb' 25 | 'neovim' 26 | 'redis' 27 | 'telnet' 28 | 'ctags' 29 | 'libevent' 30 | 'tmux' 31 | 'elasticsearch' 32 | 'mysql' 33 | 'openssl' 34 | 'tree' 35 | 'wget' 36 | ) 37 | 38 | install_homebrew(){ 39 | ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" 40 | } 41 | 42 | install_brew_apps(){ 43 | for app in BrewCaskApps; do 44 | brew cask install $app 45 | done 46 | } 47 | 48 | install_homebrew_cask(){ 49 | brew tap caskroom/cask 50 | } 51 | 52 | install_brew_cask_apps(){ 53 | for app in BrewApps; do 54 | brew install $app 55 | done 56 | } 57 | -------------------------------------------------------------------------------- /log.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | 4 | function msg { 5 | echo "\033[0;37m$1\033[0m"; 6 | } 7 | 8 | function msg_ok { 9 | echo "\033[1;32m $1 \033[0m"; 10 | } 11 | 12 | function msg_prompt { 13 | echo "➜\033[1;33m $1 \033[0m"; 14 | } 15 | function msg_nested_done { 16 | echo " * \033[0;37m $1 \033[0m"; 17 | } 18 | function msg_category { 19 | echo " * \033[0;33m $1 \033[0m"; 20 | } 21 | 22 | function msg_nested_lvl_done { 23 | echo " ➜ \033[0;37m $1 \033[0m"; 24 | } 25 | 26 | function msg_config { 27 | echo "➜ \033[1;36m $1 ✔\033[0m"; 28 | } 29 | 30 | function msg_run { 31 | echo "➜\033[1;35m $1 $2\033[0m"; 32 | } 33 | 34 | function msg_done { 35 | echo "✔ \033[1;37m $1 \033[0m"; 36 | } 37 | -------------------------------------------------------------------------------- /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: 12 Aug 2017 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('termguicolors') && &termguicolors) && !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 | if !exists('g:gruvbox_inverse') 45 | let g:gruvbox_inverse=1 46 | endif 47 | 48 | if !exists('g:gruvbox_guisp_fallback') || index(['fg', 'bg'], g:gruvbox_guisp_fallback) == -1 49 | let g:gruvbox_guisp_fallback='NONE' 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_contrast') 69 | echo 'g:gruvbox_contrast is deprecated; use g:gruvbox_contrast_light and g:gruvbox_contrast_dark instead' 70 | endif 71 | 72 | if !exists('g:gruvbox_contrast_dark') 73 | let g:gruvbox_contrast_dark='medium' 74 | endif 75 | 76 | if !exists('g:gruvbox_contrast_light') 77 | let g:gruvbox_contrast_light='medium' 78 | endif 79 | 80 | let s:is_dark=(&background == 'dark') 81 | 82 | " }}} 83 | " Palette: {{{ 84 | 85 | " setup palette dictionary 86 | let s:gb = {} 87 | 88 | " fill it with absolute colors 89 | let s:gb.dark0_hard = ['#1d2021', 234] " 29-32-33 90 | let s:gb.dark0 = ['#282828', 235] " 40-40-40 91 | let s:gb.dark0_soft = ['#32302f', 236] " 50-48-47 92 | let s:gb.dark1 = ['#3c3836', 237] " 60-56-54 93 | let s:gb.dark2 = ['#504945', 239] " 80-73-69 94 | let s:gb.dark3 = ['#665c54', 241] " 102-92-84 95 | let s:gb.dark4 = ['#7c6f64', 243] " 124-111-100 96 | let s:gb.dark4_256 = ['#7c6f64', 243] " 124-111-100 97 | 98 | let s:gb.gray_245 = ['#928374', 245] " 146-131-116 99 | let s:gb.gray_244 = ['#928374', 244] " 146-131-116 100 | 101 | let s:gb.light0_hard = ['#f9f5d7', 230] " 249-245-215 102 | let s:gb.light0 = ['#fbf1c7', 229] " 253-244-193 103 | let s:gb.light0_soft = ['#f2e5bc', 228] " 242-229-188 104 | let s:gb.light1 = ['#ebdbb2', 223] " 235-219-178 105 | let s:gb.light2 = ['#d5c4a1', 250] " 213-196-161 106 | let s:gb.light3 = ['#bdae93', 248] " 189-174-147 107 | let s:gb.light4 = ['#a89984', 246] " 168-153-132 108 | let s:gb.light4_256 = ['#a89984', 246] " 168-153-132 109 | 110 | let s:gb.bright_red = ['#fb4934', 167] " 251-73-52 111 | let s:gb.bright_green = ['#b8bb26', 142] " 184-187-38 112 | let s:gb.bright_yellow = ['#fabd2f', 214] " 250-189-47 113 | let s:gb.bright_blue = ['#83a598', 109] " 131-165-152 114 | let s:gb.bright_purple = ['#d3869b', 175] " 211-134-155 115 | let s:gb.bright_aqua = ['#8ec07c', 108] " 142-192-124 116 | let s:gb.bright_orange = ['#fe8019', 208] " 254-128-25 117 | 118 | let s:gb.neutral_red = ['#cc241d', 124] " 204-36-29 119 | let s:gb.neutral_green = ['#98971a', 106] " 152-151-26 120 | let s:gb.neutral_yellow = ['#d79921', 172] " 215-153-33 121 | let s:gb.neutral_blue = ['#458588', 66] " 69-133-136 122 | let s:gb.neutral_purple = ['#b16286', 132] " 177-98-134 123 | let s:gb.neutral_aqua = ['#689d6a', 72] " 104-157-106 124 | let s:gb.neutral_orange = ['#d65d0e', 166] " 214-93-14 125 | 126 | let s:gb.faded_red = ['#9d0006', 88] " 157-0-6 127 | let s:gb.faded_green = ['#79740e', 100] " 121-116-14 128 | let s:gb.faded_yellow = ['#b57614', 136] " 181-118-20 129 | let s:gb.faded_blue = ['#076678', 24] " 7-102-120 130 | let s:gb.faded_purple = ['#8f3f71', 96] " 143-63-113 131 | let s:gb.faded_aqua = ['#427b58', 66] " 66-123-88 132 | let s:gb.faded_orange = ['#af3a03', 130] " 175-58-3 133 | 134 | " }}} 135 | " Setup Emphasis: {{{ 136 | 137 | let s:bold = 'bold,' 138 | if g:gruvbox_bold == 0 139 | let s:bold = '' 140 | endif 141 | 142 | let s:italic = 'italic,' 143 | if g:gruvbox_italic == 0 144 | let s:italic = '' 145 | endif 146 | 147 | let s:underline = 'underline,' 148 | if g:gruvbox_underline == 0 149 | let s:underline = '' 150 | endif 151 | 152 | let s:undercurl = 'undercurl,' 153 | if g:gruvbox_undercurl == 0 154 | let s:undercurl = '' 155 | endif 156 | 157 | let s:inverse = 'inverse,' 158 | if g:gruvbox_inverse == 0 159 | let s:inverse = '' 160 | endif 161 | 162 | " }}} 163 | " Setup Colors: {{{ 164 | 165 | let s:vim_bg = ['bg', 'bg'] 166 | let s:vim_fg = ['fg', 'fg'] 167 | let s:none = ['NONE', 'NONE'] 168 | 169 | " determine relative colors 170 | if s:is_dark 171 | let s:bg0 = s:gb.dark0 172 | if g:gruvbox_contrast_dark == 'soft' 173 | let s:bg0 = s:gb.dark0_soft 174 | elseif g:gruvbox_contrast_dark == 'hard' 175 | let s:bg0 = s:gb.dark0_hard 176 | endif 177 | 178 | let s:bg1 = s:gb.dark1 179 | let s:bg2 = s:gb.dark2 180 | let s:bg3 = s:gb.dark3 181 | let s:bg4 = s:gb.dark4 182 | 183 | let s:gray = s:gb.gray_245 184 | 185 | let s:fg0 = s:gb.light0 186 | let s:fg1 = s:gb.light1 187 | let s:fg2 = s:gb.light2 188 | let s:fg3 = s:gb.light3 189 | let s:fg4 = s:gb.light4 190 | 191 | let s:fg4_256 = s:gb.light4_256 192 | 193 | let s:red = s:gb.bright_red 194 | let s:green = s:gb.bright_green 195 | let s:yellow = s:gb.bright_yellow 196 | let s:blue = s:gb.bright_blue 197 | let s:purple = s:gb.bright_purple 198 | let s:aqua = s:gb.bright_aqua 199 | let s:orange = s:gb.bright_orange 200 | else 201 | let s:bg0 = s:gb.light0 202 | if g:gruvbox_contrast_light == 'soft' 203 | let s:bg0 = s:gb.light0_soft 204 | elseif g:gruvbox_contrast_light == 'hard' 205 | let s:bg0 = s:gb.light0_hard 206 | endif 207 | 208 | let s:bg1 = s:gb.light1 209 | let s:bg2 = s:gb.light2 210 | let s:bg3 = s:gb.light3 211 | let s:bg4 = s:gb.light4 212 | 213 | let s:gray = s:gb.gray_244 214 | 215 | let s:fg0 = s:gb.dark0 216 | let s:fg1 = s:gb.dark1 217 | let s:fg2 = s:gb.dark2 218 | let s:fg3 = s:gb.dark3 219 | let s:fg4 = s:gb.dark4 220 | 221 | let s:fg4_256 = s:gb.dark4_256 222 | 223 | let s:red = s:gb.faded_red 224 | let s:green = s:gb.faded_green 225 | let s:yellow = s:gb.faded_yellow 226 | let s:blue = s:gb.faded_blue 227 | let s:purple = s:gb.faded_purple 228 | let s:aqua = s:gb.faded_aqua 229 | let s:orange = s:gb.faded_orange 230 | endif 231 | 232 | " reset to 16 colors fallback 233 | if g:gruvbox_termcolors == 16 234 | let s:bg0[1] = 0 235 | let s:fg4[1] = 7 236 | let s:gray[1] = 8 237 | let s:red[1] = 9 238 | let s:green[1] = 10 239 | let s:yellow[1] = 11 240 | let s:blue[1] = 12 241 | let s:purple[1] = 13 242 | let s:aqua[1] = 14 243 | let s:fg1[1] = 15 244 | endif 245 | 246 | " save current relative colors back to palette dictionary 247 | let s:gb.bg0 = s:bg0 248 | let s:gb.bg1 = s:bg1 249 | let s:gb.bg2 = s:bg2 250 | let s:gb.bg3 = s:bg3 251 | let s:gb.bg4 = s:bg4 252 | 253 | let s:gb.gray = s:gray 254 | 255 | let s:gb.fg0 = s:fg0 256 | let s:gb.fg1 = s:fg1 257 | let s:gb.fg2 = s:fg2 258 | let s:gb.fg3 = s:fg3 259 | let s:gb.fg4 = s:fg4 260 | 261 | let s:gb.fg4_256 = s:fg4_256 262 | 263 | let s:gb.red = s:red 264 | let s:gb.green = s:green 265 | let s:gb.yellow = s:yellow 266 | let s:gb.blue = s:blue 267 | let s:gb.purple = s:purple 268 | let s:gb.aqua = s:aqua 269 | let s:gb.orange = s:orange 270 | 271 | " }}} 272 | " Setup Terminal Colors For Neovim: {{{ 273 | 274 | if has('nvim') 275 | let g:terminal_color_0 = s:bg0[0] 276 | let g:terminal_color_8 = s:gray[0] 277 | 278 | let g:terminal_color_1 = s:gb.neutral_red[0] 279 | let g:terminal_color_9 = s:red[0] 280 | 281 | let g:terminal_color_2 = s:gb.neutral_green[0] 282 | let g:terminal_color_10 = s:green[0] 283 | 284 | let g:terminal_color_3 = s:gb.neutral_yellow[0] 285 | let g:terminal_color_11 = s:yellow[0] 286 | 287 | let g:terminal_color_4 = s:gb.neutral_blue[0] 288 | let g:terminal_color_12 = s:blue[0] 289 | 290 | let g:terminal_color_5 = s:gb.neutral_purple[0] 291 | let g:terminal_color_13 = s:purple[0] 292 | 293 | let g:terminal_color_6 = s:gb.neutral_aqua[0] 294 | let g:terminal_color_14 = s:aqua[0] 295 | 296 | let g:terminal_color_7 = s:fg4[0] 297 | let g:terminal_color_15 = s:fg1[0] 298 | endif 299 | 300 | " }}} 301 | " Overload Setting: {{{ 302 | 303 | let s:hls_cursor = s:orange 304 | if exists('g:gruvbox_hls_cursor') 305 | let s:hls_cursor = get(s:gb, g:gruvbox_hls_cursor) 306 | endif 307 | 308 | let s:number_column = s:none 309 | if exists('g:gruvbox_number_column') 310 | let s:number_column = get(s:gb, g:gruvbox_number_column) 311 | endif 312 | 313 | let s:sign_column = s:bg1 314 | 315 | if exists('g:gitgutter_override_sign_column_highlight') && 316 | \ g:gitgutter_override_sign_column_highlight == 1 317 | let s:sign_column = s:number_column 318 | else 319 | let g:gitgutter_override_sign_column_highlight = 0 320 | 321 | if exists('g:gruvbox_sign_column') 322 | let s:sign_column = get(s:gb, g:gruvbox_sign_column) 323 | endif 324 | endif 325 | 326 | let s:color_column = s:bg1 327 | if exists('g:gruvbox_color_column') 328 | let s:color_column = get(s:gb, g:gruvbox_color_column) 329 | endif 330 | 331 | let s:vert_split = s:bg0 332 | if exists('g:gruvbox_vert_split') 333 | let s:vert_split = get(s:gb, g:gruvbox_vert_split) 334 | endif 335 | 336 | let s:invert_signs = '' 337 | if exists('g:gruvbox_invert_signs') 338 | if g:gruvbox_invert_signs == 1 339 | let s:invert_signs = s:inverse 340 | endif 341 | endif 342 | 343 | let s:invert_selection = s:inverse 344 | if exists('g:gruvbox_invert_selection') 345 | if g:gruvbox_invert_selection == 0 346 | let s:invert_selection = '' 347 | endif 348 | endif 349 | 350 | let s:invert_tabline = '' 351 | if exists('g:gruvbox_invert_tabline') 352 | if g:gruvbox_invert_tabline == 1 353 | let s:invert_tabline = s:inverse 354 | endif 355 | endif 356 | 357 | let s:italicize_comments = s:italic 358 | if exists('g:gruvbox_italicize_comments') 359 | if g:gruvbox_italicize_comments == 0 360 | let s:italicize_comments = '' 361 | endif 362 | endif 363 | 364 | let s:italicize_strings = '' 365 | if exists('g:gruvbox_italicize_strings') 366 | if g:gruvbox_italicize_strings == 1 367 | let s:italicize_strings = s:italic 368 | endif 369 | endif 370 | 371 | " }}} 372 | " Highlighting Function: {{{ 373 | 374 | function! s:HL(group, fg, ...) 375 | " Arguments: group, guifg, guibg, gui, guisp 376 | 377 | " foreground 378 | let fg = a:fg 379 | 380 | " background 381 | if a:0 >= 1 382 | let bg = a:1 383 | else 384 | let bg = s:none 385 | endif 386 | 387 | " emphasis 388 | if a:0 >= 2 && strlen(a:2) 389 | let emstr = a:2 390 | else 391 | let emstr = 'NONE,' 392 | endif 393 | 394 | " special fallback 395 | if a:0 >= 3 396 | if g:gruvbox_guisp_fallback != 'NONE' 397 | let fg = a:3 398 | endif 399 | 400 | " bg fallback mode should invert higlighting 401 | if g:gruvbox_guisp_fallback == 'bg' 402 | let emstr .= 'inverse,' 403 | endif 404 | endif 405 | 406 | let histring = [ 'hi', a:group, 407 | \ 'guifg=' . fg[0], 'ctermfg=' . fg[1], 408 | \ 'guibg=' . bg[0], 'ctermbg=' . bg[1], 409 | \ 'gui=' . emstr[:-2], 'cterm=' . emstr[:-2] 410 | \ ] 411 | 412 | " special 413 | if a:0 >= 3 414 | call add(histring, 'guisp=' . a:3[0]) 415 | endif 416 | 417 | execute join(histring, ' ') 418 | endfunction 419 | 420 | " }}} 421 | " Gruvbox Hi Groups: {{{ 422 | 423 | " memoize common hi groups 424 | call s:HL('GruvboxFg0', s:fg0) 425 | call s:HL('GruvboxFg1', s:fg1) 426 | call s:HL('GruvboxFg2', s:fg2) 427 | call s:HL('GruvboxFg3', s:fg3) 428 | call s:HL('GruvboxFg4', s:fg4) 429 | call s:HL('GruvboxGray', s:gray) 430 | call s:HL('GruvboxBg0', s:bg0) 431 | call s:HL('GruvboxBg1', s:bg1) 432 | call s:HL('GruvboxBg2', s:bg2) 433 | call s:HL('GruvboxBg3', s:bg3) 434 | call s:HL('GruvboxBg4', s:bg4) 435 | 436 | call s:HL('GruvboxRed', s:red) 437 | call s:HL('GruvboxRedBold', s:red, s:none, s:bold) 438 | call s:HL('GruvboxGreen', s:green) 439 | call s:HL('GruvboxGreenBold', s:green, s:none, s:bold) 440 | call s:HL('GruvboxYellow', s:yellow) 441 | call s:HL('GruvboxYellowBold', s:yellow, s:none, s:bold) 442 | call s:HL('GruvboxBlue', s:blue) 443 | call s:HL('GruvboxBlueBold', s:blue, s:none, s:bold) 444 | call s:HL('GruvboxPurple', s:purple) 445 | call s:HL('GruvboxPurpleBold', s:purple, s:none, s:bold) 446 | call s:HL('GruvboxAqua', s:aqua) 447 | call s:HL('GruvboxAquaBold', s:aqua, s:none, s:bold) 448 | call s:HL('GruvboxOrange', s:orange) 449 | call s:HL('GruvboxOrangeBold', s:orange, s:none, s:bold) 450 | 451 | call s:HL('GruvboxRedSign', s:red, s:sign_column, s:invert_signs) 452 | call s:HL('GruvboxGreenSign', s:green, s:sign_column, s:invert_signs) 453 | call s:HL('GruvboxYellowSign', s:yellow, s:sign_column, s:invert_signs) 454 | call s:HL('GruvboxBlueSign', s:blue, s:sign_column, s:invert_signs) 455 | call s:HL('GruvboxPurpleSign', s:purple, s:sign_column, s:invert_signs) 456 | call s:HL('GruvboxAquaSign', s:aqua, s:sign_column, s:invert_signs) 457 | 458 | " }}} 459 | 460 | " Vanilla colorscheme --------------------------------------------------------- 461 | " General UI: {{{ 462 | 463 | " Normal text 464 | call s:HL('Normal', s:fg1, s:bg0) 465 | 466 | " Correct background (see issue #7): 467 | " --- Problem with changing between dark and light on 256 color terminal 468 | " --- https://github.com/morhetz/gruvbox/issues/7 469 | if s:is_dark 470 | set background=dark 471 | else 472 | set background=light 473 | endif 474 | 475 | if version >= 700 476 | " Screen line that the cursor is 477 | call s:HL('CursorLine', s:none, s:bg1) 478 | " Screen column that the cursor is 479 | hi! link CursorColumn CursorLine 480 | 481 | " Tab pages line filler 482 | call s:HL('TabLineFill', s:bg4, s:bg1, s:invert_tabline) 483 | " Active tab page label 484 | call s:HL('TabLineSel', s:green, s:bg1, s:invert_tabline) 485 | " Not active tab page label 486 | hi! link TabLine TabLineFill 487 | 488 | " Match paired bracket under the cursor 489 | call s:HL('MatchParen', s:none, s:bg3, s:bold) 490 | endif 491 | 492 | if version >= 703 493 | " Highlighted screen columns 494 | call s:HL('ColorColumn', s:none, s:color_column) 495 | 496 | " Concealed element: \lambda ? ? 497 | call s:HL('Conceal', s:blue, s:none) 498 | 499 | " Line number of CursorLine 500 | call s:HL('CursorLineNr', s:yellow, s:bg1) 501 | endif 502 | 503 | hi! link NonText GruvboxBg2 504 | hi! link SpecialKey GruvboxBg2 505 | 506 | call s:HL('Visual', s:none, s:bg3, s:invert_selection) 507 | hi! link VisualNOS Visual 508 | 509 | call s:HL('Search', s:yellow, s:bg0, s:inverse) 510 | call s:HL('IncSearch', s:hls_cursor, s:bg0, s:inverse) 511 | 512 | call s:HL('Underlined', s:blue, s:none, s:underline) 513 | 514 | call s:HL('StatusLine', s:bg2, s:fg1, s:inverse) 515 | call s:HL('StatusLineNC', s:bg1, s:fg4, s:inverse) 516 | 517 | " The column separating vertically split windows 518 | call s:HL('VertSplit', s:bg3, s:vert_split) 519 | 520 | " Current match in wildmenu completion 521 | call s:HL('WildMenu', s:blue, s:bg2, s:bold) 522 | 523 | " Directory names, special names in listing 524 | hi! link Directory GruvboxGreenBold 525 | 526 | " Titles for output from :set all, :autocmd, etc. 527 | hi! link Title GruvboxGreenBold 528 | 529 | " Error messages on the command line 530 | call s:HL('ErrorMsg', s:bg0, s:red, s:bold) 531 | " More prompt: -- More -- 532 | hi! link MoreMsg GruvboxYellowBold 533 | " Current mode message: -- INSERT -- 534 | hi! link ModeMsg GruvboxYellowBold 535 | " 'Press enter' prompt and yes/no questions 536 | hi! link Question GruvboxOrangeBold 537 | " Warning messages 538 | hi! link WarningMsg GruvboxRedBold 539 | 540 | " }}} 541 | " Gutter: {{{ 542 | 543 | " Line number for :number and :# commands 544 | call s:HL('LineNr', s:bg4, s:number_column) 545 | 546 | " Column where signs are displayed 547 | call s:HL('SignColumn', s:none, s:sign_column) 548 | 549 | " Line used for closed folds 550 | call s:HL('Folded', s:gray, s:bg1, s:italic) 551 | " Column where folds are displayed 552 | call s:HL('FoldColumn', s:gray, s:bg1) 553 | 554 | " }}} 555 | " Cursor: {{{ 556 | 557 | " Character under cursor 558 | call s:HL('Cursor', s:none, s:none, s:inverse) 559 | " Visual mode cursor, selection 560 | hi! link vCursor Cursor 561 | " Input moder cursor 562 | hi! link iCursor Cursor 563 | " Language mapping cursor 564 | hi! link lCursor Cursor 565 | 566 | " }}} 567 | " Syntax Highlighting: {{{ 568 | 569 | if g:gruvbox_improved_strings == 0 570 | hi! link Special GruvboxOrange 571 | else 572 | call s:HL('Special', s:orange, s:bg1, s:italicize_strings) 573 | endif 574 | 575 | call s:HL('Comment', s:gray, s:none, s:italicize_comments) 576 | call s:HL('Todo', s:vim_fg, s:vim_bg, s:bold . s:italic) 577 | call s:HL('Error', s:red, s:vim_bg, s:bold . s:inverse) 578 | 579 | " Generic statement 580 | hi! link Statement GruvboxRed 581 | " if, then, else, endif, swicth, etc. 582 | hi! link Conditional GruvboxRed 583 | " for, do, while, etc. 584 | hi! link Repeat GruvboxRed 585 | " case, default, etc. 586 | hi! link Label GruvboxRed 587 | " try, catch, throw 588 | hi! link Exception GruvboxRed 589 | " sizeof, "+", "*", etc. 590 | hi! link Operator Normal 591 | " Any other keyword 592 | hi! link Keyword GruvboxRed 593 | 594 | " Variable name 595 | hi! link Identifier GruvboxBlue 596 | " Function name 597 | hi! link Function GruvboxGreenBold 598 | 599 | " Generic preprocessor 600 | hi! link PreProc GruvboxAqua 601 | " Preprocessor #include 602 | hi! link Include GruvboxAqua 603 | " Preprocessor #define 604 | hi! link Define GruvboxAqua 605 | " Same as Define 606 | hi! link Macro GruvboxAqua 607 | " Preprocessor #if, #else, #endif, etc. 608 | hi! link PreCondit GruvboxAqua 609 | 610 | " Generic constant 611 | hi! link Constant GruvboxPurple 612 | " Character constant: 'c', '/n' 613 | hi! link Character GruvboxPurple 614 | " String constant: "this is a string" 615 | if g:gruvbox_improved_strings == 0 616 | call s:HL('String', s:green, s:none, s:italicize_strings) 617 | else 618 | call s:HL('String', s:fg1, s:bg1, s:italicize_strings) 619 | endif 620 | " Boolean constant: TRUE, false 621 | hi! link Boolean GruvboxPurple 622 | " Number constant: 234, 0xff 623 | hi! link Number GruvboxPurple 624 | " Floating point constant: 2.3e10 625 | hi! link Float GruvboxPurple 626 | 627 | " Generic type 628 | hi! link Type GruvboxYellow 629 | " static, register, volatile, etc 630 | hi! link StorageClass GruvboxOrange 631 | " struct, union, enum, etc. 632 | hi! link Structure GruvboxAqua 633 | " typedef 634 | hi! link Typedef GruvboxYellow 635 | 636 | " }}} 637 | " Completion Menu: {{{ 638 | 639 | if version >= 700 640 | " Popup menu: normal item 641 | call s:HL('Pmenu', s:fg1, s:bg2) 642 | " Popup menu: selected item 643 | call s:HL('PmenuSel', s:bg2, s:blue, s:bold) 644 | " Popup menu: scrollbar 645 | call s:HL('PmenuSbar', s:none, s:bg2) 646 | " Popup menu: scrollbar thumb 647 | call s:HL('PmenuThumb', s:none, s:bg4) 648 | endif 649 | 650 | " }}} 651 | " Diffs: {{{ 652 | 653 | call s:HL('DiffDelete', s:red, s:bg0, s:inverse) 654 | call s:HL('DiffAdd', s:green, s:bg0, s:inverse) 655 | "call s:HL('DiffChange', s:bg0, s:blue) 656 | "call s:HL('DiffText', s:bg0, s:yellow) 657 | 658 | " Alternative setting 659 | call s:HL('DiffChange', s:aqua, s:bg0, s:inverse) 660 | call s:HL('DiffText', s:yellow, s:bg0, s:inverse) 661 | 662 | " }}} 663 | " Spelling: {{{ 664 | 665 | if has("spell") 666 | " Not capitalised word, or compile warnings 667 | if g:gruvbox_improved_warnings == 0 668 | call s:HL('SpellCap', s:none, s:none, s:undercurl, s:red) 669 | else 670 | call s:HL('SpellCap', s:green, s:none, s:bold . s:italic) 671 | endif 672 | " Not recognized word 673 | call s:HL('SpellBad', s:none, s:none, s:undercurl, s:blue) 674 | " Wrong spelling for selected region 675 | call s:HL('SpellLocal', s:none, s:none, s:undercurl, s:aqua) 676 | " Rare word 677 | call s:HL('SpellRare', s:none, s:none, s:undercurl, s:purple) 678 | endif 679 | 680 | " }}} 681 | 682 | " Plugin specific ------------------------------------------------------------- 683 | " EasyMotion: {{{ 684 | 685 | hi! link EasyMotionTarget Search 686 | hi! link EasyMotionShade Comment 687 | 688 | " }}} 689 | " Sneak: {{{ 690 | 691 | hi! link Sneak Search 692 | hi! link SneakLabel Search 693 | 694 | " }}} 695 | " Indent Guides: {{{ 696 | 697 | if !exists('g:indent_guides_auto_colors') 698 | let g:indent_guides_auto_colors = 0 699 | endif 700 | 701 | if g:indent_guides_auto_colors == 0 702 | if g:gruvbox_invert_indent_guides == 0 703 | call s:HL('IndentGuidesOdd', s:vim_bg, s:bg2) 704 | call s:HL('IndentGuidesEven', s:vim_bg, s:bg1) 705 | else 706 | call s:HL('IndentGuidesOdd', s:vim_bg, s:bg2, s:inverse) 707 | call s:HL('IndentGuidesEven', s:vim_bg, s:bg3, s:inverse) 708 | endif 709 | endif 710 | 711 | " }}} 712 | " IndentLine: {{{ 713 | 714 | if !exists('g:indentLine_color_term') 715 | let g:indentLine_color_term = s:bg2[1] 716 | endif 717 | if !exists('g:indentLine_color_gui') 718 | let g:indentLine_color_gui = s:bg2[0] 719 | endif 720 | 721 | " }}} 722 | " Rainbow Parentheses: {{{ 723 | 724 | if !exists('g:rbpt_colorpairs') 725 | let g:rbpt_colorpairs = 726 | \ [ 727 | \ ['blue', '#458588'], ['magenta', '#b16286'], 728 | \ ['red', '#cc241d'], ['166', '#d65d0e'] 729 | \ ] 730 | endif 731 | 732 | let g:rainbow_guifgs = [ '#d65d0e', '#cc241d', '#b16286', '#458588' ] 733 | let g:rainbow_ctermfgs = [ '166', 'red', 'magenta', 'blue' ] 734 | 735 | if !exists('g:rainbow_conf') 736 | let g:rainbow_conf = {} 737 | endif 738 | if !has_key(g:rainbow_conf, 'guifgs') 739 | let g:rainbow_conf['guifgs'] = g:rainbow_guifgs 740 | endif 741 | if !has_key(g:rainbow_conf, 'ctermfgs') 742 | let g:rainbow_conf['ctermfgs'] = g:rainbow_ctermfgs 743 | endif 744 | 745 | let g:niji_dark_colours = g:rbpt_colorpairs 746 | let g:niji_light_colours = g:rbpt_colorpairs 747 | 748 | "}}} 749 | " GitGutter: {{{ 750 | 751 | hi! link GitGutterAdd GruvboxGreenSign 752 | hi! link GitGutterChange GruvboxAquaSign 753 | hi! link GitGutterDelete GruvboxRedSign 754 | hi! link GitGutterChangeDelete GruvboxAquaSign 755 | 756 | " }}} 757 | " GitCommit: "{{{ 758 | 759 | hi! link gitcommitSelectedFile GruvboxGreen 760 | hi! link gitcommitDiscardedFile GruvboxRed 761 | 762 | " }}} 763 | " Signify: {{{ 764 | 765 | hi! link SignifySignAdd GruvboxGreenSign 766 | hi! link SignifySignChange GruvboxAquaSign 767 | hi! link SignifySignDelete GruvboxRedSign 768 | 769 | " }}} 770 | " Syntastic: {{{ 771 | 772 | call s:HL('SyntasticError', s:none, s:none, s:undercurl, s:red) 773 | call s:HL('SyntasticWarning', s:none, s:none, s:undercurl, s:yellow) 774 | 775 | hi! link SyntasticErrorSign GruvboxRedSign 776 | hi! link SyntasticWarningSign GruvboxYellowSign 777 | 778 | " }}} 779 | " Signature: {{{ 780 | hi! link SignatureMarkText GruvboxBlueSign 781 | hi! link SignatureMarkerText GruvboxPurpleSign 782 | 783 | " }}} 784 | " ShowMarks: {{{ 785 | 786 | hi! link ShowMarksHLl GruvboxBlueSign 787 | hi! link ShowMarksHLu GruvboxBlueSign 788 | hi! link ShowMarksHLo GruvboxBlueSign 789 | hi! link ShowMarksHLm GruvboxBlueSign 790 | 791 | " }}} 792 | " CtrlP: {{{ 793 | 794 | hi! link CtrlPMatch GruvboxYellow 795 | hi! link CtrlPNoEntries GruvboxRed 796 | hi! link CtrlPPrtBase GruvboxBg2 797 | hi! link CtrlPPrtCursor GruvboxBlue 798 | hi! link CtrlPLinePre GruvboxBg2 799 | 800 | call s:HL('CtrlPMode1', s:blue, s:bg2, s:bold) 801 | call s:HL('CtrlPMode2', s:bg0, s:blue, s:bold) 802 | call s:HL('CtrlPStats', s:fg4, s:bg2, s:bold) 803 | 804 | " }}} 805 | " Startify: {{{ 806 | 807 | hi! link StartifyBracket GruvboxFg3 808 | hi! link StartifyFile GruvboxFg1 809 | hi! link StartifyNumber GruvboxBlue 810 | hi! link StartifyPath GruvboxGray 811 | hi! link StartifySlash GruvboxGray 812 | hi! link StartifySection GruvboxYellow 813 | hi! link StartifySpecial GruvboxBg2 814 | hi! link StartifyHeader GruvboxOrange 815 | hi! link StartifyFooter GruvboxBg2 816 | 817 | " }}} 818 | " Vimshell: {{{ 819 | 820 | let g:vimshell_escape_colors = [ 821 | \ s:bg4[0], s:red[0], s:green[0], s:yellow[0], 822 | \ s:blue[0], s:purple[0], s:aqua[0], s:fg4[0], 823 | \ s:bg0[0], s:red[0], s:green[0], s:orange[0], 824 | \ s:blue[0], s:purple[0], s:aqua[0], s:fg0[0] 825 | \ ] 826 | 827 | " }}} 828 | " BufTabLine: {{{ 829 | 830 | call s:HL('BufTabLineCurrent', s:bg0, s:fg4) 831 | call s:HL('BufTabLineActive', s:fg4, s:bg2) 832 | call s:HL('BufTabLineHidden', s:bg4, s:bg1) 833 | call s:HL('BufTabLineFill', s:bg0, s:bg0) 834 | 835 | " }}} 836 | " Asynchronous Lint Engine: {{{ 837 | 838 | call s:HL('ALEError', s:none, s:none, s:undercurl, s:red) 839 | call s:HL('ALEWarning', s:none, s:none, s:undercurl, s:yellow) 840 | call s:HL('ALEInfo', s:none, s:none, s:undercurl, s:blue) 841 | 842 | hi! link ALEErrorSign GruvboxRedSign 843 | hi! link ALEWarningSign GruvboxYellowSign 844 | hi! link ALEInfoSign GruvboxBlueSign 845 | 846 | " }}} 847 | " Dirvish: {{{ 848 | 849 | hi! link DirvishPathTail GruvboxAqua 850 | hi! link DirvishArg GruvboxYellow 851 | 852 | " }}} 853 | " Netrw: {{{ 854 | 855 | hi! link netrwDir GruvboxAqua 856 | hi! link netrwClassify GruvboxAqua 857 | hi! link netrwLink GruvboxGray 858 | hi! link netrwSymLink GruvboxFg1 859 | hi! link netrwExe GruvboxYellow 860 | hi! link netrwComment GruvboxGray 861 | hi! link netrwList GruvboxBlue 862 | hi! link netrwHelpCmd GruvboxAqua 863 | hi! link netrwCmdSep GruvboxFg3 864 | hi! link netrwVersion GruvboxGreen 865 | 866 | " }}} 867 | " NERDTree: {{{ 868 | 869 | hi! link NERDTreeDir GruvboxAqua 870 | hi! link NERDTreeDirSlash GruvboxAqua 871 | 872 | hi! link NERDTreeOpenable GruvboxOrange 873 | hi! link NERDTreeClosable GruvboxOrange 874 | 875 | hi! link NERDTreeFile GruvboxFg1 876 | hi! link NERDTreeExecFile GruvboxYellow 877 | 878 | hi! link NERDTreeUp GruvboxGray 879 | hi! link NERDTreeCWD GruvboxGreen 880 | hi! link NERDTreeHelp GruvboxFg1 881 | 882 | hi! link NERDTreeToggleOn GruvboxGreen 883 | hi! link NERDTreeToggleOff GruvboxRed 884 | 885 | " }}} 886 | " Vim Multiple Cursors: {{{ 887 | 888 | call s:HL('multiple_cursors_cursor', s:none, s:none, s:inverse) 889 | call s:HL('multiple_cursors_visual', s:none, s:bg2) 890 | 891 | " }}} 892 | 893 | " Filetype specific ----------------------------------------------------------- 894 | " Diff: {{{ 895 | 896 | hi! link diffAdded GruvboxGreen 897 | hi! link diffRemoved GruvboxRed 898 | hi! link diffChanged GruvboxAqua 899 | 900 | hi! link diffFile GruvboxOrange 901 | hi! link diffNewFile GruvboxYellow 902 | 903 | hi! link diffLine GruvboxBlue 904 | 905 | " }}} 906 | " Html: {{{ 907 | 908 | hi! link htmlTag GruvboxBlue 909 | hi! link htmlEndTag GruvboxBlue 910 | 911 | hi! link htmlTagName GruvboxAquaBold 912 | hi! link htmlArg GruvboxAqua 913 | 914 | hi! link htmlScriptTag GruvboxPurple 915 | hi! link htmlTagN GruvboxFg1 916 | hi! link htmlSpecialTagName GruvboxAquaBold 917 | 918 | call s:HL('htmlLink', s:fg4, s:none, s:underline) 919 | 920 | hi! link htmlSpecialChar GruvboxOrange 921 | 922 | call s:HL('htmlBold', s:vim_fg, s:vim_bg, s:bold) 923 | call s:HL('htmlBoldUnderline', s:vim_fg, s:vim_bg, s:bold . s:underline) 924 | call s:HL('htmlBoldItalic', s:vim_fg, s:vim_bg, s:bold . s:italic) 925 | call s:HL('htmlBoldUnderlineItalic', s:vim_fg, s:vim_bg, s:bold . s:underline . s:italic) 926 | 927 | call s:HL('htmlUnderline', s:vim_fg, s:vim_bg, s:underline) 928 | call s:HL('htmlUnderlineItalic', s:vim_fg, s:vim_bg, s:underline . s:italic) 929 | call s:HL('htmlItalic', s:vim_fg, s:vim_bg, s:italic) 930 | 931 | " }}} 932 | " Xml: {{{ 933 | 934 | hi! link xmlTag GruvboxBlue 935 | hi! link xmlEndTag GruvboxBlue 936 | hi! link xmlTagName GruvboxBlue 937 | hi! link xmlEqual GruvboxBlue 938 | hi! link docbkKeyword GruvboxAquaBold 939 | 940 | hi! link xmlDocTypeDecl GruvboxGray 941 | hi! link xmlDocTypeKeyword GruvboxPurple 942 | hi! link xmlCdataStart GruvboxGray 943 | hi! link xmlCdataCdata GruvboxPurple 944 | hi! link dtdFunction GruvboxGray 945 | hi! link dtdTagName GruvboxPurple 946 | 947 | hi! link xmlAttrib GruvboxAqua 948 | hi! link xmlProcessingDelim GruvboxGray 949 | hi! link dtdParamEntityPunct GruvboxGray 950 | hi! link dtdParamEntityDPunct GruvboxGray 951 | hi! link xmlAttribPunct GruvboxGray 952 | 953 | hi! link xmlEntity GruvboxOrange 954 | hi! link xmlEntityPunct GruvboxOrange 955 | " }}} 956 | " Vim: {{{ 957 | 958 | call s:HL('vimCommentTitle', s:fg4_256, s:none, s:bold . s:italicize_comments) 959 | 960 | hi! link vimNotation GruvboxOrange 961 | hi! link vimBracket GruvboxOrange 962 | hi! link vimMapModKey GruvboxOrange 963 | hi! link vimFuncSID GruvboxFg3 964 | hi! link vimSetSep GruvboxFg3 965 | hi! link vimSep GruvboxFg3 966 | hi! link vimContinue GruvboxFg3 967 | 968 | " }}} 969 | " Clojure: {{{ 970 | 971 | hi! link clojureKeyword GruvboxBlue 972 | hi! link clojureCond GruvboxOrange 973 | hi! link clojureSpecial GruvboxOrange 974 | hi! link clojureDefine GruvboxOrange 975 | 976 | hi! link clojureFunc GruvboxYellow 977 | hi! link clojureRepeat GruvboxYellow 978 | hi! link clojureCharacter GruvboxAqua 979 | hi! link clojureStringEscape GruvboxAqua 980 | hi! link clojureException GruvboxRed 981 | 982 | hi! link clojureRegexp GruvboxAqua 983 | hi! link clojureRegexpEscape GruvboxAqua 984 | call s:HL('clojureRegexpCharClass', s:fg3, s:none, s:bold) 985 | hi! link clojureRegexpMod clojureRegexpCharClass 986 | hi! link clojureRegexpQuantifier clojureRegexpCharClass 987 | 988 | hi! link clojureParen GruvboxFg3 989 | hi! link clojureAnonArg GruvboxYellow 990 | hi! link clojureVariable GruvboxBlue 991 | hi! link clojureMacro GruvboxOrange 992 | 993 | hi! link clojureMeta GruvboxYellow 994 | hi! link clojureDeref GruvboxYellow 995 | hi! link clojureQuote GruvboxYellow 996 | hi! link clojureUnquote GruvboxYellow 997 | 998 | " }}} 999 | " C: {{{ 1000 | 1001 | hi! link cOperator GruvboxPurple 1002 | hi! link cStructure GruvboxOrange 1003 | 1004 | " }}} 1005 | " Python: {{{ 1006 | 1007 | hi! link pythonBuiltin GruvboxOrange 1008 | hi! link pythonBuiltinObj GruvboxOrange 1009 | hi! link pythonBuiltinFunc GruvboxOrange 1010 | hi! link pythonFunction GruvboxAqua 1011 | hi! link pythonDecorator GruvboxRed 1012 | hi! link pythonInclude GruvboxBlue 1013 | hi! link pythonImport GruvboxBlue 1014 | hi! link pythonRun GruvboxBlue 1015 | hi! link pythonCoding GruvboxBlue 1016 | hi! link pythonOperator GruvboxRed 1017 | hi! link pythonException GruvboxRed 1018 | hi! link pythonExceptions GruvboxPurple 1019 | hi! link pythonBoolean GruvboxPurple 1020 | hi! link pythonDot GruvboxFg3 1021 | hi! link pythonConditional GruvboxRed 1022 | hi! link pythonRepeat GruvboxRed 1023 | hi! link pythonDottedName GruvboxGreenBold 1024 | 1025 | " }}} 1026 | " CSS: {{{ 1027 | 1028 | hi! link cssBraces GruvboxBlue 1029 | hi! link cssFunctionName GruvboxYellow 1030 | hi! link cssIdentifier GruvboxOrange 1031 | hi! link cssClassName GruvboxGreen 1032 | hi! link cssColor GruvboxBlue 1033 | hi! link cssSelectorOp GruvboxBlue 1034 | hi! link cssSelectorOp2 GruvboxBlue 1035 | hi! link cssImportant GruvboxGreen 1036 | hi! link cssVendor GruvboxFg1 1037 | 1038 | hi! link cssTextProp GruvboxAqua 1039 | hi! link cssAnimationProp GruvboxAqua 1040 | hi! link cssUIProp GruvboxYellow 1041 | hi! link cssTransformProp GruvboxAqua 1042 | hi! link cssTransitionProp GruvboxAqua 1043 | hi! link cssPrintProp GruvboxAqua 1044 | hi! link cssPositioningProp GruvboxYellow 1045 | hi! link cssBoxProp GruvboxAqua 1046 | hi! link cssFontDescriptorProp GruvboxAqua 1047 | hi! link cssFlexibleBoxProp GruvboxAqua 1048 | hi! link cssBorderOutlineProp GruvboxAqua 1049 | hi! link cssBackgroundProp GruvboxAqua 1050 | hi! link cssMarginProp GruvboxAqua 1051 | hi! link cssListProp GruvboxAqua 1052 | hi! link cssTableProp GruvboxAqua 1053 | hi! link cssFontProp GruvboxAqua 1054 | hi! link cssPaddingProp GruvboxAqua 1055 | hi! link cssDimensionProp GruvboxAqua 1056 | hi! link cssRenderProp GruvboxAqua 1057 | hi! link cssColorProp GruvboxAqua 1058 | hi! link cssGeneratedContentProp GruvboxAqua 1059 | 1060 | " }}} 1061 | " JavaScript: {{{ 1062 | 1063 | hi! link javaScriptBraces GruvboxFg1 1064 | hi! link javaScriptFunction GruvboxAqua 1065 | hi! link javaScriptIdentifier GruvboxRed 1066 | hi! link javaScriptMember GruvboxBlue 1067 | hi! link javaScriptNumber GruvboxPurple 1068 | hi! link javaScriptNull GruvboxPurple 1069 | hi! link javaScriptParens GruvboxFg3 1070 | 1071 | " }}} 1072 | " YAJS: {{{ 1073 | 1074 | hi! link javascriptImport GruvboxAqua 1075 | hi! link javascriptExport GruvboxAqua 1076 | hi! link javascriptClassKeyword GruvboxAqua 1077 | hi! link javascriptClassExtends GruvboxAqua 1078 | hi! link javascriptDefault GruvboxAqua 1079 | 1080 | hi! link javascriptClassName GruvboxYellow 1081 | hi! link javascriptClassSuperName GruvboxYellow 1082 | hi! link javascriptGlobal GruvboxYellow 1083 | 1084 | hi! link javascriptEndColons GruvboxFg1 1085 | hi! link javascriptFuncArg GruvboxFg1 1086 | hi! link javascriptGlobalMethod GruvboxFg1 1087 | hi! link javascriptNodeGlobal GruvboxFg1 1088 | hi! link javascriptBOMWindowProp GruvboxFg1 1089 | hi! link javascriptArrayMethod GruvboxFg1 1090 | hi! link javascriptArrayStaticMethod GruvboxFg1 1091 | hi! link javascriptCacheMethod GruvboxFg1 1092 | hi! link javascriptDateMethod GruvboxFg1 1093 | hi! link javascriptMathStaticMethod GruvboxFg1 1094 | 1095 | " hi! link javascriptProp GruvboxFg1 1096 | hi! link javascriptURLUtilsProp GruvboxFg1 1097 | hi! link javascriptBOMNavigatorProp GruvboxFg1 1098 | hi! link javascriptDOMDocMethod GruvboxFg1 1099 | hi! link javascriptDOMDocProp GruvboxFg1 1100 | hi! link javascriptBOMLocationMethod GruvboxFg1 1101 | hi! link javascriptBOMWindowMethod GruvboxFg1 1102 | hi! link javascriptStringMethod GruvboxFg1 1103 | 1104 | hi! link javascriptVariable GruvboxOrange 1105 | " hi! link javascriptVariable GruvboxRed 1106 | " hi! link javascriptIdentifier GruvboxOrange 1107 | " hi! link javascriptClassSuper GruvboxOrange 1108 | hi! link javascriptIdentifier GruvboxOrange 1109 | hi! link javascriptClassSuper GruvboxOrange 1110 | 1111 | " hi! link javascriptFuncKeyword GruvboxOrange 1112 | " hi! link javascriptAsyncFunc GruvboxOrange 1113 | hi! link javascriptFuncKeyword GruvboxAqua 1114 | hi! link javascriptAsyncFunc GruvboxAqua 1115 | hi! link javascriptClassStatic GruvboxOrange 1116 | 1117 | hi! link javascriptOperator GruvboxRed 1118 | hi! link javascriptForOperator GruvboxRed 1119 | hi! link javascriptYield GruvboxRed 1120 | hi! link javascriptExceptions GruvboxRed 1121 | hi! link javascriptMessage GruvboxRed 1122 | 1123 | hi! link javascriptTemplateSB GruvboxAqua 1124 | hi! link javascriptTemplateSubstitution GruvboxFg1 1125 | 1126 | " hi! link javascriptLabel GruvboxBlue 1127 | " hi! link javascriptObjectLabel GruvboxBlue 1128 | " hi! link javascriptPropertyName GruvboxBlue 1129 | hi! link javascriptLabel GruvboxFg1 1130 | hi! link javascriptObjectLabel GruvboxFg1 1131 | hi! link javascriptPropertyName GruvboxFg1 1132 | 1133 | hi! link javascriptLogicSymbols GruvboxFg1 1134 | hi! link javascriptArrowFunc GruvboxYellow 1135 | 1136 | hi! link javascriptDocParamName GruvboxFg4 1137 | hi! link javascriptDocTags GruvboxFg4 1138 | hi! link javascriptDocNotation GruvboxFg4 1139 | hi! link javascriptDocParamType GruvboxFg4 1140 | hi! link javascriptDocNamedParamType GruvboxFg4 1141 | 1142 | hi! link javascriptBrackets GruvboxFg1 1143 | hi! link javascriptDOMElemAttrs GruvboxFg1 1144 | hi! link javascriptDOMEventMethod GruvboxFg1 1145 | hi! link javascriptDOMNodeMethod GruvboxFg1 1146 | hi! link javascriptDOMStorageMethod GruvboxFg1 1147 | hi! link javascriptHeadersMethod GruvboxFg1 1148 | 1149 | hi! link javascriptAsyncFuncKeyword GruvboxRed 1150 | hi! link javascriptAwaitFuncKeyword GruvboxRed 1151 | 1152 | " }}} 1153 | " PanglossJS: {{{ 1154 | 1155 | hi! link jsClassKeyword GruvboxAqua 1156 | hi! link jsExtendsKeyword GruvboxAqua 1157 | hi! link jsExportDefault GruvboxAqua 1158 | hi! link jsTemplateBraces GruvboxAqua 1159 | hi! link jsGlobalNodeObjects GruvboxFg1 1160 | hi! link jsGlobalObjects GruvboxFg1 1161 | hi! link jsFunction GruvboxAqua 1162 | hi! link jsFuncParens GruvboxFg3 1163 | hi! link jsParens GruvboxFg3 1164 | hi! link jsNull GruvboxPurple 1165 | hi! link jsUndefined GruvboxPurple 1166 | hi! link jsClassDefinition GruvboxYellow 1167 | 1168 | " }}} 1169 | " TypeScript: {{{ 1170 | 1171 | hi! link typeScriptReserved GruvboxAqua 1172 | hi! link typeScriptLabel GruvboxAqua 1173 | hi! link typeScriptFuncKeyword GruvboxAqua 1174 | hi! link typeScriptIdentifier GruvboxOrange 1175 | hi! link typeScriptBraces GruvboxFg1 1176 | hi! link typeScriptEndColons GruvboxFg1 1177 | hi! link typeScriptDOMObjects GruvboxFg1 1178 | hi! link typeScriptAjaxMethods GruvboxFg1 1179 | hi! link typeScriptLogicSymbols GruvboxFg1 1180 | hi! link typeScriptDocSeeTag Comment 1181 | hi! link typeScriptDocParam Comment 1182 | hi! link typeScriptDocTags vimCommentTitle 1183 | hi! link typeScriptGlobalObjects GruvboxFg1 1184 | hi! link typeScriptParens GruvboxFg3 1185 | hi! link typeScriptOpSymbols GruvboxFg3 1186 | hi! link typeScriptHtmlElemProperties GruvboxFg1 1187 | hi! link typeScriptNull GruvboxPurple 1188 | hi! link typeScriptInterpolationDelimiter GruvboxAqua 1189 | 1190 | " }}} 1191 | " PureScript: {{{ 1192 | 1193 | hi! link purescriptModuleKeyword GruvboxAqua 1194 | hi! link purescriptModuleName GruvboxFg1 1195 | hi! link purescriptWhere GruvboxAqua 1196 | hi! link purescriptDelimiter GruvboxFg4 1197 | hi! link purescriptType GruvboxFg1 1198 | hi! link purescriptImportKeyword GruvboxAqua 1199 | hi! link purescriptHidingKeyword GruvboxAqua 1200 | hi! link purescriptAsKeyword GruvboxAqua 1201 | hi! link purescriptStructure GruvboxAqua 1202 | hi! link purescriptOperator GruvboxBlue 1203 | 1204 | hi! link purescriptTypeVar GruvboxFg1 1205 | hi! link purescriptConstructor GruvboxFg1 1206 | hi! link purescriptFunction GruvboxFg1 1207 | hi! link purescriptConditional GruvboxOrange 1208 | hi! link purescriptBacktick GruvboxOrange 1209 | 1210 | " }}} 1211 | " CoffeeScript: {{{ 1212 | 1213 | hi! link coffeeExtendedOp GruvboxFg3 1214 | hi! link coffeeSpecialOp GruvboxFg3 1215 | hi! link coffeeCurly GruvboxOrange 1216 | hi! link coffeeParen GruvboxFg3 1217 | hi! link coffeeBracket GruvboxOrange 1218 | 1219 | " }}} 1220 | " Ruby: {{{ 1221 | 1222 | hi! link rubyStringDelimiter GruvboxGreen 1223 | hi! link rubyInterpolationDelimiter GruvboxAqua 1224 | 1225 | " }}} 1226 | " ObjectiveC: {{{ 1227 | 1228 | hi! link objcTypeModifier GruvboxRed 1229 | hi! link objcDirective GruvboxBlue 1230 | 1231 | " }}} 1232 | " Go: {{{ 1233 | 1234 | hi! link goDirective GruvboxAqua 1235 | hi! link goConstants GruvboxPurple 1236 | hi! link goDeclaration GruvboxRed 1237 | hi! link goDeclType GruvboxBlue 1238 | hi! link goBuiltins GruvboxOrange 1239 | 1240 | " }}} 1241 | " Lua: {{{ 1242 | 1243 | hi! link luaIn GruvboxRed 1244 | hi! link luaFunction GruvboxAqua 1245 | hi! link luaTable GruvboxOrange 1246 | 1247 | " }}} 1248 | " MoonScript: {{{ 1249 | 1250 | hi! link moonSpecialOp GruvboxFg3 1251 | hi! link moonExtendedOp GruvboxFg3 1252 | hi! link moonFunction GruvboxFg3 1253 | hi! link moonObject GruvboxYellow 1254 | 1255 | " }}} 1256 | " Java: {{{ 1257 | 1258 | hi! link javaAnnotation GruvboxBlue 1259 | hi! link javaDocTags GruvboxAqua 1260 | hi! link javaCommentTitle vimCommentTitle 1261 | hi! link javaParen GruvboxFg3 1262 | hi! link javaParen1 GruvboxFg3 1263 | hi! link javaParen2 GruvboxFg3 1264 | hi! link javaParen3 GruvboxFg3 1265 | hi! link javaParen4 GruvboxFg3 1266 | hi! link javaParen5 GruvboxFg3 1267 | hi! link javaOperator GruvboxOrange 1268 | 1269 | hi! link javaVarArg GruvboxGreen 1270 | 1271 | " }}} 1272 | " Elixir: {{{ 1273 | 1274 | hi! link elixirDocString Comment 1275 | 1276 | hi! link elixirStringDelimiter GruvboxGreen 1277 | hi! link elixirInterpolationDelimiter GruvboxAqua 1278 | 1279 | hi! link elixirModuleDeclaration GruvboxYellow 1280 | 1281 | " }}} 1282 | " Scala: {{{ 1283 | 1284 | " NB: scala vim syntax file is kinda horrible 1285 | hi! link scalaNameDefinition GruvboxFg1 1286 | hi! link scalaCaseFollowing GruvboxFg1 1287 | hi! link scalaCapitalWord GruvboxFg1 1288 | hi! link scalaTypeExtension GruvboxFg1 1289 | 1290 | hi! link scalaKeyword GruvboxRed 1291 | hi! link scalaKeywordModifier GruvboxRed 1292 | 1293 | hi! link scalaSpecial GruvboxAqua 1294 | hi! link scalaOperator GruvboxFg1 1295 | 1296 | hi! link scalaTypeDeclaration GruvboxYellow 1297 | hi! link scalaTypeTypePostDeclaration GruvboxYellow 1298 | 1299 | hi! link scalaInstanceDeclaration GruvboxFg1 1300 | hi! link scalaInterpolation GruvboxAqua 1301 | 1302 | " }}} 1303 | " Markdown: {{{ 1304 | 1305 | call s:HL('markdownItalic', s:fg3, s:none, s:italic) 1306 | 1307 | hi! link markdownH1 GruvboxGreenBold 1308 | hi! link markdownH2 GruvboxGreenBold 1309 | hi! link markdownH3 GruvboxYellowBold 1310 | hi! link markdownH4 GruvboxYellowBold 1311 | hi! link markdownH5 GruvboxYellow 1312 | hi! link markdownH6 GruvboxYellow 1313 | 1314 | hi! link markdownCode GruvboxAqua 1315 | hi! link markdownCodeBlock GruvboxAqua 1316 | hi! link markdownCodeDelimiter GruvboxAqua 1317 | 1318 | hi! link markdownBlockquote GruvboxGray 1319 | hi! link markdownListMarker GruvboxGray 1320 | hi! link markdownOrderedListMarker GruvboxGray 1321 | hi! link markdownRule GruvboxGray 1322 | hi! link markdownHeadingRule GruvboxGray 1323 | 1324 | hi! link markdownUrlDelimiter GruvboxFg3 1325 | hi! link markdownLinkDelimiter GruvboxFg3 1326 | hi! link markdownLinkTextDelimiter GruvboxFg3 1327 | 1328 | hi! link markdownHeadingDelimiter GruvboxOrange 1329 | hi! link markdownUrl GruvboxPurple 1330 | hi! link markdownUrlTitleDelimiter GruvboxGreen 1331 | 1332 | call s:HL('markdownLinkText', s:gray, s:none, s:underline) 1333 | hi! link markdownIdDeclaration markdownLinkText 1334 | 1335 | " }}} 1336 | " Haskell: {{{ 1337 | 1338 | " hi! link haskellType GruvboxYellow 1339 | " hi! link haskellOperators GruvboxOrange 1340 | " hi! link haskellConditional GruvboxAqua 1341 | " hi! link haskellLet GruvboxOrange 1342 | " 1343 | hi! link haskellType GruvboxFg1 1344 | hi! link haskellIdentifier GruvboxFg1 1345 | hi! link haskellSeparator GruvboxFg1 1346 | hi! link haskellDelimiter GruvboxFg4 1347 | hi! link haskellOperators GruvboxBlue 1348 | " 1349 | hi! link haskellBacktick GruvboxOrange 1350 | hi! link haskellStatement GruvboxOrange 1351 | hi! link haskellConditional GruvboxOrange 1352 | 1353 | hi! link haskellLet GruvboxAqua 1354 | hi! link haskellDefault GruvboxAqua 1355 | hi! link haskellWhere GruvboxAqua 1356 | hi! link haskellBottom GruvboxAqua 1357 | hi! link haskellBlockKeywords GruvboxAqua 1358 | hi! link haskellImportKeywords GruvboxAqua 1359 | hi! link haskellDeclKeyword GruvboxAqua 1360 | hi! link haskellDeriving GruvboxAqua 1361 | hi! link haskellAssocType GruvboxAqua 1362 | 1363 | hi! link haskellNumber GruvboxPurple 1364 | hi! link haskellPragma GruvboxPurple 1365 | 1366 | hi! link haskellString GruvboxGreen 1367 | hi! link haskellChar GruvboxGreen 1368 | 1369 | " }}} 1370 | " Json: {{{ 1371 | 1372 | hi! link jsonKeyword GruvboxGreen 1373 | hi! link jsonQuote GruvboxGreen 1374 | hi! link jsonBraces GruvboxFg1 1375 | hi! link jsonString GruvboxFg1 1376 | 1377 | " }}} 1378 | 1379 | 1380 | " Functions ------------------------------------------------------------------- 1381 | " Search Highlighting Cursor {{{ 1382 | 1383 | function! GruvboxHlsShowCursor() 1384 | call s:HL('Cursor', s:bg0, s:hls_cursor) 1385 | endfunction 1386 | 1387 | function! GruvboxHlsHideCursor() 1388 | call s:HL('Cursor', s:none, s:none, s:inverse) 1389 | endfunction 1390 | 1391 | " }}} 1392 | 1393 | " vim: set sw=2 ts=2 sts=2 et tw=80 ft=vim fdm=marker: 1394 | -------------------------------------------------------------------------------- /nvim/init.vim: -------------------------------------------------------------------------------- 1 | " 2 | " Author: Vinicius Souza - http://github.com/vsouza 3 | " For more information type :help followed by the command. 4 | 5 | 6 | if has('vim_starting') 7 | set nocompatible " Be iMproved 8 | endif 9 | 10 | let vimplug_exists=expand('~/.config/nvim/autoload/plug.vim') 11 | 12 | let g:vim_bootstrap_langs = "python,ruby,go,elixir" 13 | let g:vim_bootstrap_editor = "nvim" " nvim or vim 14 | 15 | 16 | " Basic configuration 17 | set background=dark 18 | colorscheme gruvbox 19 | set guifont=Hack\ Regular:h11 20 | let $NVIM_TUI_ENABLE_TRUE_COLOR=1 21 | set nolist 22 | set ttyfast 23 | set regexpengine=1 24 | set noshowcmd 25 | set synmaxcol=200 26 | 27 | 28 | syntax enable " enable syntax processing 29 | set linebreak " Causes vim to not wrap text in the middle of a word 30 | set pastetoggle= " Useful so auto-indenting doesn't mess up code when pasting 31 | filetype plugin indent on 32 | set encoding=utf-8 33 | set backspace=indent,eol,start 34 | set clipboard=unnamed 35 | set noexpandtab 36 | set copyindent 37 | set preserveindent 38 | set softtabstop=0 39 | set shiftwidth=2 40 | set tabstop=2 41 | 42 | " Enable folding 43 | nnoremap za 44 | 45 | " UI config 46 | set number " show line numbers 47 | set showmatch " highlight matching [{()}] 48 | 49 | set nolazyredraw 50 | set ruler 51 | set visualbell 52 | 53 | " split settings 54 | set splitright 55 | set splitbelow 56 | 57 | let mapleader=" " 58 | nnoremap 59 | 60 | if !filereadable(vimplug_exists) 61 | echo "Installing Vim-Plug..." 62 | echo "" 63 | silent !\curl -fLo ~/.config/nvim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim 64 | let g:not_finish_vimplug = "yes" 65 | 66 | autocmd VimEnter * PlugInstall 67 | endif 68 | 69 | " Required: 70 | call plug#begin(expand('~/.config/nvim/plugged')) 71 | 72 | Plug 'mileszs/ack.vim' 73 | Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' } 74 | Plug 'kien/ctrlp.vim' 75 | Plug 'terryma/vim-multiple-cursors' 76 | Plug 'JamshedVesuna/vim-markdown-preview' 77 | Plug 'slashmili/alchemist.vim' 78 | " View 79 | Plug 'majutsushi/tagbar' 80 | Plug 'rlue/vim-fold-rspec' 81 | Plug 'junegunn/goyo.vim' 82 | Plug 'morhetz/gruvbox' 83 | Plug 'fatih/vim-go', { 'do': ':GoUpdateBinaries' } 84 | 85 | call plug#end() 86 | 87 | """"" Navigate between tabs 88 | noremap 1 1gt 89 | noremap 2 2gt 90 | noremap 3 3gt 91 | noremap 4 4gt 92 | noremap 5 5gt 93 | noremap 6 6gt 94 | noremap 7 7gt 95 | noremap 8 8gt 96 | noremap 9 9gt 97 | noremap 0 :tablast 98 | 99 | "" new blank lines 100 | map o 101 | map O 102 | 103 | 104 | """""" Nerdtree 105 | nmap \ :NERDTreeToggle 106 | 107 | " Airline 108 | let g:airline_theme='gruvbox' 109 | 110 | " Remove whitespaces on save 111 | autocmd BufWritePre * %s/\s\+$//e 112 | 113 | " CTRLP config 114 | set wildignore+=*/tmp/*,*.so,*.swp,*.zip 115 | let g:ctrlp_custom_ignore = { 116 | \ 'dir': '\v[\/]\.(git|hg|deps|svn)$', 117 | \ 'file': '\v\.(exe|so|dll|.DS_Store)$', 118 | \ } 119 | 120 | set backupdir=~/.vim/backup// 121 | set directory=~/.vim/swap// 122 | set undodir=~/.vim/undo// 123 | 124 | au FileType ruby,eruby setl ofu=rubycomplete#Complete 125 | 126 | " set the expandtab 127 | au FileType ruby,javascript,python,html,erb,yaml,yml,playbook,lua set expandtab 128 | " 129 | " conver tabs to spaces on open or save files 130 | au BufRead,BufWrite *.rb,*.js,*[rR]akefile,*.py,*.yml,*.playbook,*.lua retab 131 | 132 | " deoplete 133 | let g:deoplete#enable_at_startup = 1 134 | 135 | " github flavored markdown 136 | let vim_markdown_preview_github=1 137 | let vim_markdown_preview_hotkey='' 138 | 139 | " tagbar 140 | nmap / :TagbarToggle 141 | 142 | " ctrlp 143 | let g:ctrlp_custom_ignore = 'deps\|DS_Store\|git|plug\' 144 | 145 | " rspec folding 146 | let g:fold_rspec_foldenable = 0 " disables folding (toggle with `zi`) 147 | let g:fold_rspec_foldlevel = 2 " sets initial open/closed state of all folds (open unless nested more than two levels deep) 148 | let g:fold_rspec_foldcolumn = 4 " shows a 4-character column on the lefthand side of the window displaying the document's fold structure 149 | let g:fold_rspec_foldclose = 'all' " closes folds automatically when the cursor is moved out of them (only applies to folds deeper than 'foldlevel') 150 | let g:fold_rspec_foldminlines = 3 " disables closing of folds containing two lines or fewer 151 | -------------------------------------------------------------------------------- /osx.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | source $HOME/dotfiles/log.sh 3 | 4 | 5 | 6 | sudo -v 7 | 8 | ############################################################################### 9 | # General UI/UX 10 | ############################################################################### 11 | 12 | msg_nested_lvl_done "[General] Set your computer name" 13 | sudo scutil --set ComputerName "vsouza" 14 | sudo scutil --set HostName "vsouza" 15 | sudo scutil --set LocalHostName "vsouza" 16 | 17 | 18 | # Disable Creation of Metadata Files on Network Volumes 19 | defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true 20 | 21 | # Disable Creation of Metadata Files on USB Volumes 22 | defaults write com.apple.desktopservices DSDontWriteUSBStores -bool true 23 | 24 | 25 | msg_nested_lvl_done "[General] Increasing the window resize speed for Cocoa applications" 26 | defaults write NSGlobalDomain NSWindowResizeTime -float 0.001 27 | 28 | 29 | msg_nested_lvl_done "[General] Expanding the save panel by default" 30 | defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true 31 | defaults write NSGlobalDomain PMPrintingExpandedStateForPrint -bool true 32 | defaults write NSGlobalDomain PMPrintingExpandedStateForPrint2 -bool true 33 | 34 | 35 | msg_nested_lvl_done "[General] Automatically quit printer app once the print jobs complete" 36 | defaults write com.apple.print.PrintingPrefs "Quit When Finished" -bool true 37 | 38 | msg_nested_lvl_done "[General] Displaying ASCII control characters using caret notation in standard text views" 39 | defaults write NSGlobalDomain NSTextShowsControlCharacters -bool true 40 | 41 | msg_nested_lvl_done "[General] Save to disk, rather than iCloud, by default)" 42 | defaults write NSGlobalDomain NSDocumentSaveNewDocumentsToCloud -bool false 43 | 44 | msg_nested_lvl_done "[General] Reveal IP address, hostname, OS version, etc. when clicking the clock in the login window" 45 | sudo defaults write /Library/Preferences/com.apple.loginwindow AdminHostInfo HostName 46 | 47 | msg_nested_lvl_done "[General] Check for software updates daily, not just once per week" 48 | defaults write com.apple.SoftwareUpdate ScheduleFrequency -int 1 49 | 50 | msg_nested_lvl_done "[General] Removing duplicates in the 'Open With' menu" 51 | /System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user 52 | 53 | 54 | msg_nested_lvl_done "[General] Disable smart quotes and smart dashes)" 55 | defaults write NSGlobalDomain NSAutomaticQuoteSubstitutionEnabled -bool false 56 | defaults write NSGlobalDomain NSAutomaticDashSubstitutionEnabled -bool false 57 | 58 | msg_nested_lvl_done "[General] Add ability to toggle between Light and Dark mode in Yosemite using ctrl+opt+cmd+t)" 59 | # http://www.reddit.com/r/apple/comments/2jr6s2/1010_i_found_a_way_to_dynamically_switch_between/ 60 | sudo defaults write /Library/Preferences/.GlobalPreferences.plist _HIEnableThemeSwitchHotKey -bool true 61 | 62 | msg_nested_lvl_done "[General] Disable auto-correct" 63 | defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false 64 | 65 | 66 | ############################################################################### 67 | # General Power and Performance modifications 68 | ############################################################################### 69 | 70 | 71 | msg_nested_lvl_done "[Power] Enable hibernation" 72 | sudo pmset -a hibernatemode 0 73 | 74 | msg_nested_lvl_done "[Power] Remove the sleep image file to save disk space)" 75 | sudo rm /Private/var/vm/sleepimage 76 | msg_nested_lvl_done "Creating a zero-byte file instead" 77 | sudo touch /Private/var/vm/sleepimage 78 | msg_nested_lvl_done "and make sure it can't be rewritten" 79 | sudo chflags uchg /Private/var/vm/sleepimage 80 | 81 | msg_nested_lvl_done "[Power] Disable the menubar transparency)" 82 | defaults write com.apple.universalaccess reduceTransparency -bool true 83 | 84 | 85 | msg_nested_lvl_done "[Power] Speeding up wake from sleep to 24 hours from an hour" 86 | # http://www.cultofmac.com/221392/quick-hack-speeds-up-retina-macbooks-wake-from-sleep-os-x-tips/ 87 | sudo pmset -a standbydelay 86400 88 | 89 | 90 | ################################################################################ 91 | # Trackpad, mouse, keyboard, Bluetooth accessories, and input 92 | ############################################################################### 93 | 94 | msg_nested_lvl_done "[Accessories] Increasing sound quality for Bluetooth headphones/headsets" 95 | defaults write com.apple.BluetoothAudioAgent "Apple Bitpool Min (editable)" -int 40 96 | 97 | 98 | msg_nested_lvl_done "[Accessories] Enabling full keyboard access for all controls (enable Tab in modal dialogs, menu windows, etc.)" 99 | defaults write NSGlobalDomain AppleKeyboardUIMode -int 3 100 | 101 | 102 | msg_nested_lvl_done "[Accessories] Disabling press-and-hold for special keys in favor of key repeat" 103 | defaults write NSGlobalDomain ApplePressAndHoldEnabled -bool false 104 | 105 | 106 | msg_nested_lvl_done "[Accessories] Setting a blazingly fast keyboard repeat rate" 107 | defaults write NSGlobalDomain KeyRepeat -int 0 108 | 109 | 110 | msg_nested_lvl_done "[Accessories] Setting trackpad speed to 2 & mouse speed to 2.5" 111 | defaults write -g com.apple.trackpad.scaling 2 112 | defaults write -g com.apple.mouse.scaling 2.5 113 | 114 | msg_nested_lvl_done "[Accessories] Turn off keyboard illumination when computer is not used for 5 minutes" 115 | defaults write com.apple.BezelServices kDimTime -int 300 116 | 117 | 118 | msg_nested_lvl_done "[Accessories] Disable display from automatically adjusting brightness)" 119 | sudo defaults write /Library/Preferences/com.apple.iokit.AmbientLightSensor "Automatic Display Enabled" -bool false 120 | 121 | msg_nested_lvl_done "[Accessories] Disable keyboard from automatically adjusting backlight brightness in low light)" 122 | sudo defaults write /Library/Preferences/com.apple.iokit.AmbientLightSensor "Automatic Keyboard Enabled" -bool false 123 | 124 | ############################################################################### 125 | # Screen 126 | ############################################################################### 127 | msg_nested_lvl_done "[Screen] Requiring password immediately after sleep or screen saver begins" 128 | defaults write com.apple.screensaver askForPassword -int 1 129 | defaults write com.apple.screensaver askForPasswordDelay -int 0 130 | 131 | 132 | msg_nested_lvl_done "[Screen] Store screenshots in $HOME/Pictures/scheenshots folder" 133 | if [ ! -d "${HOME}/Pictures/screenshots" ]; then 134 | mkdir ${HOME}/Pictures/screenshots 135 | fi 136 | screenshot_location="${HOME}/Pictures/screenshots" 137 | defaults write com.apple.screencapture location -string "${screenshot_location}" 138 | 139 | 140 | msg_nested_lvl_done "[Screen] Save screenshots in .png format" 141 | defaults write com.apple.screencapture type -string "png" 142 | 143 | msg_nested_lvl_done "[Screen] Enabling HiDPI display modes (requires restart)" 144 | sudo defaults write /Library/Preferences/com.apple.windowserver DisplayResolutionEnabled -bool true 145 | 146 | ############################################################################### 147 | # Finder 148 | ############################################################################### 149 | 150 | msg_nested_lvl_done "[Finder] Show icons for hard drives, servers, and removable media on the desktop)" 151 | defaults write com.apple.finder ShowExternalHardDrivesOnDesktop -bool true 152 | 153 | 154 | msg_nested_lvl_done "[Finder] Show hidden files in Finder by default)" 155 | defaults write com.apple.Finder AppleShowAllFiles -bool true 156 | 157 | 158 | msg_nested_lvl_done "[Finder] Show dotfiles in Finder by default)" 159 | defaults write com.apple.finder AppleShowAllFiles TRUE 160 | 161 | 162 | msg_nested_lvl_done "[Finder] Show all filename extensions in Finder by default)" 163 | defaults write NSGlobalDomain AppleShowAllExtensions -bool true 164 | 165 | msg_nested_lvl_done "[Finder] Show status bar in Finder by default)" 166 | defaults write com.apple.finder ShowStatusBar -bool true 167 | 168 | msg_nested_lvl_done "[Finder] Display full POSIX path as Finder window title)" 169 | defaults write com.apple.finder _FXShowPosixPathInTitle -bool true 170 | 171 | msg_nested_lvl_done "[Finder] Use column view in all Finder windows by default)" 172 | defaults write com.apple.finder FXPreferredViewStyle Clmv 173 | 174 | 175 | msg_nested_lvl_done "[Finder] Avoid creation of .DS_Store files on network volumes)" 176 | defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true 177 | 178 | msg_nested_lvl_done "[Finder] Disable disk image verification" 179 | defaults write com.apple.frameworks.diskimages skip-verify -bool true 180 | defaults write com.apple.frameworks.diskimages skip-verify-locked -bool true 181 | defaults write com.apple.frameworks.diskimages skip-verify-remote -bool true 182 | 183 | 184 | msg_nested_lvl_done "[Finder] Allowing text selection in Quick Look/Preview in Finder by default" 185 | defaults write com.apple.finder QLEnableTextSelection -bool true 186 | 187 | msg_nested_lvl_done "[Finder] Enabling snap-to-grid for icons on the desktop and in other icon views" 188 | /usr/libexec/PlistBuddy -c "Set :DesktopViewSettings:IconViewSettings:arrangeBy grid" ~/Library/Preferences/com.apple.finder.plist 189 | /usr/libexec/PlistBuddy -c "Set :FK_StandardViewSettings:IconViewSettings:arrangeBy grid" ~/Library/Preferences/com.apple.finder.plist 190 | /usr/libexec/PlistBuddy -c "Set :StandardViewSettings:IconViewSettings:arrangeBy grid" ~/Library/Preferences/com.apple.finder.plist 191 | 192 | 193 | ############################################################################### 194 | # Dock & Mission Control 195 | ############################################################################### 196 | 197 | msg_nested_done "[Finder] Setting the icon size of Dock items to 36 pixels for optimal size/screen-realestate" 198 | defaults write com.apple.dock tilesize -int 36 199 | 200 | msg_nested_lvl_done "[Finder] Speeding up Mission Control animations and grouping windows by application" 201 | defaults write com.apple.dock expose-animation-duration -float 0.1 202 | defaults write com.apple.dock "expose-group-by-app" -bool true 203 | 204 | msg_nested_lvl_done "[Finder] Set Dock to auto-hide and remove the auto-hiding delay)" 205 | defaults write com.apple.dock autohide -bool true 206 | defaults write com.apple.dock autohide-delay -float 0 207 | defaults write com.apple.dock autohide-time-modifier -float 0 208 | 209 | ############################################################################### 210 | # Chrome, Safari, & WebKit 211 | ############################################################################### 212 | 213 | msg_nested_lvl_done "[Safari] Privacy: Don't send search queries to Apple" 214 | defaults write com.apple.Safari UniversalSearchEnabled -bool false 215 | defaults write com.apple.Safari SuppressSearchSuggestions -bool true 216 | 217 | 218 | msg_nested_lvl_done "[Safari] Hiding Safari's bookmarks bar by default" 219 | defaults write com.apple.Safari ShowFavoritesBar -bool false 220 | 221 | 222 | msg_nested_lvl_done "[Safari] Hiding Safari's sidebar in Top Sites" 223 | defaults write com.apple.Safari ShowSidebarInTopSites -bool false 224 | 225 | 226 | msg_nested_lvl_done "[Safari] Disabling Safari's thumbnail cache for History and Top Sites" 227 | defaults write com.apple.Safari DebugSnapshotsUpdatePolicy -int 2 228 | 229 | 230 | msg_nested_lvl_done "[Safari] Enabling Safari's debug menu" 231 | defaults write com.apple.Safari IncludeInternalDebugMenu -bool true 232 | 233 | 234 | msg_nested_lvl_done "[Safari] Making Safari's search banners default to Contains instead of Starts With" 235 | defaults write com.apple.Safari FindOnPageMatchesWordStartsOnly -bool false 236 | 237 | 238 | msg_nested_lvl_done "[Safari] Removing useless icons from Safari's bookmarks bar" 239 | defaults write com.apple.Safari ProxiesInBookmarksBar "()" 240 | 241 | 242 | msg_nested_lvl_done "[Safari] Enabling the Develop menu and the Web Inspector in Safari" 243 | defaults write com.apple.Safari IncludeDevelopMenu -bool true 244 | defaults write com.apple.Safari WebKitDeveloperExtrasEnabledPreferenceKey -bool true 245 | defaults write com.apple.Safari "com.apple.Safari.ContentPageGroupIdentifier.WebKit2DeveloperExtrasEnabled" -bool true 246 | 247 | 248 | msg_nested_lvl_done "[Safari] Adding a context menu item for showing the Web Inspector in web views" 249 | defaults write NSGlobalDomain WebKitDeveloperExtras -bool true 250 | 251 | 252 | 253 | ############################################################################### 254 | # Time Machine 255 | ############################################################################### 256 | 257 | msg_nested_lvl_done "[Time machine] Prevent Time Machine from prompting to use new hard drives as backup volume)" 258 | defaults write com.apple.TimeMachine DoNotOfferNewDisksForBackup -bool true 259 | 260 | 261 | msg_nested_lvl_done "[Time machine] Disable local Time Machine backups" 262 | hash tmutil &> /dev/null && sudo tmutil disablelocal 263 | 264 | 265 | ############################################################################### 266 | # Messages # 267 | ############################################################################### 268 | 269 | msg_nested_lvl_done "[Messages] Disable smart quotes in Messages.app? (it's annoying for messages that contain code) (y/n)" 270 | defaults write com.apple.messageshelper.MessageController SOInputLineSettings -dict-add "automaticQuoteSubstitutionEnabled" -bool false 271 | 272 | 273 | msg_nested_lvl_done "[Messages] Disable continuous spell checking in Messages.app)" 274 | defaults write com.apple.messageshelper.MessageController SOInputLineSettings -dict-add "continuousSpellCheckingEnabled" -bool false 275 | 276 | 277 | ############################################################################### 278 | # Transmission.app # 279 | ############################################################################### 280 | 281 | 282 | msg_nested_lvl_done "[Transmission] Don't prompt for confirmation before downloading" 283 | defaults write org.m0k.transmission DownloadAsk -bool false 284 | 285 | 286 | ############################################################################### 287 | # Kill affected applications 288 | ############################"Terminal" "Transmission"; do 289 | killall "${app}" > /dev/null 2>&1 290 | msg_done "osx customizations" 291 | -------------------------------------------------------------------------------- /python.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | pip_packages=( 4 | 'virtualenvwrapper' 5 | 'requests' 6 | 'ipdb' 7 | ) 8 | 9 | 10 | install_pip_packages(){ 11 | for packages in pip_packages; do 12 | pip install $packages 13 | done 14 | } 15 | -------------------------------------------------------------------------------- /screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vsouza/dotfiles/449b4eab128a0af0a9fb5bf0735828d453ee4521/screenshot.png -------------------------------------------------------------------------------- /uninstall.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | rm -rf $HOME/.gitconfig $HOME/.gitignore_global $HOME/.osx $HOME/.vimrc 4 | -------------------------------------------------------------------------------- /vim.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | source $HOME/dotfiles/log.sh 3 | 4 | if hash vim 2> /dev/null; then 5 | msg_nested_done "Vim Already installed!" 6 | else 7 | msg_run "install Vim" 8 | brew install vim 2> /dev/null 9 | fi 10 | 11 | if [[ -h ~/.vimrc ]]; then 12 | rm ~/.vimrc 13 | fi 14 | 15 | if [[ -f ~/dotfiles/.vimrc ]]; then 16 | sudo rm -r ~/dotfiles/.vimrc 17 | fi 18 | 19 | msg_nested_done "setup .vimrc file from https://github.com/vsouza/.vimrc" 20 | git clone https://github.com/vsouza/.vimrc.git 2> /dev/null 21 | ln -s ~/dotfiles/.vimrc/.vimrc ~/.vimrc 22 | 23 | 24 | msg_done "Setup Vim completed" 25 | --------------------------------------------------------------------------------