├── .KeyRemap4MacBook └── private.xml ├── .Xmodmap ├── .Xresources ├── .alacritty.yml ├── .config └── karabiner │ └── karabiner.json ├── .gitconfig ├── .gitignore ├── .gitmodules ├── .gvimrc ├── .hammerspoon └── init.lua ├── .inputrc ├── .oh-my-zsh └── custom │ └── extra.zsh ├── .slate ├── .slate.js ├── .teamocil ├── default.yml └── laptop.yml ├── .tmux-powerlinerc ├── .tmux.conf ├── .tmux ├── mytheme.sh └── zoom ├── .vim ├── UltiSnips │ └── all.snippets ├── autoload │ └── plug.vim ├── ftplugin │ └── qf.vim └── snippets │ ├── _.snip │ ├── javascript.snip │ ├── python.snip │ ├── sawzall.snip │ ├── sh.snip │ └── vim.snip ├── .vimrc ├── .vimrc_basic ├── .zprofile ├── .zsh └── .vimpagerrc ├── .zshenv ├── .zshrc ├── README ├── bin ├── flavor ├── git-branches ├── karabiner-element-switch-profile.py └── vimdiff-git ├── git └── templates │ └── hooks │ └── pre-commit ├── install.sh ├── iterm └── com.googlecode.iterm2.plist ├── pure.zsh-theme └── work.applescript /.KeyRemap4MacBook/private.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | F19 to F19 5 | (F19 to Hyper (ctrl+shift+cmd+opt) + F19 Only, send escape) 6 | private.f192f19_escape 7 | 8 | --KeyOverlaidModifier-- 9 | KeyCode::F19, 10 | KeyCode::COMMAND_L, 11 | ModifierFlag::OPTION_L | ModifierFlag::SHIFT_L | ModifierFlag::CONTROL_L, 12 | KeyCode::ESCAPE 13 | 14 | 15 | 16 | Use the correct shift keys. 17 | private.correct_shift_keys 18 | 19 | --KeyToKey-- KeyCode::Q, ModifierFlag::SHIFT_L, KeyCode::VK_NONE 20 | --KeyToKey-- KeyCode::W, ModifierFlag::SHIFT_L, KeyCode::VK_NONE 21 | --KeyToKey-- KeyCode::E, ModifierFlag::SHIFT_L, KeyCode::VK_NONE 22 | --KeyToKey-- KeyCode::R, ModifierFlag::SHIFT_L, KeyCode::VK_NONE 23 | --KeyToKey-- KeyCode::T, ModifierFlag::SHIFT_L, KeyCode::VK_NONE 24 | --KeyToKey-- KeyCode::A, ModifierFlag::SHIFT_L, KeyCode::VK_NONE 25 | --KeyToKey-- KeyCode::S, ModifierFlag::SHIFT_L, KeyCode::VK_NONE 26 | --KeyToKey-- KeyCode::D, ModifierFlag::SHIFT_L, KeyCode::VK_NONE 27 | --KeyToKey-- KeyCode::F, ModifierFlag::SHIFT_L, KeyCode::VK_NONE 28 | --KeyToKey-- KeyCode::G, ModifierFlag::SHIFT_L, KeyCode::VK_NONE 29 | --KeyToKey-- KeyCode::Z, ModifierFlag::SHIFT_L, KeyCode::VK_NONE 30 | --KeyToKey-- KeyCode::X, ModifierFlag::SHIFT_L, KeyCode::VK_NONE 31 | --KeyToKey-- KeyCode::C, ModifierFlag::SHIFT_L, KeyCode::VK_NONE 32 | --KeyToKey-- KeyCode::V, ModifierFlag::SHIFT_L, KeyCode::VK_NONE 33 | 34 | --KeyToKey-- KeyCode::Y, ModifierFlag::SHIFT_R, KeyCode::VK_NONE 35 | --KeyToKey-- KeyCode::U, ModifierFlag::SHIFT_R, KeyCode::VK_NONE 36 | --KeyToKey-- KeyCode::I, ModifierFlag::SHIFT_R, KeyCode::VK_NONE 37 | --KeyToKey-- KeyCode::O, ModifierFlag::SHIFT_R, KeyCode::VK_NONE 38 | --KeyToKey-- KeyCode::P, ModifierFlag::SHIFT_R, KeyCode::VK_NONE 39 | --KeyToKey-- KeyCode::H, ModifierFlag::SHIFT_R, KeyCode::VK_NONE 40 | --KeyToKey-- KeyCode::J, ModifierFlag::SHIFT_R, KeyCode::VK_NONE 41 | --KeyToKey-- KeyCode::K, ModifierFlag::SHIFT_R, KeyCode::VK_NONE 42 | --KeyToKey-- KeyCode::L, ModifierFlag::SHIFT_R, KeyCode::VK_NONE 43 | --KeyToKey-- KeyCode::SEMICOLON, ModifierFlag::SHIFT_R, KeyCode::VK_NONE 44 | --KeyToKey-- KeyCode::N, ModifierFlag::SHIFT_R, KeyCode::VK_NONE 45 | --KeyToKey-- KeyCode::M, ModifierFlag::SHIFT_R, KeyCode::VK_NONE 46 | --KeyToKey-- KeyCode::COMMA, ModifierFlag::SHIFT_R, KeyCode::VK_NONE 47 | --KeyToKey-- KeyCode::DOT, ModifierFlag::SHIFT_R, KeyCode::VK_NONE 48 | --KeyToKey-- KeyCode::QUOTE, ModifierFlag::SHIFT_R, KeyCode::VK_NONE 49 | 50 | 51 | Shifts to Parentheses 52 | Shifts, when pressed alone, type parentheses. When used with other keys they're normal shifts. 53 | 54 | private.shifts_to_parens 55 | 56 | 57 | --KeyOverlaidModifier-- KeyCode::SHIFT_R, ModifierFlag::SHIFT_R | ModifierFlag::NONE, KeyCode::SHIFT_R, KeyCode::KEY_0, ModifierFlag::SHIFT_L 58 | --KeyOverlaidModifier-- KeyCode::SHIFT_L, ModifierFlag::SHIFT_L | ModifierFlag::NONE, KeyCode::SHIFT_L, KeyCode::KEY_9, ModifierFlag::SHIFT_R 59 | 60 | 65 | --KeyToKey-- KeyCode::SHIFT_L, ModifierFlag::SHIFT_R, KeyCode::KEY_0, ModifierFlag::SHIFT_L, KeyCode::KEY_9, ModifierFlag::SHIFT_L 66 | --KeyToKey-- KeyCode::SHIFT_R, ModifierFlag::SHIFT_L, KeyCode::KEY_9, ModifierFlag::SHIFT_L, KeyCode::KEY_0, ModifierFlag::SHIFT_L 67 | 68 | 72 | --KeyToKey-- KeyCode::SPACE, ModifierFlag::SHIFT_R, KeyCode::KEY_0, ModifierFlag::SHIFT_L, KeyCode::SPACE 73 | 74 | 75 | -------------------------------------------------------------------------------- /.Xmodmap: -------------------------------------------------------------------------------- 1 | ! Both Command and Option act as Alt. Since I'm only using Eclipse through X11 2 | ! at this moment, this suits my need 3 | keycode 63 = Alt_L 4 | keycode 71 = Alt_R 5 | clear mod1 6 | clear mod2 7 | add mod1 = Alt_L 8 | add mod1 = Alt_R 9 | -------------------------------------------------------------------------------- /.Xresources: -------------------------------------------------------------------------------- 1 | ! Xft*antialias: true 2 | ! Xft*dpi: 96 3 | xterm*utf8: 1 4 | ! xterm*font: -misc-fixed-medium-r-normal--18-120-100-100-c-90-iso10646-1 5 | ! xterm*font: -misc-fixed-medium-r-normal-ja-13-120-75-75-c-120-iso10646-1 6 | ! xterm*wideFont: -misc-fixed-medium-r-normal-ja-18-120-100-100-c-180-iso10646-1 7 | xterm*faceName: Ubuntu Mono for Powerline 8 | xterm*faceSize: 12 9 | xterm*termName: xterm-256color 10 | xterm*font: fixed 11 | xterm*boldFont: fixed 12 | 13 | ! xterm ---------------------------------------------------------------------- 14 | 15 | xterm*geometry: 80x25 16 | ! xterm*faceName: terminus:bold:pixelsize=14 17 | !xterm*font: -*-dina-medium-r-*-*-16-*-*-*-*-*-*-* 18 | xterm*dynamicColors: true 19 | xterm*utf8: 3 20 | xterm*eightBitInput: true 21 | xterm*saveLines: 512 22 | xterm*scrollKey: true 23 | xterm*scrollTtyOutput: false 24 | xterm*scrollBar: true 25 | xterm*rightScrollBar: true 26 | xterm*jumpScroll: true 27 | xterm*multiScroll: true 28 | xterm*toolBar: false 29 | 30 | ! Molokai theme 31 | *xterm*background: #101010 32 | *xterm*foreground: #d0d0d0 33 | *xterm*cursorColor: #d0d0d0 34 | *xterm*color0: #101010 35 | *xterm*color1: #960050 36 | *xterm*color2: #66aa11 37 | *xterm*color3: #c47f2c 38 | *xterm*color4: #30309b 39 | *xterm*color5: #7e40a5 40 | *xterm*color6: #3579a8 41 | *xterm*color7: #9999aa 42 | *xterm*color8: #303030 43 | *xterm*color9: #ff0090 44 | *xterm*color10: #80ff00 45 | *xterm*color11: #ffba68 46 | *xterm*color12: #5f5fee 47 | *xterm*color13: #bb88dd 48 | *xterm*color14: #4eb4fa 49 | *xterm*color15: #d0d0d0 50 | 51 | 52 | 53 | 54 | 55 | URxvt.depth: 32 56 | URxvt.geometry: 90x30 57 | URxvt.transparent: false 58 | URxvt.fading: 0 59 | ! URxvt.urgentOnBell: true 60 | ! URxvt.visualBell: true 61 | URxvt.loginShell: true 62 | URxvt.saveLines: 50 63 | URxvt.internalBorder: 3 64 | URxvt.lineSpace: 0 65 | 66 | ! Terminal 67 | ! URxvt*termName: xterm-256color 68 | URxvt*termName: rxvt-unicode-256color 69 | URxvt*meta8:False 70 | 71 | ! Fonts 72 | URxvt.allow_bold: true 73 | URxvt*font: xft:Ubuntu Mono for Powerline:size=12 74 | URxvt*imFont: xft:Ubuntu Mono for Powerline:regular:size=12 75 | URxvt*boldFont: xft:Ubuntu Mono for Powerline:bold:size=12 76 | URxvt*italicFont: xft:Ubuntu Mono for Powerline:italic:size=12 77 | URxvt*boldItalicFont: xft:Ubuntu Mono for Powerline:bold:italic:size=12 78 | 79 | ! Fix font space 80 | URxvt*letterSpace: -1 81 | 82 | ! Scrollbar 83 | URxvt.scrollStyle: rxvt 84 | URxvt.scrollBar: false 85 | 86 | ! Perl extensions 87 | URxvt.perl-ext-common: default,matcher 88 | URxvt.matcher.button: 1 89 | URxvt.urlLauncher: firefox 90 | 91 | ! Cursor 92 | URxvt.cursorBlink: true 93 | URxvt.cursorColor: #657b83 94 | URxvt.cursorUnderline: false 95 | 96 | ! Pointer 97 | URxvt.pointerBlank: true 98 | 99 | !Source http://github.com/altercation/solarized 100 | 101 | ! *background: #002b36 102 | ! *foreground: #657b83 103 | ! !!*fading: 40 104 | ! *fadeColor: #002b36 105 | ! *cursorColor: #93a1a1 106 | ! *pointerColorBackground: #586e75 107 | ! *pointerColorForeground: #93a1a1 108 | 109 | ! !! black dark/light 110 | ! *color0: #073642 111 | ! *color8: #002b36 112 | 113 | ! !! red dark/light 114 | ! *color1: #dc322f 115 | ! *color9: #cb4b16 116 | 117 | ! !! green dark/light 118 | ! *color2: #859900 119 | ! *color10: #586e75 120 | 121 | ! !! yellow dark/light 122 | ! *color3: #b58900 123 | ! *color11: #657b83 124 | 125 | ! !! blue dark/light 126 | ! *color4: #268bd2 127 | ! *color12: #839496 128 | 129 | ! !! magenta dark/light 130 | ! *color5: #d33682 131 | ! *color13: #6c71c4 132 | 133 | ! !! cyan dark/light 134 | ! *color6: #2aa198 135 | ! *color14: #93a1a1 136 | 137 | ! !! white dark/light 138 | ! *color7: #eee8d5 139 | ! *color15: #fdf6e3 140 | -------------------------------------------------------------------------------- /.alacritty.yml: -------------------------------------------------------------------------------- 1 | # Configuration for Alacritty, the GPU enhanced terminal emulator 2 | 3 | # The FreeType rasterizer needs to know the device DPI for best results 4 | # (changes require restart) 5 | dpi: 6 | x: 96.0 7 | y: 96.0 8 | 9 | # Display tabs using this many cells (changes require restart) 10 | tabspaces: 8 11 | 12 | # When true, bold text is drawn using the bright variant of colors. 13 | draw_bold_text_with_bright_colors: true 14 | 15 | # Font configuration (changes require restart) 16 | font: 17 | # The normal (roman) font face to use. 18 | normal: 19 | # family: "Source Code Pro" 20 | # family: "Hack" 21 | family: "Iosevka" 22 | # family: "Input Mono" 23 | # family: "Droid Sans Mono Slashed for Powerline" 24 | # family: "Menlo" 25 | # Style can be specified to pick a specific face. 26 | # style: "weight=Regular" 27 | 28 | # The bold font face 29 | bold: 30 | family: "Droid Sans Mono Slashed for Powerline" 31 | # Style can be specified to pick a specific face. 32 | # style: Bold 33 | 34 | # The italic font face 35 | italic: 36 | family: "Droid Sans Mono Slashed for Powerline" 37 | # Style can be specified to pick a specific face. 38 | # style: Italic 39 | 40 | # Point size of the font 41 | size: 14.0 42 | # Offset is the extra space around each character. offset.y can be thought of 43 | # as modifying the linespacing, and offset.x as modifying the letter spacing. 44 | offset: 45 | x: 0.0 46 | y: 0.0 47 | 48 | # OS X only: use thin stroke font rendering. Thin strokes are suitable 49 | # for retina displays, but for non-retina you probably want this set to 50 | # false. 51 | use_thin_strokes: true 52 | 53 | # Should display the render timer 54 | render_timer: false 55 | 56 | # Colors (Tomorrow Night Bright) 57 | colors: 58 | # Default colors 59 | primary: 60 | background: '0x000000' 61 | foreground: '0xeaeaea' 62 | 63 | # Normal colors 64 | normal: 65 | black: '0x000000' 66 | red: '0xd54e53' 67 | green: '0xb9ca4a' 68 | yellow: '0xe6c547' 69 | blue: '0x7aa6da' 70 | magenta: '0xc397d8' 71 | cyan: '0x70c0ba' 72 | white: '0xc5c8c6' 73 | 74 | # Bright colors 75 | bright: 76 | black: '0x666666' 77 | red: '0xff3334' 78 | green: '0x9ec400' 79 | yellow: '0xe7c547' 80 | blue: '0x7aa6da' 81 | magenta: '0xb77ee0' 82 | cyan: '0x54ced6' 83 | white: '0x2a2a2a' 84 | 85 | visual_bell: 86 | animation: EaseOutExpo 87 | duration: 0 88 | # Colors (Solarized Dark) 89 | # colors: 90 | # # Default colors 91 | # primary: 92 | # background: '0x002b36' 93 | # foreground: '0x839496' 94 | # 95 | # # Normal colors 96 | # normal: 97 | # black: '0x073642' 98 | # red: '0xdc322f' 99 | # green: '0x859900' 100 | # yellow: '0xb58900' 101 | # blue: '0x268bd2' 102 | # magenta: '0xd33682' 103 | # cyan: '0x2aa198' 104 | # white: '0xeee8d5' 105 | # 106 | # # Bright colors 107 | # bright: 108 | # black: '0x002b36' 109 | # red: '0xcb4b16' 110 | # green: '0x586e75' 111 | # yellow: '0x657b83' 112 | # blue: '0x839496' 113 | # magenta: '0x6c71c4' 114 | # cyan: '0x93a1a1' 115 | # white: '0xfdf6e3' 116 | 117 | # Key bindings 118 | # 119 | # Each binding is defined as an object with some properties. Most of the 120 | # properties are optional. All of the alphabetical keys should have a letter for 121 | # the `key` value such as `V`. Function keys are probably what you would expect 122 | # as well (F1, F2, ..). The number keys above the main keyboard are encoded as 123 | # `Key1`, `Key2`, etc. Keys on the number pad are encoded `Number1`, `Number2`, 124 | # etc. These all match the glutin::VirtualKeyCode variants. 125 | # 126 | # Possible values for `mods` 127 | # `Command`, `Super` refer to the super/command/windows key 128 | # `Control` for the control key 129 | # `Shift` for the Shift key 130 | # `Alt` and `Option` refer to alt/option 131 | # 132 | # mods may be combined with a `|`. For example, requiring control and shift 133 | # looks like: 134 | # 135 | # mods: Control|Shift 136 | # 137 | # The parser is currently quite sensitive to whitespace and capitalization - 138 | # capitalization must match exactly, and piped items must not have whitespace 139 | # around them. 140 | # 141 | # Either an `action` or `chars` field must be present. `chars` writes the 142 | # specified string every time that binding is activated. These should generally 143 | # be escape sequences, but they can be configured to send arbitrary strings of 144 | # bytes. Possible values of `action` include `Paste` and `PasteSelection`. 145 | key_bindings: 146 | - { key: V, mods: Command, action: Paste } 147 | - { key: C, mods: Command, action: Copy } 148 | - { key: Home, chars: "\x1b[H", mode: ~AppCursor } 149 | - { key: Home, chars: "\x1b[1~", mode: AppCursor } 150 | - { key: End, chars: "\x1b[F", mode: ~AppCursor } 151 | - { key: End, chars: "\x1b[4~", mode: AppCursor } 152 | - { key: PageUp, chars: "\x1b[5~" } 153 | - { key: PageDown, chars: "\x1b[6~" } 154 | - { key: Left, mods: Shift, chars: "\x1b[1;2D" } 155 | - { key: Left, mods: Control, chars: "\x1b[1;5D" } 156 | - { key: Left, mods: Alt, chars: "\x1b[1;3D" } 157 | - { key: Left, chars: "\x1b[D", mode: ~AppCursor } 158 | - { key: Left, chars: "\x1bOD", mode: AppCursor } 159 | - { key: Right, mods: Shift, chars: "\x1b[1;2C" } 160 | - { key: Right, mods: Control, chars: "\x1b[1;5C" } 161 | - { key: Right, mods: Alt, chars: "\x1b[1;3C" } 162 | - { key: Right, chars: "\x1b[C", mode: ~AppCursor } 163 | - { key: Right, chars: "\x1bOC", mode: AppCursor } 164 | - { key: Up, mods: Shift, chars: "\x1b[1;2A" } 165 | - { key: Up, mods: Control, chars: "\x1b[1;5A" } 166 | - { key: Up, mods: Alt, chars: "\x1b[1;3A" } 167 | - { key: Up, chars: "\x1b[A", mode: ~AppCursor } 168 | - { key: Up, chars: "\x1bOA", mode: AppCursor } 169 | - { key: Down, mods: Shift, chars: "\x1b[1;2B" } 170 | - { key: Down, mods: Control, chars: "\x1b[1;5B" } 171 | - { key: Down, mods: Alt, chars: "\x1b[1;3B" } 172 | - { key: Down, chars: "\x1b[B", mode: ~AppCursor } 173 | - { key: Down, chars: "\x1bOB", mode: AppCursor } 174 | - { key: F1, chars: "\x1bOP" } 175 | - { key: F2, chars: "\x1bOQ" } 176 | - { key: F3, chars: "\x1bOR" } 177 | - { key: F4, chars: "\x1bOS" } 178 | - { key: F5, chars: "\x1b[15~" } 179 | - { key: F6, chars: "\x1b[17~" } 180 | - { key: F7, chars: "\x1b[18~" } 181 | - { key: F8, chars: "\x1b[19~" } 182 | - { key: F9, chars: "\x1b[20~" } 183 | - { key: F10, chars: "\x1b[21~" } 184 | - { key: F11, chars: "\x1b[23~" } 185 | - { key: F12, chars: "\x1b[24~" } 186 | - { key: Back, chars: "\x7f" } 187 | - { key: Delete, chars: "\x1b[3~", mode: AppKeypad } 188 | - { key: Delete, chars: "\x1b[P", mode: ~AppKeypad } 189 | - { key: A, mods: Alt, chars: "\x1ba" } 190 | - { key: S, mods: Alt, chars: "\x1bs" } 191 | - { key: W, mods: Alt, chars: "\x1bw" } 192 | - { key: W, mods: Command, chars: "\x1bw" } 193 | - { key: C, mods: Alt, chars: "\x1bc" } 194 | - { key: F, mods: Alt, chars: "\x1bf" } 195 | - { key: J, mods: Alt, chars: "\x1bj" } 196 | - { key: K, mods: Alt, chars: "\x1bk" } 197 | - { key: H, mods: Alt, chars: "\x1bh" } 198 | - { key: L, mods: Alt, chars: "\x1bl" } 199 | - { key: M, mods: Alt, chars: "\x1bm" } 200 | - { key: N, mods: Alt, chars: "\x1bn" } 201 | - { key: R, mods: Alt, chars: "\x1br" } 202 | - { key: P, mods: Alt, chars: "\x1bp" } 203 | - { key: T, mods: Alt, chars: "\x1bt" } 204 | - { key: Backslash, mods: Alt, chars: "\x1b\\" } 205 | - { key: Minus, mods: Alt, chars: "\x1b-" } 206 | - { key: Space, mods: Control, chars: "\x00" } 207 | - { key: Tab, mods: Shift, chars: "\x1b[Z" } 208 | 209 | # Mouse bindings 210 | # 211 | # Currently doesn't support modifiers. Both the `mouse` and `action` fields must 212 | # be specified. 213 | # 214 | # Values for `mouse`: 215 | # - Middle 216 | # - Left 217 | # - Right 218 | # - Numeric identifier such as `5` 219 | # 220 | # Values for `action`: 221 | # - Paste 222 | # - PasteSelection 223 | # - Copy (TODO) 224 | mouse_bindings: 225 | - { mouse: Middle, action: PasteSelection } 226 | 227 | -------------------------------------------------------------------------------- /.config/karabiner/karabiner.json: -------------------------------------------------------------------------------- 1 | { 2 | "global": { 3 | "check_for_updates_on_startup": true, 4 | "show_in_menu_bar": true, 5 | "show_profile_name_in_menu_bar": false 6 | }, 7 | "profiles": [ 8 | { 9 | "complex_modifications": { 10 | "parameters": { 11 | "basic.simultaneous_threshold_milliseconds": 50, 12 | "basic.to_delayed_action_delay_milliseconds": 500, 13 | "basic.to_if_alone_timeout_milliseconds": 1000, 14 | "basic.to_if_held_down_threshold_milliseconds": 500 15 | }, 16 | "rules": [] 17 | }, 18 | "devices": [ 19 | { 20 | "disable_built_in_keyboard_if_exists": false, 21 | "fn_function_keys": [], 22 | "identifiers": { 23 | "is_keyboard": true, 24 | "is_pointing_device": false, 25 | "product_id": 627, 26 | "vendor_id": 1452 27 | }, 28 | "ignore": false, 29 | "manipulate_caps_lock_led": true, 30 | "simple_modifications": [] 31 | }, 32 | { 33 | "disable_built_in_keyboard_if_exists": false, 34 | "fn_function_keys": [], 35 | "identifiers": { 36 | "is_keyboard": true, 37 | "is_pointing_device": false, 38 | "product_id": 8211, 39 | "vendor_id": 1241 40 | }, 41 | "ignore": false, 42 | "manipulate_caps_lock_led": false, 43 | "simple_modifications": [] 44 | }, 45 | { 46 | "disable_built_in_keyboard_if_exists": false, 47 | "fn_function_keys": [], 48 | "identifiers": { 49 | "is_keyboard": true, 50 | "is_pointing_device": false, 51 | "product_id": 50475, 52 | "vendor_id": 1133 53 | }, 54 | "ignore": false, 55 | "manipulate_caps_lock_led": false, 56 | "simple_modifications": [] 57 | }, 58 | { 59 | "disable_built_in_keyboard_if_exists": false, 60 | "fn_function_keys": [], 61 | "identifiers": { 62 | "is_keyboard": true, 63 | "is_pointing_device": false, 64 | "product_id": 65535, 65 | "vendor_id": 1452 66 | }, 67 | "ignore": false, 68 | "manipulate_caps_lock_led": true, 69 | "simple_modifications": [] 70 | } 71 | ], 72 | "fn_function_keys": [ 73 | { 74 | "from": { 75 | "key_code": "f1" 76 | }, 77 | "to": { 78 | "key_code": "vk_consumer_brightness_down" 79 | } 80 | }, 81 | { 82 | "from": { 83 | "key_code": "f2" 84 | }, 85 | "to": { 86 | "key_code": "vk_consumer_brightness_up" 87 | } 88 | }, 89 | { 90 | "from": { 91 | "key_code": "f3" 92 | }, 93 | "to": { 94 | "key_code": "vk_mission_control" 95 | } 96 | }, 97 | { 98 | "from": { 99 | "key_code": "f4" 100 | }, 101 | "to": { 102 | "key_code": "vk_launchpad" 103 | } 104 | }, 105 | { 106 | "from": { 107 | "key_code": "f5" 108 | }, 109 | "to": { 110 | "key_code": "vk_consumer_illumination_down" 111 | } 112 | }, 113 | { 114 | "from": { 115 | "key_code": "f6" 116 | }, 117 | "to": { 118 | "key_code": "vk_consumer_illumination_up" 119 | } 120 | }, 121 | { 122 | "from": { 123 | "key_code": "f7" 124 | }, 125 | "to": { 126 | "key_code": "vk_consumer_previous" 127 | } 128 | }, 129 | { 130 | "from": { 131 | "key_code": "f8" 132 | }, 133 | "to": { 134 | "key_code": "vk_consumer_play" 135 | } 136 | }, 137 | { 138 | "from": { 139 | "key_code": "f9" 140 | }, 141 | "to": { 142 | "key_code": "vk_consumer_next" 143 | } 144 | }, 145 | { 146 | "from": { 147 | "key_code": "f10" 148 | }, 149 | "to": { 150 | "key_code": "mute" 151 | } 152 | }, 153 | { 154 | "from": { 155 | "key_code": "f11" 156 | }, 157 | "to": { 158 | "key_code": "volume_down" 159 | } 160 | }, 161 | { 162 | "from": { 163 | "key_code": "f12" 164 | }, 165 | "to": { 166 | "key_code": "volume_up" 167 | } 168 | } 169 | ], 170 | "name": "internal", 171 | "selected": true, 172 | "simple_modifications": [ 173 | { 174 | "from": { 175 | "key_code": "caps_lock" 176 | }, 177 | "to": { 178 | "key_code": "f18" 179 | } 180 | }, 181 | { 182 | "from": { 183 | "key_code": "left_command" 184 | }, 185 | "to": { 186 | "key_code": "left_command" 187 | } 188 | }, 189 | { 190 | "from": { 191 | "key_code": "left_option" 192 | }, 193 | "to": { 194 | "key_code": "left_option" 195 | } 196 | } 197 | ], 198 | "virtual_hid_keyboard": { 199 | "caps_lock_delay_milliseconds": 0, 200 | "country_code": 0, 201 | "keyboard_type": "ansi" 202 | } 203 | }, 204 | { 205 | "complex_modifications": { 206 | "parameters": { 207 | "basic.simultaneous_threshold_milliseconds": 50, 208 | "basic.to_delayed_action_delay_milliseconds": 500, 209 | "basic.to_if_alone_timeout_milliseconds": 1000, 210 | "basic.to_if_held_down_threshold_milliseconds": 500 211 | }, 212 | "rules": [] 213 | }, 214 | "devices": [ 215 | { 216 | "disable_built_in_keyboard_if_exists": false, 217 | "fn_function_keys": [], 218 | "identifiers": { 219 | "is_keyboard": true, 220 | "is_pointing_device": false, 221 | "product_id": 627, 222 | "vendor_id": 1452 223 | }, 224 | "ignore": false, 225 | "manipulate_caps_lock_led": true, 226 | "simple_modifications": [] 227 | }, 228 | { 229 | "disable_built_in_keyboard_if_exists": false, 230 | "fn_function_keys": [], 231 | "identifiers": { 232 | "is_keyboard": true, 233 | "is_pointing_device": false, 234 | "product_id": 8211, 235 | "vendor_id": 1241 236 | }, 237 | "ignore": false, 238 | "manipulate_caps_lock_led": false, 239 | "simple_modifications": [] 240 | }, 241 | { 242 | "disable_built_in_keyboard_if_exists": false, 243 | "fn_function_keys": [], 244 | "identifiers": { 245 | "is_keyboard": true, 246 | "is_pointing_device": false, 247 | "product_id": 50475, 248 | "vendor_id": 1133 249 | }, 250 | "ignore": false, 251 | "manipulate_caps_lock_led": false, 252 | "simple_modifications": [] 253 | }, 254 | { 255 | "disable_built_in_keyboard_if_exists": false, 256 | "fn_function_keys": [], 257 | "identifiers": { 258 | "is_keyboard": true, 259 | "is_pointing_device": false, 260 | "product_id": 65535, 261 | "vendor_id": 1452 262 | }, 263 | "ignore": false, 264 | "manipulate_caps_lock_led": true, 265 | "simple_modifications": [] 266 | } 267 | ], 268 | "fn_function_keys": [ 269 | { 270 | "from": { 271 | "key_code": "f1" 272 | }, 273 | "to": { 274 | "key_code": "vk_consumer_brightness_down" 275 | } 276 | }, 277 | { 278 | "from": { 279 | "key_code": "f2" 280 | }, 281 | "to": { 282 | "key_code": "vk_consumer_brightness_up" 283 | } 284 | }, 285 | { 286 | "from": { 287 | "key_code": "f3" 288 | }, 289 | "to": { 290 | "key_code": "vk_mission_control" 291 | } 292 | }, 293 | { 294 | "from": { 295 | "key_code": "f4" 296 | }, 297 | "to": { 298 | "key_code": "vk_launchpad" 299 | } 300 | }, 301 | { 302 | "from": { 303 | "key_code": "f5" 304 | }, 305 | "to": { 306 | "key_code": "vk_consumer_illumination_down" 307 | } 308 | }, 309 | { 310 | "from": { 311 | "key_code": "f6" 312 | }, 313 | "to": { 314 | "key_code": "vk_consumer_illumination_up" 315 | } 316 | }, 317 | { 318 | "from": { 319 | "key_code": "f7" 320 | }, 321 | "to": { 322 | "key_code": "vk_consumer_previous" 323 | } 324 | }, 325 | { 326 | "from": { 327 | "key_code": "f8" 328 | }, 329 | "to": { 330 | "key_code": "vk_consumer_play" 331 | } 332 | }, 333 | { 334 | "from": { 335 | "key_code": "f9" 336 | }, 337 | "to": { 338 | "key_code": "vk_consumer_next" 339 | } 340 | }, 341 | { 342 | "from": { 343 | "key_code": "f10" 344 | }, 345 | "to": { 346 | "key_code": "mute" 347 | } 348 | }, 349 | { 350 | "from": { 351 | "key_code": "f11" 352 | }, 353 | "to": { 354 | "key_code": "volume_down" 355 | } 356 | }, 357 | { 358 | "from": { 359 | "key_code": "f12" 360 | }, 361 | "to": { 362 | "key_code": "volume_up" 363 | } 364 | } 365 | ], 366 | "name": "external", 367 | "selected": false, 368 | "simple_modifications": [ 369 | { 370 | "from": { 371 | "key_code": "caps_lock" 372 | }, 373 | "to": { 374 | "key_code": "f18" 375 | } 376 | }, 377 | { 378 | "from": { 379 | "key_code": "left_command" 380 | }, 381 | "to": { 382 | "key_code": "left_option" 383 | } 384 | }, 385 | { 386 | "from": { 387 | "key_code": "left_option" 388 | }, 389 | "to": { 390 | "key_code": "left_command" 391 | } 392 | } 393 | ], 394 | "virtual_hid_keyboard": { 395 | "caps_lock_delay_milliseconds": 0, 396 | "country_code": 0, 397 | "keyboard_type": "ansi" 398 | } 399 | } 400 | ] 401 | } 402 | -------------------------------------------------------------------------------- /.gitconfig: -------------------------------------------------------------------------------- 1 | [user] 2 | name = Terry Ma 3 | email = hi@terry.ma 4 | [core] 5 | excludesfile = ~/.gitignore_global 6 | ; vimpager doesn't work very well with some log format, use less 7 | pager = less 8 | [alias] 9 | lg = log --abbrev-commit --decorate --pretty=oneline 10 | dag = log --graph --format='format:%C(yellow)%h%C(reset) %C(blue)\"%an\" <%ae>%C(reset) %C(magenta)%ar%C(reset)%C(auto)%d%C(reset)%n%s' --date-order 11 | [color] 12 | ui = auto 13 | [diff] 14 | tool = myvimdiff 15 | [difftool "myvimdiff"] 16 | cmd = vimdiff \"$REMOTE\" \"$LOCAL\" 17 | [pager] 18 | diff = 19 | ; log = false 20 | [merge] 21 | keepBackup = false 22 | tool = fugitive 23 | [mergetool] 24 | keepBackup = false 25 | keepTemporaries = false 26 | prompt = false 27 | [mergetool "fugitive"] 28 | cmd = vim -f -c \"Gdiff\" \"$MERGED\" 29 | keepTemporaries = false 30 | keepBackup = false 31 | [difftool "sourcetree"] 32 | cmd = opendiff \"$LOCAL\" \"$REMOTE\" 33 | path = 34 | [mergetool "sourcetree"] 35 | cmd = /Applications/SourceTree.app/Contents/Resources/opendiff-w.sh \"$LOCAL\" \"$REMOTE\" -ancestor \"$BASE\" -merge \"$MERGED\" 36 | trustExitCode = true 37 | [push] 38 | default = simple 39 | [amazon] 40 | append-cr-url = true 41 | pull-request-by-default = false 42 | [credential] 43 | helper = osxkeychain 44 | [filter "lfs"] 45 | clean = git-lfs clean %f 46 | smudge = git-lfs smudge %f 47 | required = true 48 | [init] 49 | templatedir = ~/.git_template 50 | [hub] 51 | protocol = https 52 | [protocol] 53 | version = 2 54 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .VimballRecord 2 | .netrwhist 3 | spell/ 4 | tags 5 | .vim/bundle/* 6 | .vim/sessions/* 7 | .vim/plugged/* 8 | .tmux/resurrect/ 9 | .tmux/plugins/* 10 | !.tmux/plugins/tpm 11 | .config/configstore/* 12 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule ".tmux/tmux-powerline"] 2 | path = .tmux/tmux-powerline 3 | url = https://github.com/erikw/tmux-powerline.git 4 | ignore = untracked 5 | [submodule ".tmux/tmux-colors-solarized"] 6 | path = .tmux/tmux-colors-solarized 7 | url = https://github.com/seebi/tmux-colors-solarized.git 8 | [submodule ".dircolors-solarized"] 9 | path = .dircolors-solarized 10 | url = https://github.com/seebi/dircolors-solarized.git 11 | [submodule "git-extras"] 12 | path = git-extras 13 | url = https://github.com/visionmedia/git-extras.git 14 | [submodule ".themes/base16-iterm2"] 15 | path = .themes/base16-iterm2 16 | url = https://github.com/chriskempson/base16-iterm2.git 17 | [submodule ".zsh/vimpager"] 18 | path = .zsh/vimpager 19 | url = https://github.com/rkitover/vimpager.git 20 | [submodule ".themes/konsole-tomorrow-theme"] 21 | path = .themes/konsole-tomorrow-theme 22 | url = https://github.com/dram/konsole-tomorrow-theme.git 23 | ignore = dirty 24 | [submodule ".oh-my-zsh/custom/plugins/zsh-syntax-highlighting"] 25 | path = .oh-my-zsh/custom/plugins/zsh-syntax-highlighting 26 | url = https://github.com/zsh-users/zsh-syntax-highlighting.git 27 | [submodule ".fzf"] 28 | path = .fzf 29 | url = https://github.com/junegunn/fzf.git 30 | [submodule ".tmux/plugins/tpm"] 31 | path = .tmux/plugins/tpm 32 | url = https://github.com/tmux-plugins/tpm 33 | -------------------------------------------------------------------------------- /.gvimrc: -------------------------------------------------------------------------------- 1 | set guifont=Droid\ Sans\ Mono\ Dotted\ for\ Powerline:h12 2 | set guioptions-=r 3 | 4 | " Red cursor 5 | highlight Cursor guibg=red 6 | 7 | inoremap u 8 | nnoremap 9 | -------------------------------------------------------------------------------- /.hammerspoon/init.lua: -------------------------------------------------------------------------------- 1 | hs.window.animationDuration = 0 2 | 3 | -- A global variable for the Hyper Mode 4 | k = hs.hotkey.modal.new({}, "F17") 5 | 6 | -- Hyper+h: Left half window 7 | k:bind({}, 'h', nil, function() 8 | local win = hs.window.focusedWindow() 9 | local f = win:frame() 10 | local screen = win:screen() 11 | local max = screen:frame() 12 | 13 | f.x = max.x 14 | f.y = max.y 15 | f.w = max.w / 2 16 | f.h = max.h 17 | win:setFrame(f) 18 | k.triggered = true 19 | end) 20 | 21 | -- Hyper+l: Right half window 22 | k:bind({}, 'l', nil, function() 23 | 24 | local win = hs.window.focusedWindow() 25 | local f = win:frame() 26 | local screen = win:screen() 27 | local max = screen:frame() 28 | 29 | f.x = max.x + (max.w / 2) 30 | f.y = max.y 31 | f.w = max.w / 2 32 | f.h = max.h 33 | win:setFrame(f) 34 | k.triggered = true 35 | end) 36 | 37 | 38 | -- Hyper+f: Fullscreen 39 | k:bind({}, 'f', nil, function() 40 | local win = hs.window.focusedWindow() 41 | local f = win:frame() 42 | local screen = win:screen() 43 | local max = screen:frame() 44 | 45 | f.x = max.x 46 | f.y = max.y 47 | f.w = max.w 48 | f.h = max.h 49 | win:setFrame(f) 50 | k.triggered = true 51 | end) 52 | 53 | -- Hyper+a: Focus or launch Alacritty 54 | k:bind({}, 'a', nil, function() 55 | local name = 'Alacritty' 56 | local app = hs.application.get(name) 57 | if app then 58 | app:activate() 59 | else 60 | hs.application.open(name) 61 | end 62 | k.triggered = true 63 | end) 64 | 65 | -- Hyper+c: Focus or launch Chrome 66 | k:bind({}, 'c', nil, function() 67 | local name = 'Google Chrome' 68 | local app = hs.application.get(name) 69 | if app then 70 | app:activate() 71 | else 72 | hs.application.open(name) 73 | end 74 | k.triggered = true 75 | end) 76 | 77 | -- Hyper+q: Focus or launch VSCode 78 | k:bind({}, 'q', nil, function() 79 | local name = 'Code' 80 | local app = hs.application.get(name) 81 | if app then 82 | app:activate() 83 | else 84 | hs.application.open(name) 85 | end 86 | k.triggered = true 87 | end) 88 | 89 | 90 | -- Hyper+c: Focus or launch Trello 91 | k:bind({}, 't', nil, function() 92 | local name = 'Trello' 93 | local app = hs.application.get(name) 94 | if app then 95 | app:activate() 96 | else 97 | hs.application.open(name) 98 | end 99 | k.triggered = true 100 | end) 101 | 102 | -- Hyper+s: Focus or launch Slack 103 | k:bind({}, 's', nil, function() 104 | local name = 'Slack' 105 | local app = hs.application.get(name) 106 | if app then 107 | app:activate() 108 | else 109 | hs.application.open(name) 110 | end 111 | k.triggered = true 112 | end) 113 | 114 | 115 | -- Hyper+delete: Screensaver 116 | k:bind({}, 'delete', nil, function() 117 | hs.caffeinate.startScreensaver() 118 | end) 119 | 120 | 121 | -- Enter Hyper Mode when F18 (Hyper/Capslock) is pressed 122 | pressedF18 = function() 123 | k.triggered = false 124 | k:enter() 125 | end 126 | 127 | -- Leave Hyper Mode when F18 (Hyper/Capslock) is pressed, 128 | -- send ESCAPE if no other keys are pressed. 129 | releasedF18 = function() 130 | k:exit() 131 | if not k.triggered then 132 | hs.eventtap.keyStroke({}, 'ESCAPE') 133 | end 134 | end 135 | 136 | -- Bind the Hyper key 137 | f18 = hs.hotkey.bind({}, 'F18', pressedF18, releasedF18) 138 | 139 | -- Reload config when any lua file in config directory changes 140 | function reloadConfig(files) 141 | doReload = false 142 | for _,file in pairs(files) do 143 | if file:sub(-4) == '.lua' then 144 | doReload = true 145 | end 146 | end 147 | if doReload then 148 | hs.reload() 149 | end 150 | end 151 | local myWatcher = hs.pathwatcher.new(os.getenv('HOME') .. '/.hammerspoon/', reloadConfig):start() 152 | hs.alert.show('Config loaded') 153 | 154 | -- Detect external keyboard 155 | local usbWatcher = nil 156 | local externalKeyboardName = "daskeyboard" 157 | 158 | function usbDeviceCallback(data) 159 | if (data["productName"] == externalKeyboardName) then 160 | if (data["eventType"] == "added") then 161 | hs.execute('~/.dotfiles/bin/karabiner-element-switch-profile.py external') 162 | hs.notify.new({title="Hammerspoon", informativeText="Switched to external keyboard profile for Karabiner-Element"}):send() 163 | elseif (data["eventType"] == "removed") then 164 | hs.execute('~/.dotfiles/bin/karabiner-element-switch-profile.py internal') 165 | hs.notify.new({title="Hammerspoon", informativeText="Switched to internal keyboard profile for Karabiner-Element"}):send() 166 | end 167 | end 168 | end 169 | 170 | usbWatcher = hs.usb.watcher.new(usbDeviceCallback) 171 | usbWatcher:start() 172 | -------------------------------------------------------------------------------- /.inputrc: -------------------------------------------------------------------------------- 1 | set editing-mode emacs 2 | "\C-w": backward-kill-word 3 | "\C-e": end-of-line 4 | "\C-r": reverse-search-history 5 | "\C-t": set-mark 6 | "\C-y": copy-region-as-kill 7 | "\C-u": unix-line-discard 8 | "\C-o": kill-line 9 | "\C-a": beginning-of-line 10 | "\C-s": forward-search-history 11 | "\C-d": kill-word 12 | "\C-f": backward-char 13 | "\C-g": forward-char 14 | "\C-h": backward-word 15 | "\C-j": next-history 16 | "\C-k": previous-history 17 | "\C-l": forward-word 18 | "\C-v": yank 19 | "\C-n": clear-screen 20 | "\C-_": undo 21 | # In iTerm, sends Alt-d 22 | "d": backward-kill-word 23 | -------------------------------------------------------------------------------- /.oh-my-zsh/custom/extra.zsh: -------------------------------------------------------------------------------- 1 | # Fix the annoying autocomplete freeze 2 | setopt NO_cdable_vars 3 | -------------------------------------------------------------------------------- /.slate: -------------------------------------------------------------------------------- 1 | # Configs 2 | config defaultToCurrentScreen true 3 | config windowHintsShowIcons true 4 | config windowHintsIgnoreHiddenWindows false 5 | config windowHintsSpread true 6 | 7 | # Monitor Aliases 8 | alias mon-retina 1920x1200 9 | alias mon-30in 2560x1600 10 | 11 | # alias: create alias variables 12 | alias full move screenOriginX;screenOriginY screenSizeX;screenSizeY 13 | alias lefthalf move screenOriginX;screenOriginY screenSizeX/2;screenSizeY 14 | alias righthalf move screenOriginX+screenSizeX/2;screenOriginY screenSizeX/2;screenSizeY 15 | alias topleft corner top-left resize:screenSizeX/2;screenSizeY/2 16 | alias topright corner top-right resize:screenSizeX/2;screenSizeY/2 17 | alias bottomleft corner bottom-left resize:screenSizeX/2;screenSizeY/2 18 | alias bottomright corner bottom-right resize:screenSizeX/2;screenSizeY/2 19 | alias contact-list corner top-right 20 | alias chat-window corner bottom-left resize:screenSizeX/4;screenSizeY/2 21 | 22 | # Layout when using a single monitor 23 | layout 1monitor 'iTerm':REPEAT ${righthalf} 24 | layout 1monitor 'Google Chrome':REPEAT ${lefthalf} 25 | layout 1monitor 'Adium':IGNORE_FAIL,TITLE_ORDER_REGEX=Contacts ${contact-list} | ${chat-window} 26 | layout 1monitor 'nvALT':REPEAT ${righthalf} 27 | 28 | # Default Layouts 29 | default 1monitor resolutions:${mon-retina} 30 | default 1monitor resolutions:${mon-30in} 31 | 32 | ############################################################################### 33 | # Key Bindings 34 | ############################################################################### 35 | 36 | # Hyper key 37 | alias hyper ctrl;shift;alt;cmd 38 | 39 | # Super key 40 | alias super ctrl;alt;cmd 41 | 42 | # Hyper+w: Activate windows hint 43 | bind w:${hyper} hint asdfghjkl;' 44 | 45 | bind r:${hyper} relaunch 46 | 47 | # Hyper+h: Move window to left half 48 | bind h:${hyper} ${lefthalf} 49 | bind left:${super} ${lefthalf} 50 | 51 | # Hyper+j: Move focus left 52 | bind j:${hyper} focus left 53 | 54 | # Hyper+k: Move focus right 55 | bind k:${hyper} focus right 56 | 57 | # Hyper+l: Move window to right half 58 | bind l:${hyper} ${righthalf} 59 | bind right:${super} ${righthalf} 60 | 61 | # Hyper+f: Move window full screen 62 | bind f:${hyper} ${full} 63 | bind up:${super} ${full} 64 | 65 | # Application switcher 66 | bind b:${hyper} focus 'Google Chrome' 67 | bind g:${hyper} focus 'Google Chrome' 68 | bind t:${hyper} focus 'iTerm' 69 | bind return:${hyper} focus 'iTerm' 70 | bind e:${hyper} focus 'Eclipse' 71 | bind o:${hyper} focus 'Microsoft Outlook' 72 | # bind tab:cmd switch 73 | # Hyper+n: Switches to personal notes in nvAlt, mapped in nvAlt itself 74 | # Hyper+m: Switches to work notes in nvAlt, mapped in nvAlt itself 75 | 76 | # Hyper+Enter: Reset the default layout and focus Chrome and iTerm 77 | # bind return:${hyper} sequence layout 1monitor | focus 'Google Chrome' | focus 'iTerm' 78 | 79 | # source: load configs from another file 80 | -------------------------------------------------------------------------------- /.slate.js: -------------------------------------------------------------------------------- 1 | slate.bind("tab:ctrl;shift;alt;cmd", function(win) { 2 | var appName = win.app().name(); 3 | if (appName === "iTerm2") { 4 | win.doOperation(slate.operation("focus", {"app": "Google Chrome"})); 5 | } else { 6 | win.doOperation(slate.operation("focus", {"app": "iTerm2"})); 7 | } 8 | }); 9 | slate.log("[SLATE] -------------- Finished Loading Config --------------"); 10 | -------------------------------------------------------------------------------- /.teamocil/default.yml: -------------------------------------------------------------------------------- 1 | session: 2 | name: "work" 3 | windows: 4 | - name: "chat" 5 | clear: true 6 | splits: 7 | - cmd: "weechat-curses" 8 | - name: "vim" 9 | clear: true 10 | splits: 11 | - cmd: "vim" 12 | - name: "git5" 13 | clear: true 14 | root: "~/git5" 15 | splits: 16 | - cmd: "l" 17 | -------------------------------------------------------------------------------- /.teamocil/laptop.yml: -------------------------------------------------------------------------------- 1 | session: 2 | name: "laptop" 3 | windows: 4 | - name: "personal notes" 5 | clear: true 6 | splits: 7 | - cmd: "vim -c 'UniteSessionLoad personal-notes' -c 'let g:start_session_from_cmdline = 1'" 8 | - name: "work notes" 9 | clear: true 10 | splits: 11 | - cmd: "vim -c 'UniteSessionLoad work-notes' -c 'let g:start_session_from_cmdline = 1'" 12 | - name: "scratch" 13 | clear: true 14 | splits: 15 | - cmd: "date" 16 | -------------------------------------------------------------------------------- /.tmux-powerlinerc: -------------------------------------------------------------------------------- 1 | # Default configuration file for tmux-powerline. 2 | # Modeline { 3 | # vi: foldmarker={,} foldmethod=marker foldlevel=0 tabstop=4 filetype=sh 4 | # } 5 | 6 | # General { 7 | # Show which segment fails and its exit code. 8 | export TMUX_POWERLINE_DEBUG_MODE_ENABLED="false" 9 | # Use patched font symbols. 10 | export TMUX_POWERLINE_PATCHED_FONT_IN_USE="true" 11 | # The theme to use. 12 | export TMUX_POWERLINE_THEME="mytheme" 13 | # Overlay dirctory to look for themes. There you can put your own themes outside the repo. Fallback will still be the "themes" directory in the repo. 14 | export TMUX_POWERLINE_DIR_USER_THEMES="~/.dotfiles/.tmux/" 15 | # Overlay dirctory to look for segments. There you can put your own segments outside the repo. Fallback will still be the "segments" directory in the repo. 16 | export TMUX_POWERLINE_DIR_USER_SEGMENTS="" 17 | # } 18 | 19 | # battery.sh { 20 | # How to display battery remaining. Can be {percentage, cute}. 21 | export TMUX_POWERLINE_SEG_BATTERY_TYPE="percentage" 22 | # How may hearts to show if cute indicators are used. 23 | export TMUX_POWERLINE_SEG_BATTERY_NUM_HEARTS="5" 24 | # } 25 | 26 | # date.sh { 27 | # date(1) format for the date. If you don't, for some reason like ISO 8601 format, you might want to have "%D" or "%m/%d/%Y". 28 | export TMUX_POWERLINE_SEG_DATE_FORMAT="%F" 29 | # } 30 | 31 | # earthquake.sh { 32 | # The data provider to use. Currently only "goo" is supported. 33 | export TMUX_POWERLINE_SEG_EARTHQUAKE_DATA_PROVIDER="goo" 34 | # How often to update the earthquake data in seconds. 35 | # Note: This is not an early warning detector, use this 36 | # to be informed about recent earthquake magnitudes in your 37 | # area. If this is too often, goo may decide to ban you form 38 | # their server 39 | export TMUX_POWERLINE_SEG_EARTHQUAKE_UPDATE_PERIOD="600" 40 | # Only display information when earthquakes are within this many minutes 41 | export TMUX_POWERLINE_SEG_EARTHQUAKE_ALERT_TIME_WINDOW="60" 42 | # Display time with this format 43 | export TMUX_POWERLINE_SEG_EARTHQUAKE_TIME_FORMAT='(%H:%M)' 44 | # Display only if magnitude is greater or equal to this number 45 | export TMUX_POWERLINE_SEG_EARTHQUAKE_MIN_MAGNITUDE="3" 46 | # } 47 | 48 | # hostname.sh { 49 | # Use short or long format for the hostname. Can be "short, long" 50 | export TMUX_POWERLINE_SEG_HOSTNAME_FORMAT="short" 51 | # } 52 | 53 | # mailcount.sh { 54 | # Mailbox type to use. Can be any of {apple_mail, gmail, maildir, mbox} 55 | export TMUX_POWERLINE_SEG_MAILCOUNT_MAILBOX_TYPE="" 56 | 57 | ## Gmail 58 | # Enter your Gmail username here WITH OUT @gmail.com.( OR @domain) 59 | export TMUX_POWERLINE_SEG_MAILCOUNT_GMAIL_USERNAME="" 60 | # Google password. Recomenned to use application specific password (https://accounts.google.com/b/0/IssuedAuthSubTokens) Leave this empty to get password from OS X keychain. 61 | # For OSX users : MAKE SURE that you add a key to the keychain in the format as follows 62 | # Keychain Item name : http:// 63 | # Account name : @ 64 | # Password : Your password ( Once again, try to use 2 step-verification and application-specific password) 65 | # See http://support.google.com/accounts/bin/answer.py?hl=en&answer=185833 for more info. 66 | export TMUX_POWERLINE_SEG_MAILCOUNT_GMAIL_PASSWORD="" 67 | # Domain name that will complete your email. For normal GMail users it probably is "gmail.com but can be "foo.tld" for Google Apps users. 68 | export TMUX_POWERLINE_SEG_MAILCOUNT_GMAIL_SERVER="gmail.com" 69 | # How often in minutes to check for new mails. 70 | export TMUX_POWERLINE_SEG_MAILCOUNT_GMAIL_INTERVAL="5" 71 | 72 | ## Maildir 73 | # Path to the maildir to check. 74 | export TMUX_POWERLINE_SEG_MAILCOUNT_MAILDIR_INBOX="/usr/local/google/home/terryma/.mail/inbox/new" 75 | 76 | ## mbox 77 | # Path to the mbox to check. 78 | export TMUX_POWERLINE_SEG_MAILCOUNT_MBOX_INBOX="/dev/null" 79 | # } 80 | 81 | # now_playing.sh { 82 | # Music player to use. Can be any of {audacious, banshee, cmus, itunes, lastfm, mocp, mpd, mpd_simple, rdio, rhythmbox, spotify, spotify_wine}. 83 | export TMUX_POWERLINE_SEG_NOW_PLAYING_MUSIC_PLAYER="" 84 | # Maximum output length. 85 | export TMUX_POWERLINE_SEG_NOW_PLAYING_MAX_LEN="40" 86 | # How to handle too long strings. Can be {trim, roll}. 87 | export TMUX_POWERLINE_SEG_NOW_PLAYING_TRIM_METHOD="trim" 88 | # Charcters per second to roll if rolling trim method is used. 89 | export TMUX_POWERLINE_SEG_NOW_PLAYING_ROLL_SPEED="2" 90 | 91 | # Hostname for MPD server in the format "[password@]host" 92 | export TMUX_POWERLINE_SEG_NOW_PLAYING_MPD_HOST="localhost" 93 | # Port the MPD server is running on. 94 | export TMUX_POWERLINE_SEG_NOW_PLAYING_MPD_PORT="6600" 95 | 96 | # Username for Last.fm if that music player is used. 97 | export TMUX_POWERLINE_SEG_NOW_PLAYING_LASTFM_USERNAME="" 98 | # How often in seconds to update the data from last.fm. 99 | export TMUX_POWERLINE_SEG_NOW_PLAYING_LASTFM_UPDATE_PERIOD="30" 100 | # } 101 | 102 | # pwd.sh { 103 | # Maximum length of output. 104 | export TMUX_POWERLINE_SEG_PWD_MAX_LEN="40" 105 | # } 106 | 107 | # time.sh { 108 | # date(1) format for the time. Americans might want to have "%I:%M %p". 109 | export TMUX_POWERLINE_SEG_TIME_FORMAT="%H:%M" 110 | # } 111 | 112 | # weather.sh { 113 | # The data provider to use. Currently only "yahoo" is supported. 114 | export TMUX_POWERLINE_SEG_WEATHER_DATA_PROVIDER="yahoo" 115 | # What unit to use. Can be any of {c,f,k}. 116 | export TMUX_POWERLINE_SEG_WEATHER_UNIT="c" 117 | # How often to update the weather in seconds. 118 | export TMUX_POWERLINE_SEG_WEATHER_UPDATE_PERIOD="600" 119 | 120 | # Your location. Find a code that works for you: 121 | # 1. Go to Yahoo weather http://weather.yahoo.com/ 122 | # 2. Find the weather for you location 123 | # 3. Copy the last numbers in that URL. e.g. "http://weather.yahoo.com/united-states/california/newport-beach-12796587/" has the numbers "12796587" 124 | export TMUX_POWERLINE_SEG_WEATHER_LOCATION="" 125 | # } 126 | -------------------------------------------------------------------------------- /.tmux.conf: -------------------------------------------------------------------------------- 1 | # Unbind all keys 2 | unbind-key -a 3 | 4 | # Set the terminal type so colors get rendered correctly 5 | set -g default-terminal "screen-256color" 6 | 7 | set -g default-shell "/usr/local/bin/zsh" 8 | set -g default-command "zsh" 9 | # set -g default-command "reattach-to-user-namespace -l ${SHELL}" 10 | set -g renumber-windows on 11 | 12 | # Powerline settings 13 | set -g status on 14 | set -g status-interval 2 15 | set -g status-justify "centre" 16 | set -g status-left-length 100 17 | set -g status-right-length 100 18 | set -g status-left "#(~/.dotfiles/.tmux/tmux-powerline/powerline.sh left)" 19 | set -g status-right "#(~/.dotfiles/.tmux/tmux-powerline/powerline.sh right)" 20 | set -g status-bg colour235 21 | set -g status-fg colour255 22 | setw -g window-status-current-format "#[fg=colour235, bg=colour27]#[fg=colour255, bg=colour27] #I  #W #[fg=colour27, bg=colour235]" 23 | # "" 24 | 25 | # Set inactive/active window styles 26 | # set -g -u window-style 'fg=236,bg=colour236' 27 | set -g -u window-style 28 | # set -g window-style 'fg=colour248,bg=colour235' 29 | set -g -u window-active-style 30 | set -g window-active-style 'bg=colour235' 31 | # set -g window-active-style 'fg=white,bg=black' 32 | 33 | # Set the pane border colors 34 | # set -g pane-border-fg colour250 35 | # set -g pane-border-bg colour236 36 | set -g -u pane-border-style 37 | set -g -u pane-active-border-style 38 | # set -g pane-active-border-fg white 39 | # set -g pane-border-style "fg=white,bg=white" 40 | # set -g pane-active-border-style "fg=white,bg=white" 41 | 42 | # set -g pane-active-border-bg colour220 43 | set -g -u pane-active-border-style 44 | # set -g -u pane-border-style 45 | 46 | # History setting 47 | set -g history-limit 100000 48 | 49 | # Make switching to cmd mode in zsh quick! 50 | # set -s escape-time 0 51 | set -s escape-time 10 52 | 53 | # tmux messages are displayed for 4 seconds 54 | set -g display-time 4000 55 | 56 | # focus events enabled for terminals that support them 57 | # set -g focus-events on 58 | 59 | set -g status-keys emacs 60 | # vi-style controls in copy mode 61 | setw -g mode-keys vi 62 | 63 | # Turn on aggressive resize 64 | # setw -g aggressive-resize on 65 | 66 | # Set the prefix key to Ctrl-z 67 | set -g prefix C-z 68 | 69 | # Start pane numbering at 1 70 | set -g base-index 1 71 | 72 | # Load the solarized color theme 73 | # source ~/.dotfiles/.tmux/tmux-colors-solarized/tmuxcolors-256.conf 74 | 75 | # Sane scrolling 76 | # set -g terminal-overrides 'xterm*:smcup@:rmcup@' 77 | # set -g terminal-overrides '\*:smcup@:rmcup@' 78 | 79 | # Set window notifications 80 | set -g visual-activity on 81 | setw -g monitor-activity on 82 | ############################### KEY BINDINGS ################################## 83 | 84 | # Ctrl-R: Reload tmux config 85 | bind r source-file ~/.tmux.conf \; display 'Config reloaded' 86 | 87 | # Ctrl-[HJKL]: Switch panes 88 | bind C-H select-pane -L 89 | bind C-L select-pane -R 90 | bind C-J select-pane -D 91 | bind C-K select-pane -U 92 | 93 | # Ctrl-Z: Switch to last pane 94 | bind C-Z last-pane 95 | 96 | # Ctrl-O: Rotate pane 97 | bind C-O rotate-window 98 | 99 | # Ctrl-B: Break pane 100 | bind C-B break-pane 101 | 102 | # Ctrl-P: Next layout 103 | bind C-P next-layout 104 | 105 | # Ctrl-Q: Detach 106 | bind C-Q detach-client 107 | 108 | # Ctrl-0: Clock! 109 | bind 0 clock-mode 110 | 111 | # ;: Command prompt 112 | bind \; command-prompt 113 | 114 | # /: List keys 115 | # bind / list-keys 116 | 117 | # Alt-Arrow: Resize panes 118 | bind -n M-Left resize-pane -L 5 119 | bind -n M-Right resize-pane -R 5 120 | bind -n M-Up resize-pane -U 5 121 | bind -n M-Down resize-pane -D 5 122 | 123 | # PageUp 124 | bind -n Pageup copy-mode -u 125 | 126 | # Alt keys generally deal with windows and sessions 127 | 128 | # Alt-h: Previous window 129 | bind -n M-h prev 130 | bind -n M-H prev 131 | # Alt-l: Next window 132 | bind -n M-l next 133 | bind -n M-L next 134 | # Alt-n: New window 135 | bind -n M-n new-window -c "#{pane_current_path}" 136 | # Alt-t: New session 137 | bind -n M-t command-prompt "new-session -s '%%'" 138 | # Alt-p: Choose session. Use fzf 139 | bind -n M-p new-window 'session=$(tmux list-sessions -F "#{session_name}" | fzf --query="$1" --select-1 --exit-0) && tmux switch-client -t "$session"' 140 | 141 | # Alt-[: Switch to previous session 142 | # bind -n M-[ switch-client -p \; refresh-client -S 143 | # Alt-]: Switch to next session 144 | # bind -n M-] switch-client -n \; refresh-client -S 145 | # Alt-m: Zoom window and back 146 | bind -n M-m resize-pane -Z \; display 'Zoom zoom zoom!' 147 | # Alt-b: Break pane 148 | bind -n M-b break-pane 149 | # Alt-r: Rename window 150 | bind -n M-r command-prompt -I "#W" "rename-window '%%'" 151 | # Alt-Shift-r: Rename session 152 | bind -n M-R command-prompt -I "#S" "rename-session '%%'" 153 | # Alt-[1-9]: Switch to window 154 | bind -n M-1 select-window -t :1 155 | bind -n M-2 select-window -t :2 156 | bind -n M-3 select-window -t :3 157 | bind -n M-4 select-window -t :4 158 | bind -n M-5 select-window -t :5 159 | bind -n M-6 select-window -t :6 160 | bind -n M-7 select-window -t :7 161 | bind -n M-8 select-window -t :8 162 | bind -n M-9 select-window -t :9 163 | # Alt-q: Choose last session 164 | bind -n M-q switch-client -l \; refresh-client -S 165 | # Alt-w: Close pane 166 | bind -n M-w kill-pane 167 | # Alt-\: Split veritically 168 | bind -n M-\ split-window -h -c "#{pane_current_path}" 169 | # Alt--: Split horizontally 170 | bind -n M-- split-window -v -c "#{pane_current_path}" 171 | # Alt-c: Copy mode 172 | bind -n M-c copy-mode 173 | # Alt-f: Copy mode and search up 174 | bind -n M-f copy-mode \; send-keys ? 175 | # Alt-0: Display panes 176 | bind -n M-0 display-panes 177 | 178 | # Ctrl-Shift-Left/Right: Move window 179 | bind-key -n C-S-Left swap-window -t -1 180 | bind-key -n C-S-Right swap-window -t +1 181 | 182 | # Copy mode behaves more like vim 183 | # bind -t vi-copy v begin-selection 184 | bind-key -Tcopy-mode-vi 'v' send -X begin-selection 185 | # bind -t vi-copy V rectangle-toggle 186 | 187 | # Mouse mode 188 | set -g mouse on 189 | bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'select-pane -t=; copy-mode -e; send-keys -M'" 190 | bind -n WheelDownPane select-pane -t= \; send-keys -M 191 | # This allows me to change the selection and press 'y' to copy if I wish 192 | # unbind -t vi-copy MouseDragEnd1Pane 193 | # bind-key -t vi-copy MouseDragEnd1Pane copy-selection -x 194 | # bind -t vi-copy MouseDragEnd1Pane copy-pipe "reattach-to-user-namespace pbcopy" 195 | 196 | setw -g xterm-keys on 197 | 198 | # Bind [ and ] to some common used layout 199 | bind [ select-layout even-horizontal 200 | bind ] select-layout even-vertical 201 | 202 | # List of plugins 203 | set -g @plugin 'tmux-plugins/tpm' 204 | # set -g @plugin 'tmux-plugins/tmux-resurrect' 205 | # set -g @plugin 'tmux-plugins/tmux-continuum' 206 | set -g @plugin 'tmux-plugins/tmux-yank' 207 | set -g @plugin 'tmux-plugins/tmux-open' 208 | set -g @plugin 'tmux-plugins/tmux-copycat' 209 | set -g @plugin 'Morantron/tmux-fingers' 210 | 211 | set -g @fingers-compact-hints 0 212 | set -g @fingers-key C-f 213 | 214 | 215 | # Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf) 216 | run '~/.tmux/plugins/tpm/tpm' 217 | -------------------------------------------------------------------------------- /.tmux/mytheme.sh: -------------------------------------------------------------------------------- 1 | # Default Theme 2 | 3 | if patched_font_in_use; then 4 | TMUX_POWERLINE_SEPARATOR_LEFT_BOLD="" 5 | TMUX_POWERLINE_SEPARATOR_LEFT_THIN="" 6 | TMUX_POWERLINE_SEPARATOR_RIGHT_BOLD="" 7 | TMUX_POWERLINE_SEPARATOR_RIGHT_THIN="" 8 | else 9 | TMUX_POWERLINE_SEPARATOR_LEFT_BOLD="◀" 10 | TMUX_POWERLINE_SEPARATOR_LEFT_THIN="❮" 11 | TMUX_POWERLINE_SEPARATOR_RIGHT_BOLD="▶" 12 | TMUX_POWERLINE_SEPARATOR_RIGHT_THIN="❯" 13 | fi 14 | 15 | TMUX_POWERLINE_DEFAULT_BACKGROUND_COLOR=${TMUX_POWERLINE_DEFAULT_BACKGROUND_COLOR:-'235'} 16 | TMUX_POWERLINE_DEFAULT_FOREGROUND_COLOR=${TMUX_POWERLINE_DEFAULT_FOREGROUND_COLOR:-'255'} 17 | 18 | TMUX_POWERLINE_DEFAULT_LEFTSIDE_SEPARATOR=${TMUX_POWERLINE_DEFAULT_LEFTSIDE_SEPARATOR:-$TMUX_POWERLINE_SEPARATOR_RIGHT_BOLD} 19 | TMUX_POWERLINE_DEFAULT_RIGHTSIDE_SEPARATOR=${TMUX_POWERLINE_DEFAULT_RIGHTSIDE_SEPARATOR:-$TMUX_POWERLINE_SEPARATOR_LEFT_BOLD} 20 | 21 | 22 | # Format: segment_name background_color foreground_color [non_default_separator] 23 | 24 | if [ -z $TMUX_POWERLINE_LEFT_STATUS_SEGMENTS ]; then 25 | TMUX_POWERLINE_LEFT_STATUS_SEGMENTS=( 26 | "tmux_session_info 148 234" \ 27 | # "hostname 33 0" \ 28 | #"ifstat 30 255" \ 29 | #"ifstat_sys 30 255" \ 30 | # "lan_ip 24 255 ${TMUX_POWERLINE_SEPARATOR_RIGHT_THIN}" \ 31 | # "wan_ip 24 255" \ 32 | # "vcs_branch 29 88" \ 33 | # "vcs_compare 60 255" \ 34 | # "vcs_staged 64 255" \ 35 | # "vcs_modified 9 255" \ 36 | # "vcs_others 245 0" \ 37 | ) 38 | fi 39 | 40 | if [ -z $TMUX_POWERLINE_RIGHT_STATUS_SEGMENTS ]; then 41 | TMUX_POWERLINE_RIGHT_STATUS_SEGMENTS=( 42 | #"earthquake 3 0" \ 43 | # "pwd 89 211" \ 44 | # "mailcount 9 255" \ 45 | # "now_playing 234 37" \ 46 | #"cpu 240 136" \ 47 | # "load 237 167" \ 48 | #"tmux_mem_cpu_load 234 136" \ 49 | # "battery 137 127" \ 50 | # "weather 37 255" \ 51 | #"xkb_layout 125 117" \ 52 | "date_day 235 136" \ 53 | "date 235 136 ${TMUX_POWERLINE_SEPARATOR_LEFT_THIN}" \ 54 | "time 235 136 ${TMUX_POWERLINE_SEPARATOR_LEFT_THIN}" \ 55 | #"utc_time 235 136 ${TMUX_POWERLINE_SEPARATOR_LEFT_THIN}" \ 56 | ) 57 | fi 58 | -------------------------------------------------------------------------------- /.tmux/zoom: -------------------------------------------------------------------------------- 1 | #!/bin/bash -f 2 | currentwindow=`tmux list-window | tr '\t' ' ' | sed -n -e '/(active)/s/^[^:]*: *\([^ ]*\) .*/\1/gp'`; 3 | currentpane=`tmux list-panes | sed -n -e '/(active)/s/^\([^:]*\):.*/\1/gp'`; 4 | panecount=`tmux list-panes | wc | sed -e 's/^ *//g' -e 's/ .*$//g'`; 5 | inzoom=`echo $currentwindow | sed -n -e '/^zoom/p'`; 6 | if [ $panecount -ne 1 ]; then 7 | inzoom=""; 8 | fi 9 | if [ $inzoom ]; then 10 | lastpane=`echo $currentwindow | rev | cut -f 1 -d '@' | rev`; 11 | lastwindow=`echo $currentwindow | cut -f 2- -d '@' | rev | cut -f 2- -d '@' | rev`; 12 | tmux select-window -t $lastwindow; 13 | tmux select-pane -t $lastpane; 14 | tmux swap-pane -s $currentwindow; 15 | tmux kill-window -t $currentwindow; 16 | else 17 | newwindowname=zoom@$currentwindow@$currentpane; 18 | tmux new-window -d -n $newwindowname; 19 | tmux swap-pane -s $newwindowname; 20 | tmux select-window -t $newwindowname; 21 | fi 22 | -------------------------------------------------------------------------------- /.vim/UltiSnips/all.snippets: -------------------------------------------------------------------------------- 1 | snippet == "80 character comment header" !b 2 | """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 3 | " ${0:Title} 4 | """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 5 | endsnippet 6 | -------------------------------------------------------------------------------- /.vim/ftplugin/qf.vim: -------------------------------------------------------------------------------- 1 | setlocal number 2 | setlocal colorcolumn= 3 | -------------------------------------------------------------------------------- /.vim/snippets/_.snip: -------------------------------------------------------------------------------- 1 | snippet TODO 2 | abbr TODO 3 | options word 4 | TODO(`system("echo -n \`whoami\`")`): 5 | 6 | snippet FIXME 7 | abbr FIXME 8 | options word 9 | FIXME(`system("echo -n \`whoami\`")`): 10 | 11 | -------------------------------------------------------------------------------- /.vim/snippets/javascript.snip: -------------------------------------------------------------------------------- 1 | snippet header 2 | abbr header 3 | options head 4 | // Copyright 2013 Google Inc. All Rights Reserved. 5 | // @author terryma@google.com (Terry Ma) 6 | ${1} 7 | -------------------------------------------------------------------------------- /.vim/snippets/python.snip: -------------------------------------------------------------------------------- 1 | snippet header 2 | abbr header 3 | options head 4 | # Copyright 2013 Google Inc. All Rights Reserved. 5 | 6 | """${1:One-line documentation for test module.} 7 | 8 | ${2:A detailed description of test.} 9 | """ 10 | 11 | __author__ = 'terryma@google.com (Terry Ma)' 12 | 13 | from google3.pyglib import app 14 | from google3.pyglib import flags 15 | 16 | FLAGS = flags.FLAGS 17 | 18 | 19 | def main(unused_argv): 20 | pass 21 | 22 | 23 | if __name__ == '__main__': 24 | app.run() 25 | -------------------------------------------------------------------------------- /.vim/snippets/sawzall.snip: -------------------------------------------------------------------------------- 1 | snippet header 2 | abbr header 3 | options head 4 | # Copyright 2013 Google Inc. All Rights Reserved. 5 | # Author: terryma@google.com (Terry Ma) 6 | # 7 | # ${1:Description of what this file does.} 8 | 9 | ${2} 10 | -------------------------------------------------------------------------------- /.vim/snippets/sh.snip: -------------------------------------------------------------------------------- 1 | snippet header 2 | abbr header 3 | options head 4 | #!/bin/bash 5 | # 6 | # Copyright 2013 Google Inc. All Rights Reserved. 7 | # Author: terryma@google.com (Terry Ma) 8 | # 9 | # ${1:Description of what this script does.} 10 | 11 | source gbash.sh || exit 12 | 13 | gbash::init_google "$@" 14 | set -- "${GBASH_ARGV[@]}" 15 | 16 | ${2} 17 | -------------------------------------------------------------------------------- /.vim/snippets/vim.snip: -------------------------------------------------------------------------------- 1 | snippet section 2 | abbr section 3 | options head 4 | "=============================================================================== 5 | " ${1:Title} 6 | "=============================================================================== 7 | 8 | ${2} 9 | -------------------------------------------------------------------------------- /.vimrc: -------------------------------------------------------------------------------- 1 | set nocompatible 2 | 3 | "=============================================================================== 4 | " vim-plug 5 | "=============================================================================== 6 | call plug#begin('~/.vim/plugged') 7 | Plug 'Shougo/vimproc.vim', { 'do': 'make' } 8 | 9 | " Fuzzy search 10 | Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } 11 | Plug 'junegunn/fzf.vim' 12 | 13 | " Code completion 14 | " Plug 'Valloric/YouCompleteMe', { 'on': [] } 15 | 16 | " Snippets 17 | " Plug 'SirVer/ultisnips', { 'on': [] } 18 | " Plug 'honza/vim-snippets' 19 | 20 | " Marks 21 | " Plug 'airblade/vim-gitgutter' 22 | 23 | " Comments 24 | Plug 'scrooloose/nerdcommenter' 25 | 26 | " Navigation 27 | Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' } 28 | Plug 'ton/vim-bufsurf' 29 | 30 | " Syntax checker 31 | Plug 'Chiel92/vim-autoformat' 32 | Plug 'sbdchd/neoformat' 33 | Plug 'hynek/vim-python-pep8-indent' 34 | Plug 'fisadev/vim-isort' 35 | Plug 'w0rp/ale' 36 | 37 | " Shell 38 | Plug 'thinca/vim-quickrun' 39 | 40 | " Git 41 | Plug 'tpope/vim-fugitive' 42 | Plug 'tpope/vim-rhubarb' 43 | Plug 'junegunn/gv.vim' 44 | Plug 'mattn/webapi-vim' 45 | Plug 'mattn/gist-vim' 46 | 47 | " Motions 48 | Plug 'rhysd/clever-f.vim' 49 | " Plug 'easymotion/vim-easymotion' 50 | " Plug 'justinmk/vim-sneak' 51 | 52 | " Text Objects 53 | Plug 'tpope/vim-surround' 54 | Plug 'tpope/vim-repeat' 55 | Plug 'kana/vim-textobj-user' 56 | " Plug 'kana/vim-textobj-entire' " ae, ie 57 | Plug 'kana/vim-textobj-line' " al, il 58 | Plug 'terryma/vim-expand-region' 59 | 60 | " Tags 61 | " Plug 'xolox/vim-misc' 62 | " Plug 'xolox/vim-easytags' 63 | 64 | " Color themems 65 | Plug 'junegunn/seoul256.vim' 66 | 67 | " Misc 68 | Plug 'kchmck/vim-coffee-script' 69 | Plug 'leafgarland/typescript-vim' 70 | Plug 'mtth/scratch.vim' 71 | " Plug 'mhinz/vim-startify' 72 | Plug 'terryma/vim-smooth-scroll' 73 | Plug 'terryma/vim-multiple-cursors' 74 | Plug 'hashivim/vim-terraform' 75 | " Plug 'jiangmiao/auto-pairs' 76 | Plug 'vimwiki/vimwiki', { 'branch': 'dev' } 77 | Plug 'metakirby5/codi.vim' 78 | Plug 'junegunn/vim-peekaboo' 79 | Plug 'junegunn/goyo.vim' 80 | 81 | call plug#end() 82 | 83 | filetype plugin indent on 84 | syntax enable 85 | runtime macros/matchit.vim 86 | 87 | "=============================================================================== 88 | " Local Settings 89 | " =============================================================================== 90 | 91 | try 92 | source ~/.vimrc.local 93 | catch 94 | endtry 95 | 96 | "=============================================================================== 97 | " General Settings 98 | "=============================================================================== 99 | 100 | " Set augroup 101 | augroup MyAutoCmd 102 | autocmd! 103 | augroup END 104 | 105 | syntax on 106 | 107 | set lazyredraw 108 | set ttyfast 109 | 110 | " Solid line for vsplit separator 111 | set fcs=vert:│ 112 | 113 | " Don't show the intro 114 | set shortmess+=I 115 | 116 | " Turn on the mouse in all modes 117 | set mouse=a 118 | 119 | " Give one virtual space at end of line 120 | set virtualedit=onemore 121 | 122 | " Turn on line number 123 | set number 124 | 125 | " Always splits to the right and below 126 | set splitright 127 | set splitbelow 128 | 129 | " Boost performance of rendering long lines 130 | set synmaxcol=300 131 | 132 | " Colorscheme 133 | " 256bit terminal 134 | set t_Co=256 135 | let g:seoul256_background = 234 136 | colorscheme seoul256 137 | 138 | " Sets how many lines of history vim has to remember 139 | set history=1000 140 | 141 | " Set to auto read when a file is changed from the outside 142 | set autoread 143 | 144 | " Set to auto write file 145 | set autowriteall 146 | 147 | " Display unprintable chars 148 | set list 149 | set listchars=tab:▸\ ,extends:❯,precedes:❮,nbsp:␣ 150 | set showbreak=↪ 151 | 152 | " listchar=trail is not as flexible, use the below to highlight trailing 153 | " whitespace 154 | highlight ExtraWhitespace ctermbg=red guibg=red 155 | match ExtraWhitespace /\s\+$/ 156 | 157 | " Minimal number of screen lines to keep above and below the cursor 158 | set scrolloff=10 159 | 160 | " How many lines to scroll at a time, make scrolling appears faster 161 | set scrolljump=5 162 | 163 | " Min width of the number column to the left 164 | set numberwidth=1 165 | 166 | " Open all folds initially 167 | set foldmethod=indent 168 | set foldlevelstart=99 169 | 170 | " No need to show mode 171 | set noshowmode 172 | 173 | " Auto complete setting 174 | set completeopt=longest,menuone 175 | 176 | set wildmode=list:longest,full 177 | set wildmenu "turn on wild menu 178 | set wildignore=*.o,*.obj,*~ "stuff to ignore when tab completing 179 | set wildignore+=*DS_Store* 180 | set wildignore+=vendor/rails/** 181 | set wildignore+=vendor/cache/** 182 | set wildignore+=*.gem 183 | set wildignore+=log/** 184 | set wildignore+=tmp/** 185 | set wildignore+=*.png,*.jpg,*.gif 186 | set wildignore+=*.so,*.swp,*.zip,*/.Trash/**,*.pdf,*.dmg,*/Library/**,*/.rbenv/** 187 | set wildignore+=*/.nx/**,*.app 188 | 189 | " Allow changing buffer without saving it first 190 | set hidden 191 | 192 | " Set backspace config 193 | set backspace=eol,start,indent 194 | 195 | " Case insensitive search 196 | set ignorecase 197 | set smartcase 198 | 199 | " Set sensible heights for splits 200 | " set winheight=50 201 | 202 | " Make search act like search in modern browsers 203 | set incsearch 204 | 205 | " Make regex a little easier to type 206 | set magic 207 | 208 | " Don't show matching brackets 209 | set noshowmatch 210 | 211 | " Show incomplete commands 212 | set showcmd 213 | 214 | " Turn off sound 215 | set vb 216 | set t_vb= 217 | 218 | " Always show the statusline 219 | set laststatus=2 220 | 221 | " Explicitly set encoding to utf-8 222 | set encoding=utf-8 223 | 224 | " Column width indicator 225 | set colorcolumn=+1 226 | 227 | " Lower the delay of escaping out of other modes 228 | " keycode times out fast, mapping times out in a bit more time 229 | set timeout timeoutlen=1000 ttimeout ttimeoutlen=1 230 | 231 | " Reload vimrc when edited 232 | " autocmd MyAutoCmd BufWritePost .vimrc,_vimrc,vimrc,.gvimrc,_gvimrc,gvimrc 233 | " \ so $MYVIMRC | if has('gui_running') | source $MYGVIMRC | endif | AirlineRefresh 234 | autocmd MyAutoCmd BufWritePost .vimrc,_vimrc,vimrc,.gvimrc,_gvimrc,gvimrc 235 | \ so $MYVIMRC | if has('gui_running') | source $MYGVIMRC | endif 236 | try 237 | lang en_us 238 | catch 239 | endtry 240 | 241 | " Turn backup off 242 | set nobackup 243 | set nowritebackup 244 | set noswapfile 245 | 246 | " Tab settings 247 | set expandtab 248 | set shiftwidth=2 249 | set tabstop=8 250 | set softtabstop=2 251 | set smarttab 252 | 253 | " Text display settings 254 | set linebreak 255 | set textwidth=120 256 | set autoindent 257 | set nowrap 258 | set whichwrap+=h,l,<,>,[,] 259 | 260 | " Writes to the unnamed register also writes to the * and + registers. This 261 | " makes it easy to interact with the system clipboard 262 | if has ('unnamedplus') 263 | set clipboard=unnamedplus 264 | else 265 | set clipboard=unnamed 266 | endif 267 | 268 | " Use a low updatetime. This is used by CursorHold 269 | set updatetime=1000 270 | " I like my word boundary to be a little bigger than the default 271 | " FIXME Apparently this affects html indenting. Figure out what the problem is 272 | " set iskeyword+=<,>,[,],:,-,`,! 273 | " set iskeyword-=_ 274 | 275 | " Cursor settings. This makes terminal vim sooo much nicer! 276 | " Tmux will only forward escape sequences to the terminal if surrounded by a DCS 277 | " sequence 278 | if exists('$TMUX') 279 | let &t_SI = "\Ptmux;\\]50;CursorShape=1\x7\\\" 280 | let &t_EI = "\Ptmux;\\]50;CursorShape=0\x7\\\" 281 | else 282 | let &t_SI = "\]50;CursorShape=1\x7" 283 | let &t_EI = "\]50;CursorShape=0\x7" 284 | endif 285 | 286 | " Diff options 287 | set diffopt=filler,vertical 288 | 289 | " Disable viminfo, causes startup and shutdown to take longer 290 | set viminfo='10,<0,s0,h,/100,:100,@0 291 | 292 | "=============================================================================== 293 | " Leader Key Mappings 294 | "=============================================================================== 295 | 296 | " Map leader and localleader key to comma 297 | let mapleader = "," 298 | let g:mapleader = "," 299 | let maplocalleader = "," 300 | let g:maplocalleader = "," 301 | 302 | " 1: Toggle between paste mode 303 | nnoremap 1 :set paste! 304 | 305 | " 2: TODO 306 | 307 | " tab: TODO 308 | 309 | " q: Quit all, very useful in vimdiff 310 | nnoremap q :qa 311 | 312 | " w: TODO 313 | 314 | " e: Fast editing of the .vimrc 315 | nnoremap e :e! ~/.vimrc 316 | 317 | " r: TODO 318 | 319 | " t: TODO 320 | 321 | " y: TODO 322 | 323 | " u: TODO 324 | 325 | " o: TODO 326 | 327 | " p: TODO 328 | 329 | " a: TODO 330 | nnoremap a :lopen 331 | 332 | " s: TODO 333 | 334 | " d: TODO 335 | 336 | " f: Autoformat 337 | nnoremap f :Autoformat 338 | 339 | " g: Fugitive shortcuts 340 | 341 | " z: TODO 342 | 343 | " x: TODO 344 | 345 | " c*: NERDCommenter mappings 346 | " cd: Switch to the directory of the open buffer 347 | nnoremap cd :cd %:p:h:pwd 348 | 349 | " v: TODO 350 | 351 | " b: TODO 352 | 353 | " n: NERDTreeFind 354 | nnoremap n :NERDTreeFind :wincmd p 355 | 356 | " m: Maximize current split 357 | nnoremap m _ 358 | 359 | " : TODO 360 | 361 | " ,: Switch to previous split 362 | nnoremap , p 363 | 364 | "=============================================================================== 365 | " Command-line Mode Key Mappings 366 | "=============================================================================== 367 | 368 | " Bash like keys for the command line. These resemble personal zsh mappings 369 | cnoremap 370 | cnoremap 371 | 372 | " Ctrl-[hl]: Move left/right by word 373 | cnoremap 374 | cnoremap 375 | 376 | cnoremap 377 | cnoremap 378 | cnoremap 379 | cnoremap 380 | 381 | " Ctrl-v: Paste 382 | cnoremap " 383 | 384 | " w!!: Writes using sudo 385 | cnoremap w!! w !sudo tee % >/dev/null 386 | 387 | autocmd MyAutoCmd CmdwinEnter : map 388 | 389 | "=============================================================================== 390 | " Normal Mode Key Mappings 391 | "=============================================================================== 392 | " q: record macros 393 | " w: Move word forward 394 | " e: Move to end of word 395 | " r: Replace single character 396 | " t: Find till 397 | " y: Yank. Last yank is always stored in register 0. So paste with "0p if you did a delete after the yank 398 | " u: Undo 399 | " i: Insert before cursor 400 | " o: Insert line below cursor 401 | " p: Paste 402 | nnoremap p gp 403 | " [: Many functions 404 | " ]: Many functions 405 | " \: Toggle comment 406 | nmap \ c 407 | " a: Insert after cursor 408 | " s: EasyMotion 409 | " d: Delete. Access it from register "" or "1-9 410 | " f: Clever-f 411 | " g: Many functions 412 | " gp to visually select pasted text 413 | nnoremap gp '`[' . strpart(getregtype(), 0, 1) . '`]' 414 | " h: Left 415 | " j: Down 416 | " k: Up 417 | " l: Right 418 | " ;: Command mode 419 | noremap ; : 420 | " ': Go to mark 421 | " z: Many functions 422 | " x: Delete char 423 | " c: Change into the blackhole register to not clobber the last yank 424 | nnoremap c "_c 425 | " v: Visual mode 426 | " b: Move word backward 427 | " n: Next, keep search matches in the middle of the window 428 | nnoremap n nzzzv 429 | " m: Marks 430 | " ,: Leader 431 | " .: Repeat last command 432 | " /" Search 433 | " Up Down Left Right move pane 434 | nnoremap k 435 | nnoremap j 436 | nnoremap h 437 | nnoremap l 438 | 439 | " Enter: Highlight cursor location 440 | " nnoremap :call CursorPing() 441 | 442 | " Backspace: Toggle search highlight 443 | nnoremap :set hlsearch! hlsearch? 444 | 445 | " Tab: Same as on the command line 446 | 447 | " Space: Scratch 448 | nnoremap :Scratch 449 | 450 | "=============================================================================== 451 | " Normal Mode Shift Key Mappings 452 | "=============================================================================== 453 | 454 | " Shift-Tab: NERDTree 455 | nnoremap :NERDTreeToggle 456 | 457 | " Shift-q: Closes the window 458 | nnoremap Q :q! 459 | 460 | " Shift-w: Move to start of next word 461 | 462 | " Shift-e: Move to end of word forward 463 | 464 | " Shift-r: Reindent entire file 465 | nnoremap R mqHmwgg=G`wzt`q 466 | 467 | " Shift-t: Finds till backwards 468 | 469 | " Shift-y: Remove join lines to this, Y looks like a join of two lines into one 470 | noremap Y J 471 | 472 | " Shift-u: Redos since 'u' undos 473 | nnoremap U :redo 474 | 475 | " Shift-i: Insert at beginning of line 476 | 477 | " Shift-o: Insert line above 478 | 479 | " Shift-p: Paste above line 480 | 481 | " Shift-[: Beginning of paragraph 482 | 483 | " Shift-]: End of paragraph 484 | 485 | " Shift--(_): Quick horizontal splits 486 | nnoremap _ :sp 487 | 488 | " Shift-\(|): Quick vertical splits 489 | nnoremap :vsp 490 | 491 | " Shift-a: Insert at end of line 492 | 493 | " Shift-s: Split and return to normal mode 494 | nnoremap S i 495 | 496 | " Shift-d: Deletes til the end of line 497 | 498 | " Shift-f: Finds backwards 499 | 500 | " Shift-g: Go to end of file 501 | 502 | " Shift-h: Go to beginning of line. 503 | noremap H ^ 504 | 505 | " Shift-j: expand-region 506 | map K (expand_region_expand) 507 | 508 | " Shift-k: shrink-region 509 | map J (expand_region_shrink) 510 | 511 | " Shift-l: Go to end of line 512 | noremap L g_ 513 | 514 | " :: TODO 515 | 516 | " Shift-'("): Handles registers 517 | 518 | " Shift-z: Bufsurf back 519 | nnoremap Z :BufSurfBack 520 | 521 | " Shift-z: Bufsurf forward 522 | nnoremap X :BufSurfForward 523 | 524 | " Shift-c: Deletes rest of line and go to insert mode 525 | 526 | " Shift-v: Visual line mode 527 | 528 | " Shift-b: Move word backward (TODO Replaced by , maybe remap?) 529 | 530 | " Shift-n: Find next occurrence backward 531 | nnoremap N Nzzzv 532 | 533 | " Shift-m: Move cursor to mid screen (TODO Remap since I don't ever use this) 534 | nmap M (ale_next_wrap) 535 | 536 | " <: Indent left 537 | 538 | " >: Indent right 539 | 540 | " ?: Search backwards 541 | 542 | " +/-: Increment number 543 | nnoremap + 544 | nnoremap - 545 | 546 | "=============================================================================== 547 | " Normal Mode Ctrl Key Mappings 548 | "=============================================================================== 549 | 550 | " Ctrl-q: Visual block mode 551 | 552 | " Ctrl-w: Window management 553 | 554 | " Ctrl-e: TODO 555 | 556 | " Ctrl-r: Show command history 557 | nmap :History: 558 | 559 | " Ctrl-t: Go to opposite tag 560 | nmap % 561 | 562 | " Ctrl-y: (Scroll up. Ctrl-k is much more effective TODO Remap) 563 | " Ctrl-u: Scroll half a screen up smoothly 564 | noremap :call smooth_scroll#up(&scroll, 5, 1) 565 | 566 | " Ctrl-i: Go forward in the jumplist, also realigns screen. See mapping for 567 | nnoremap zzzv 568 | 569 | " Ctrl-o: Go back in the jumplist, also realign the screen 570 | nnoremap zzzv 571 | 572 | " Ctrl-p: Recent files 573 | nnoremap :History 574 | 575 | " Ctrl-[: Esc 576 | 577 | " Ctrl-]: Go forward in tag stack 578 | 579 | " Ctrl-\: Quick outline 580 | nmap :BTags 581 | 582 | " Ctrl-a: All buffers 583 | nnoremap :Buffers 584 | 585 | " Ctrl-s: Save 586 | nmap :w! 587 | 588 | " Ctrl-d: Scroll half a screen down smoothly 589 | noremap :call smooth_scroll#down(&scroll, 5, 1) 590 | 591 | " Ctrl-f: fzf 592 | nnoremap :Ag 593 | 594 | " Ctrl-g: GitFiles 595 | nmap :GitFiles 596 | 597 | " Ctrl-h: Move word back. Consistent with zsh 598 | noremap B 599 | inoremap B 600 | 601 | " Ctrl-j: Scroll + move down through the file 602 | " noremap 55j 603 | noremap 5 604 | 605 | " Ctrl-k: Scroll + move up through the file 606 | " noremap 55k 607 | noremap 5 608 | 609 | " Ctrl-l: Move word forward. Consistent with zsh 610 | noremap W 611 | inoremap W 612 | 613 | " Ctrl-;: Vim can't map this 614 | 615 | " Ctrl-': Vim can't map this 616 | 617 | " Ctrl-z: This is the command key for tmux 618 | 619 | " Ctrl-x: Cycle through the splits. I don't ever use enough splits to justify 620 | " wasting 4 very easy to hit keys for them. 621 | nnoremap w 622 | 623 | " Ctrl-c: FZF commands 624 | nnoremap :Commands 625 | 626 | " Ctrl-v: Paste (works with system clipboard due to clipboard setting earlier) 627 | nnoremap p 628 | 629 | " Ctrl-b: Go to tag 630 | nnoremap 631 | 632 | " Ctrl-n: Next cursor in MultiCursor mode 633 | 634 | " Ctrl-m: Same as Enter 635 | 636 | " Ctrl-,: Vim can't map this 637 | 638 | " Ctrl-.: Vim can't map this 639 | 640 | " Ctrl-/: Vim can't map this 641 | 642 | " Ctrl-Space: FZF files 643 | nnoremap :Files 644 | 645 | "=============================================================================== 646 | " Insert Mode Ctrl Key Mappings 647 | "=============================================================================== 648 | 649 | " Ctrl-q: Quoted insert. Useful for doing key binding 650 | 651 | " Ctrl-w: Delete previous word, create undo point 652 | inoremap u 653 | 654 | " Ctrl-e: Go to end of line 655 | inoremap A 656 | 657 | " Ctrl-r: Insert register 658 | 659 | " Ctrl-t: Indent shiftwidth 660 | 661 | " Ctrl-y: Insert char above cursor 662 | " TODO: When do I ever use this? 663 | 664 | " Ctrl-u: Delete til beginning of line, create undo point 665 | inoremap u 666 | 667 | " Ctrl-i: Tab 668 | 669 | " Ctrl-o: Execute one normal mode command 670 | 671 | " Ctrl-p: Auto complete previous 672 | " TODO: When do I ever use this? 673 | 674 | " Ctrl-a: Go to begin of line 675 | inoremap I 676 | 677 | " Ctrl-s: Save 678 | inoremap :w 679 | 680 | " Ctrl-d: Unindent shiftwidth 681 | 682 | " Ctrl-f: Move cursor left 683 | inoremap 684 | 685 | " Ctrl-g: Move cursor right 686 | silent! iunmap s 687 | silent! iunmap S 688 | inoremap 689 | 690 | " Ctrl-h: Move word left 691 | inoremap B 692 | 693 | " Ctrl-j: Move cursor up 694 | inoremap pumvisible() ? "\\" : "\" 695 | 696 | " Ctrl-k: Move cursor up 697 | inoremap pumvisible() ? "\\" : "\" 698 | 699 | " Ctrl-l: Move word right 700 | inoremap W 701 | 702 | " Ctrl-z: This is the command key for tmux 703 | 704 | " Ctrl-x: Delete char under cursor. (If we simply use x, it wouldn't delete 705 | " newline chars 706 | " inoremap X 707 | 708 | " Ctrl-c: Inserts line below 709 | inoremap o 710 | 711 | " Ctrl-v: Paste. For some reason, is not creating an undo point in the 712 | " mapping 713 | inoremap ugP 714 | 715 | " Ctrl-b: TODO 716 | 717 | " Ctrl-n: Auto complete next 718 | 719 | " Ctrl-m: Same as Enter 720 | 721 | " Ctrl-space: YCM 722 | 723 | " Ctrl-/: Undo 724 | inoremap u 725 | 726 | "=============================================================================== 727 | " Visual Mode Ctrl Key Mappings 728 | "=============================================================================== 729 | 730 | " Ctrl-c: Copy (works with system clipboard due to clipboard setting) 731 | vnoremap y`] 732 | 733 | " Ctrl-r: Easier search and replace 734 | vnoremap "hy:%s/h//gc 735 | 736 | " Ctrl-s: Easier substitue 737 | vnoremap :s/\%V//g 738 | 739 | " Ctrl-f: Find highlight word with FZF 740 | vnoremap "hy:Ag h 741 | 742 | "=============================================================================== 743 | " Normal Mode Meta/Alt Key Mappings 744 | "=============================================================================== 745 | " Fix alt key keycodes. Using keycodes instead of escape sequence for mapping will use ttimeout instead of timeout, 746 | " which means pressing escape will not cause a delay. 747 | let c='a' 748 | while c <= 'z' 749 | exec "set =\e".c 750 | exec "set =\e".toupper(c) 751 | let c = nr2char(1+char2nr(c)) 752 | endw 753 | 754 | " Alt-a: Select all 755 | nnoremap :keepjumps normal ggVG 756 | 757 | " Alt-s: isort and format 758 | nnoremap :Isort:Neoformat 759 | 760 | " Alt-h: tmux 761 | 762 | " Alt-j: Move current line down 763 | nnoremap mz:m+`z== 764 | 765 | " Alt-k: Move current line up 766 | nnoremap mz:m-2`z== 767 | 768 | " Alt-l: tmux 769 | 770 | " Alt-Shift-j: Duplicate line down 771 | nnoremap mzyyp`zj 772 | 773 | " Alt-Shift-k: Duplicate line up 774 | nnoremap mzyyp`z 775 | 776 | " Alt-o: Jump back in the changelist 777 | nnoremap g; 778 | 779 | " Alt-i: Jump forward in the changelist 780 | nnoremap g, 781 | 782 | " Alt-n: tmux 783 | 784 | "=============================================================================== 785 | " Insert Mode Meta/Alt Key Mappings 786 | "=============================================================================== 787 | 788 | " Alt-j: Move current line down 789 | " imap a 790 | 791 | " Alt-k: Move current line down 792 | " imap a 793 | 794 | "=============================================================================== 795 | " Visual Mode Meta/Alt Key Mappings 796 | "=============================================================================== 797 | 798 | " Alt-j: Move selections down 799 | vnoremap :m'>+`mzgv`yo`z 800 | 801 | " Alt-k: Move selections up 802 | vnoremap :m'<-2`>my` :m '>+1gv=gv 821 | vnoremap :m '<-2gv=gv 822 | 823 | " \: Toggle comment 824 | xmap \ c 825 | 826 | " Enter: Highlight visual selections 827 | xnoremap y:let @/ = @":set hlsearch 828 | 829 | " Backspace: Delete selected and go into insert mode 830 | xnoremap c 831 | 832 | " Space: QuickRun 833 | xnoremap :QuickRun 834 | 835 | " <|>: Reselect visual block after indent 836 | xnoremap < >gv 838 | 839 | " .: repeats the last command on every line 840 | xnoremap . :normal. 841 | 842 | " @: repeats macro on every line 843 | xnoremap @ :normal@ 844 | 845 | " Tab: Indent 846 | xmap > 847 | 848 | " shift-tab: unindent 849 | xmap < 850 | 851 | "=============================================================================== 852 | " Operator Pending Mode Key Mappings 853 | "=============================================================================== 854 | 855 | "=============================================================================== 856 | " Autocommands 857 | "=============================================================================== 858 | function! CursorPing() 859 | set cursorline cursorcolumn 860 | redraw 861 | sleep 200m 862 | set nocursorline nocursorcolumn 863 | endfunction 864 | 865 | " q quits in certain page types. Don't map esc, that interferes with mouse input 866 | autocmd MyAutoCmd FileType help,quickrun 867 | \ if (!&modifiable || &ft==#'quickrun') | 868 | \ nnoremap q :q| 869 | \ nnoremap :q| 870 | \ endif 871 | autocmd MyAutoCmd FileType qf nnoremap q :q 872 | 873 | " json = javascript syntax highlight 874 | autocmd MyAutoCmd FileType json setlocal syntax=javascript 875 | 876 | " Diff mode settings 877 | " au MyAutoCmd FilterWritePre * if &diff | exe 'nnoremap [c' | exe 'nnoremap ]c' | endif 878 | " Quickfix 879 | autocmd MyAutoCmd FileType qf call AdjustWindowHeight(3, 50) 880 | function! AdjustWindowHeight(minheight, maxheight) 881 | exe max([min([line("$"), a:maxheight]), a:minheight]) . "wincmd _" 882 | endfunction 883 | 884 | "=============================================================================== 885 | " NERDTree 886 | "=============================================================================== 887 | let NERDTreeShowBookmarks=1 888 | let NERDTreeShowHidden=1 889 | let NERDTreeIgnore=['\~$', '\.swp$', '\.git', '\.hg', '\.svn', '\.bzr', '\.pyc', '__pycache__', '\.cache', '\.idea'] 890 | autocmd MyAutoCmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif 891 | 892 | "=============================================================================== 893 | " NERDCommenter 894 | "=============================================================================== 895 | " Add spaces after comment delimiters by default 896 | let g:NERDSpaceDelims = 1 897 | 898 | " Use compact syntax for prettified multi-line comments 899 | let g:NERDCompactSexyComs = 1 900 | 901 | " Align line-wise comment delimiters flush left instead of following code indentation 902 | let g:NERDDefaultAlign = 'left' 903 | 904 | " Allow commenting and inverting empty lines (useful when commenting a region) 905 | let g:NERDCommentEmptyLines = 1 906 | 907 | " Enable trimming of trailing whitespace when uncommenting 908 | let g:NERDTrimTrailingWhitespace = 1 909 | 910 | "=============================================================================== 911 | " ALE 912 | "=============================================================================== 913 | let g:ale_linters = { 914 | \ 'javascript': ['eslint'], 915 | \ 'python': ['flake8'], 916 | \} 917 | let g:ale_python_flake8_executable = 'python' 918 | let g:ale_python_flake8_options = '-m flake8 --ignore=E501' 919 | 920 | "=============================================================================== 921 | " Fugitive 922 | "=============================================================================== 923 | nnoremap gb :Gblame 924 | nnoremap gc :Gcommit 925 | nnoremap gd :Gdiff 926 | nnoremap gp :Git push 927 | nnoremap gr :Gremove 928 | nnoremap gs :Gstatus 929 | nnoremap gw :Gwrite 930 | " Quickly stage, commit, and push the current file. Useful for editing .vimrc 931 | nnoremap gg :Gwrite:Gcommit -m 'update':Git push 932 | 933 | "=============================================================================== 934 | " QuickRun 935 | "=============================================================================== 936 | 937 | " let g:quickrun_config = {} 938 | " let g:quickrun_config['*'] = { 939 | " \ 'runner/vimproc/updatetime' : 100, 940 | " \ 'outputter' : 'buffer', 941 | " \ 'runner' : 'vimproc', 942 | " \ 'running_mark' : 'バン(∩`・ω・)バンバンバンバン゙ン', 943 | " \ 'into' : 1, 944 | " \ 'runmode' : 'async:remote:vimproc' 945 | " \} 946 | " QuickRun triggers markdown preview 947 | " let g:quickrun_config.markdown = { 948 | " \ 'runner': 'vimscript', 949 | " \ 'command': ':InstantMarkdownPreview', 950 | " \ 'exec': '%C', 951 | " \ 'outputter': 'null' 952 | " \} 953 | 954 | "=============================================================================== 955 | " Markdown 956 | "=============================================================================== 957 | " These are ammended on top of the existing markdown settings from 958 | " tpope/vim-markdown 959 | autocmd MyAutoCmd FileType markdown call s:markdown_settings() 960 | function! s:markdown_settings() 961 | " Auto insert bullet when constructing lists 962 | setlocal comments=b:- 963 | setlocal formatoptions+=ro 964 | setlocal wrap 965 | setlocal tw=0 966 | inoremap 967 | " Since completion is off, reassign tab and shift-tab to indent and unindent 968 | " in insert mode 969 | inoremap 970 | " Make the delete key in insert mode delete the bullet point in 1 keystroke 971 | inoremap =markdown_delete_key() 972 | endfunction 973 | 974 | function! s:markdown_delete_key() 975 | if getline(".") =~ '^\s*- $' 976 | return "\\" 977 | else 978 | return "\" 979 | endif 980 | endfunction 981 | 982 | "=============================================================================== 983 | " Go 984 | "=============================================================================== 985 | autocmd MyAutoCmd FileType go 986 | \ setlocal nolist | 987 | \ setlocal softtabstop=8 | 988 | \ setlocal shiftwidth=8 | 989 | \ setlocal noexpandtab 990 | 991 | 992 | "=============================================================================== 993 | " Python 994 | "=============================================================================== 995 | autocmd MyAutoCmd FileType python 996 | \ setlocal softtabstop=4 | 997 | \ setlocal shiftwidth=4 | 998 | \ setlocal tabstop=4 | 999 | \ setlocal textwidth=140 1000 | 1001 | "=============================================================================== 1002 | " Expand Region 1003 | "=============================================================================== 1004 | let g:expand_region_use_select_mode = 0 1005 | 1006 | " Extend the global dictionary 1007 | call expand_region#custom_text_objects({ 1008 | \ 'a]' :1, 1009 | \ 'ab' :1, 1010 | \ 'aB' :1, 1011 | \ 'ii' :0, 1012 | \ 'ai' :0, 1013 | \ }) 1014 | 1015 | " Customize it further for ruby 1016 | call expand_region#custom_text_objects('ruby', { 1017 | \ 'im' :0, 1018 | \ 'am' :0, 1019 | \ }) 1020 | 1021 | " Customize it further for html 1022 | call expand_region#custom_text_objects('html', { 1023 | \ 'it' :1, 1024 | \ }) 1025 | 1026 | "=============================================================================== 1027 | " YCM 1028 | "=============================================================================== 1029 | " let g:ycm_confirm_extra_conf = 0 1030 | " let g:EclimCompletionMethod = 'omnifunc' 1031 | " let g:ycm_filetype_blacklist = { 1032 | " \ 'notes' : 1, 1033 | " \ 'markdown' : 1, 1034 | " \ 'text' : 1, 1035 | " \} 1036 | 1037 | "=============================================================================== 1038 | " vim-autoformat 1039 | "=============================================================================== 1040 | let g:formatters_python = ['yapf'] 1041 | let g:formatdef_yapf = '"yapf --style=''{based_on_style:pep8,indent_width:".&shiftwidth."}'' -l ".a:firstline."-".a:lastline' 1042 | 1043 | "=============================================================================== 1044 | " Neoformat 1045 | "============================================================================== 1046 | let g:neoformat_enabled_python = ['autopep8', 'yapf'] 1047 | let g:neoformat_python_autopep8 = { 1048 | \ 'exe': 'autopep8', 1049 | \ 'args': ['-', '--indent-size 4', '--max-line-length 140'], 1050 | \ 'stdin': 1, 1051 | \ } 1052 | 1053 | "=============================================================================== 1054 | " EasyMotion 1055 | "=============================================================================== 1056 | " let g:EasyMotion_do_mapping = 0 " Disable default mappings 1057 | " nmap s (easymotion-overwin-f2) 1058 | " " Turn on case insensitive feature 1059 | " let g:EasyMotion_smartcase = 1 1060 | 1061 | "=============================================================================== 1062 | " AutoPair 1063 | "=============================================================================== 1064 | let g:AutoPairsMapCh = 0 1065 | 1066 | "=============================================================================== 1067 | " Vimwiki 1068 | "=============================================================================== 1069 | let g:vimwiki_list = [{'path': '~/gdrive/Notes/vimwiki/', 'path_html': '~/gdrive/Notes/vimwiki_html/'}] 1070 | let g:vimwiki_table_mappings = 0 1071 | nmap wk VimwikiDiaryPrevDay 1072 | nmap wj VimwikiDiaryNextDay 1073 | 1074 | 1075 | "=============================================================================== 1076 | " Gist 1077 | "=============================================================================== 1078 | let g:gist_post_private = 1 1079 | 1080 | "=============================================================================== 1081 | " FZF 1082 | "=============================================================================== 1083 | " let $FZF_DEFAULT_COMMAND = 'ag -g ""' 1084 | let $FZF_DEFAULT_COMMAND = 'ag --hidden --ignore .git -g ""' 1085 | " let $FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND" 1086 | 1087 | "=============================================================================== 1088 | " My functions 1089 | "=============================================================================== 1090 | 1091 | command! -nargs=+ Silent 1092 | \ | execute ':silent !'. 1093 | \ | execute ':redraw!' 1094 | 1095 | " Format json using python. This needs some better error checking 1096 | command! -nargs=0 -range=% Format 1097 | \ ,!python -c "import sys, json, collections; print json.dumps(json.load(sys.stdin, object_pairs_hook=collections.OrderedDict), sort_keys=False, indent=2)" 1098 | 1099 | " Copy the absolute path of current file to clipboard 1100 | command! CopyPath :let @*=expand("%:p") 1101 | 1102 | " Execute 'cmd' while redirecting output. 1103 | " Delete all lines that do not match regex 'filter' (if not empty). 1104 | " Delete any blank lines. 1105 | " Delete ':' from start of each line. 1106 | " Display result in a scratch buffer. 1107 | function! s:Filter_lines(cmd, filter) 1108 | let save_more = &more 1109 | set nomore 1110 | redir => lines 1111 | silent execute a:cmd 1112 | redir END 1113 | let &more = save_more 1114 | new 1115 | setlocal buftype=nofile bufhidden=hide noswapfile 1116 | put =lines 1117 | g/^\s*$/d 1118 | %s/^\s*\d\+:\s*//e 1119 | if !empty(a:filter) 1120 | execute 'v/' . a:filter . '/d' 1121 | endif 1122 | 0 1123 | endfunction 1124 | command! -nargs=? Scriptnames call s:Filter_lines('scriptnames', ) 1125 | -------------------------------------------------------------------------------- /.vimrc_basic: -------------------------------------------------------------------------------- 1 | set nocompatible 2 | syntax on 3 | filetype plugin indent on 4 | set autoindent 5 | " set lazyredraw 6 | " set fcs=vert:│ 7 | " set mouse=a 8 | " set number 9 | " set t_Co=256 10 | " set background=dark 11 | " set history=10000 12 | " set list 13 | " set listchars=tab:▸\ ,extends:❯,precedes:❮,nbsp:␣ 14 | " set showbreak=↪ 15 | " set scrolloff=10 16 | " set numberwidth=1 17 | " set completeopt=longest,menuone 18 | " set wildmode=list:longest,full 19 | " set hidden 20 | " set backspace=eol,start,indent 21 | " set ignorecase 22 | " set smartcase 23 | " set incsearch 24 | " set magic 25 | " set noshowmatch 26 | " set vb 27 | " set t_vb= 28 | " set laststatus=2 29 | " set encoding=utf-8 30 | " set timeout timeoutlen=1000 ttimeoutlen=0 31 | " set nobackup 32 | " set nowritebackup 33 | " set noswapfile 34 | " set expandtab 35 | " set shiftwidth=2 36 | " set tabstop=8 37 | " set softtabstop=2 38 | " set smarttab 39 | " set linebreak 40 | " set textwidth=80 41 | " set autoindent 42 | " set nowrap 43 | " set whichwrap+=h,l,<,>,[,] 44 | " set virtualedit=onemore 45 | " set virtualedit=all 46 | " if has ('unnamedplus') 47 | " set clipboard=unnamedplus 48 | " else 49 | " set clipboard=unnamed 50 | " endif 51 | " set updatetime=1000 52 | " set iskeyword+=<,>,[,],:,-,`,! 53 | " if exists('$TMUX') 54 | " let &t_SI = "\Ptmux;\\]50;CursorShape=1\x7\\\" 55 | " let &t_EI = "\Ptmux;\\]50;CursorShape=0\x7\\\" 56 | " else 57 | " let &t_SI = "\]50;CursorShape=1\x7" 58 | " let &t_EI = "\]50;CursorShape=0\x7" 59 | " endif 60 | let g:multi_cursor_debug_latency=1 61 | source ~/code/vim/vim-multiple-cursors/plugin/multiple_cursors.vim 62 | source ~/code/vim/vim-multiple-cursors/autoload/multiple_cursors.vim 63 | -------------------------------------------------------------------------------- /.zprofile: -------------------------------------------------------------------------------- 1 | # http://unix.stackexchange.com/questions/9883/how-can-i-run-a-script-immediately-after-connecting-via-ssh 2 | if [ -n "$LC_tmux_session" ]; then 3 | session=$LC_tmux_session 4 | unset LC_tmux_session 5 | if tmux has -t $session; then 6 | exec tmux attach -t $session 7 | else 8 | exec tmux new-session -s $session 9 | fi 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /.zsh/.vimpagerrc: -------------------------------------------------------------------------------- 1 | map j 2 | map k 3 | -------------------------------------------------------------------------------- /.zshenv: -------------------------------------------------------------------------------- 1 | skip_global_compinit=1 2 | -------------------------------------------------------------------------------- /.zshrc: -------------------------------------------------------------------------------- 1 | # Turn on to profile zsh 2 | # zmodload zsh/zprof 3 | 4 | # Enable glob with no matches 5 | # http://unix.stackexchange.com/questions/26805/how-to-silently-get-an-empty-string-from-a-glob-pattern-with-no-matches 6 | setopt null_glob 7 | 8 | # Source local zsh config first 9 | for config (~/.zsh/*.zsh) source $config 10 | 11 | ## Command history configuration 12 | if [ -z "$HISTFILE" ]; then 13 | HISTFILE=$HOME/.zsh_history 14 | fi 15 | 16 | HISTSIZE=10000 17 | HISTSTAMPS="yyyy-mm-dd" 18 | SAVEHIST=10000 19 | 20 | alias history='fc -il 1' 21 | 22 | setopt append_history 23 | setopt extended_history 24 | setopt hist_expire_dups_first 25 | setopt hist_ignore_dups # ignore duplication command history list 26 | setopt hist_ignore_space 27 | setopt hist_verify 28 | setopt inc_append_history 29 | setopt share_history # share command history data 30 | 31 | ################################################################################ 32 | # General 33 | ################################################################################ 34 | 35 | # Disable sound 36 | setopt no_beep 37 | 38 | # Disable auto correct 39 | unsetopt correct_all 40 | 41 | # Don't save duplicated entries into history 42 | setopt hist_ignore_all_dups 43 | 44 | # Auto cd to directory 45 | setopt auto_cd 46 | 47 | # Export TERM correctly for tmux 48 | [[ $TERM == "screen" ]] && export TERM=screen-256color 49 | [[ $TERM == "xterm" ]] && export TERM=xterm-256color 50 | 51 | # Turn off terminal driver flow control (CTRL+S/CTRL+Q) 52 | setopt noflowcontrol 53 | stty -ixon -ixoff 54 | 55 | # Mass rename 56 | # autoload zmv 57 | 58 | # Load the pure theme using prompt 59 | autoload -U promptinit && promptinit 60 | prompt pure 61 | 62 | ################################################################################ 63 | # Vars 64 | ################################################################################ 65 | 66 | export GOPATH="${HOME}/.go" 67 | # DON'T USE brew --prefix golang it's really slow 68 | export GOROOT="/usr/local/opt/go/libexec" 69 | path=( 70 | ~/.dotfiles/bin 71 | ~/.rbenv/bin 72 | ~/.cargo/bin 73 | ~/.npm-global/bin 74 | ./node_modules/.bin 75 | ${GOPATH}/bin 76 | ${GOROOT}/bin 77 | /usr/local/opt/python/libexec/bin 78 | /usr/local/bin 79 | /Applications/Postgres.app/Contents/Versions/latest/bin 80 | $path 81 | ) 82 | export EDITOR=$(which vim) 83 | export VISUAL=$(which vim) 84 | export KEYTIMEOUT=1 85 | export WORDCHARS='*?_-.[]~=&;!#$%^(){}<>' 86 | 87 | # Locale settings 88 | export LANG="en_US.UTF-8" 89 | export LC_COLLATE="en_US.UTF-8" 90 | export LC_CTYPE="en_US.UTF-8" 91 | export LC_MESSAGES="en_US.UTF-8" 92 | export LC_MONETARY="en_US.UTF-8" 93 | export LC_NUMERIC="en_US.UTF-8" 94 | export LC_TIME="en_US.UTF-8" 95 | export LC_ALL="en_US.UTF-8" 96 | 97 | ################################################################################ 98 | # Aliases 99 | ################################################################################ 100 | 101 | # Git 102 | alias ga='git add' 103 | alias gca='git commit -v -a' 104 | alias gd='git difftool' 105 | function gb() { git checkout -b tma/$1 } 106 | alias gbs='git branches' 107 | alias gbed='git branch --edit-description' 108 | alias gmt='git mergetool' 109 | alias gi='git update-index --assume-unchanged' 110 | alias gui='git update-index --no-assume-unchanged' 111 | alias gsi='git ls-files -v | grep "^[a-z]"' 112 | alias gg="git log --graph --pretty=oneline --format='format:%C(yellow)%h%C(reset) %C(blue)\"%an\" <%ae>%C(reset) %C(magenta)%ar%C(reset)%C(auto)%d%C(reset)%n%s' --date-order" 113 | alias gs='git --no-pager show --stat --oneline' 114 | alias gam='git commit -a --amend --no-edit' 115 | alias grm='git rebase master' 116 | alias gp='git push -u origin $(git rev-parse --abbrev-ref HEAD)' 117 | alias gco='git checkout' 118 | alias gRm='gco master && gup && gco - && git reset --hard origin/master' 119 | alias gpp="gca -m 'Update' && gp" 120 | alias gpr="git pull-request --no-edit -o" 121 | alias gsp="git stash pop" 122 | alias gst='git status' 123 | alias gup='git pull --rebase' 124 | alias git=hub 125 | 126 | # ssh 127 | alias ssh='TERM=xterm-256color ssh' 128 | 129 | # Docker 130 | alias dcp='docker-compose' 131 | dr() { dcp restart $1 && dcp logs -f --tail=100 $1 } 132 | 133 | # Terraform 134 | alias tp='terraform plan' 135 | alias ta='terraform apply' 136 | alias ti='terraform init' 137 | alias tf='terraform' 138 | 139 | # Random 140 | alias ls='ls -G' 141 | alias ll='ls -l' 142 | alias q='tmux kill-pane' 143 | mkdircd () { mkdir -p "$@" && cd "$@"; } 144 | 145 | alias pgcli='PAGER=cat pgcli' 146 | 147 | ################################################################################ 148 | # Ruby 149 | ################################################################################ 150 | # Initialize rbenv. Don't rehash, it makes starting up REALLY slow 151 | if which rbenv > /dev/null; then eval "$(rbenv init - --no-rehash)"; fi 152 | 153 | ################################################################################ 154 | # fasd 155 | ################################################################################ 156 | # eval "$(fasd --init posix-alias zsh-hook)" 157 | fasd_cache="$HOME/.fasd-init-bash" 158 | if [ "$(command -v fasd)" -nt "$fasd_cache" -o ! -s "$fasd_cache" ]; then 159 | fasd --init posix-alias zsh-{hook,ccomp,ccomp-install,wcomp,wcomp-install} >| "$fasd_cache" 160 | fi 161 | source "$fasd_cache" 162 | unset fasd_cache 163 | 164 | ################################################################################ 165 | # ZLE Widgets 166 | ################################################################################ 167 | # Auto ls after each directory change 168 | function chpwd() { 169 | emulate -L zsh 170 | ll 171 | } 172 | 173 | # Copy selected region to CLIPBOARD 174 | function x-copy-region-as-kill() { 175 | zle copy-region-as-kill 176 | # TODO(terryma): Refactor 177 | if [[ "$(uname)" == "Linux" ]]; then 178 | print -rn $CUTBUFFER | xclip -i -selection clipboard 179 | elif [[ "$(uname)" == "Darwin" ]] ; then 180 | print -rn $CUTBUFFER | pbcopy 181 | fi 182 | } 183 | zle -N x-copy-region-as-kill 184 | 185 | # Kill region goes to CLIPBOARD 186 | function x-kill-region() { 187 | zle kill-region 188 | if [[ "$(uname)" == "Linux" ]]; then 189 | print -rn $CUTBUFFER | xclip -i -selection clipboard 190 | elif [[ "$(uname)" == "Darwin" ]] ; then 191 | print -rn $CUTBUFFER | pbcopy 192 | fi 193 | } 194 | zle -N x-kill-region 195 | 196 | # Paste x CLIPBOARD 197 | function x-yank() { 198 | if [[ "$(uname)" == "Linux" ]]; then 199 | CUTBUFFER=$(xclip -o -selection clipboard) 200 | elif [[ "$(uname)" == "Darwin" ]] ; then 201 | CUTBUFFER=$(pbpaste) 202 | fi 203 | zle yank 204 | } 205 | zle -N x-yank 206 | 207 | function x-vi-yank-whole-line() { 208 | zle vi-yank-whole-line 209 | if [[ "$(uname)" == "Linux" ]]; then 210 | print -rn $CUTBUFFER | xclip -i -selection clipboard 211 | elif [[ "$(uname)" == "Darwin" ]] ; then 212 | print -rn $CUTBUFFER | pbcopy 213 | fi 214 | } 215 | zle -N x-vi-yank-whole-line 216 | 217 | ################################################################################ 218 | # Key bindings 219 | ################################################################################ 220 | case "$TERM" in 221 | *xterm*|screen-256color) 222 | 223 | # Backspace: Delete previous char 224 | bindkey '^?' backward-delete-char 225 | # Ctrl-q: Quoted insert (Default is Ctrl-v) 226 | bindkey '^q' quoted-insert 227 | # Ctrl-w: Delete previous word 228 | bindkey '^w' backward-kill-word 229 | # Ctrl-e: Move to the end of line 230 | bindkey '^e' end-of-line 231 | # Ctrl-r: FZF history search 232 | # Ctrl-t: FZF file search 233 | # Ctrl-y: TODO 234 | # bindkey '^y' ff 235 | # Ctrl-u: Deletes everything before cursor (u is on left) 236 | bindkey '^u' backward-kill-line 237 | # Ctrl-i: Same as tab 238 | # Ctrl-o: Deletes everything after cursor (o is on right) (Commonly Ctrl-k) 239 | bindkey '^o' kill-line 240 | # Ctrl-p: Recent directory with fzf 241 | bindkey '^p' fj 242 | # Ctrl-a: Go to the beginning of line 243 | bindkey '^a' beginning-of-line 244 | # Ctrl-s: TODO 245 | # Ctrl-d: Delete next word 246 | bindkey '^d' kill-word 247 | # Ctrl-f: Move one character to the left. Good way to remember this is that 248 | # both f and h use the left finger. 1 moves character left, and the other 249 | # word left 250 | bindkey '^f' backward-char 251 | # Ctrl-g: Move one character to the right 252 | bindkey '^g' forward-char 253 | # Ctrl-h: Move one word to the left 254 | # bindkey '^h' vi-backward-word 255 | bindkey '^h' backward-word 256 | # Ctrl-j: Go down in history 257 | bindkey '^j' down-line-or-history 258 | # Ctrl-k: Go up in history 259 | bindkey '^k' up-line-or-history 260 | # Ctrl-l: Move one word to the right 261 | # bindkey '^l' vi-forward-word 262 | bindkey '^l' forward-word 263 | # Ctrl-[: Same as Escape 264 | # Ctrl-]: TODO 265 | # bindkey '^]' 266 | # Ctrl-\: FZF cd 267 | bindkey '^\' fzf-cd-widget 268 | # Ctrl-z: Tmux command key 269 | # Ctrl-x: Delete character under cursor 270 | bindkey '^x' delete-char 271 | # Ctrl-c: Terminates 272 | # Ctrl-v: Insert the contents of the clipboard at the cursor 273 | bindkey '^v' x-yank 274 | # Ctrl-b: Edit command line using vi. 'b' stands for better :) 275 | bindkey '^b' edit-command-line 276 | # Ctrl-m: Same as Enter 277 | # Ctrl-n: Clear the entire screen (cleaN) 278 | bindkey '^n' clear-screen 279 | # Ctrl-/: Undo 280 | # Ctrl-Space: Quickly yank the entire line into the x CLIPBOARD 281 | bindkey '^@' x-vi-yank-whole-line 282 | ;; 283 | esac 284 | 285 | 286 | # FZF 287 | # export FZF_DEFAULT_COMMAND='ag -u -g ""' 288 | export FZF_DEFAULT_COMMAND='ag -g ""' 289 | export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND" 290 | source ~/.fzf.zsh 291 | 292 | # More FZF 293 | 294 | # c - browse chrome history 295 | c() { 296 | local cols sep 297 | cols=$(( COLUMNS / 3 )) 298 | sep='{{::}}' 299 | 300 | # Copy History DB to circumvent the lock 301 | # - See http://stackoverflow.com/questions/8936878 for the file path 302 | cp -f ~/Library/Application\ Support/Google/Chrome/Default/History /tmp/h 303 | 304 | sqlite3 -separator $sep /tmp/h \ 305 | "select substr(title, 1, $cols), url 306 | from urls order by last_visit_time desc" | 307 | awk -F $sep '{printf "%-'$cols's \x1b[36m%s\n", $1, $2}' | 308 | fzf --ansi --multi | sed 's#.*\(https*://\)#\1#' | xargs open 309 | } 310 | 311 | # fj - changing directory with fasd 312 | function fj() { 313 | local dir 314 | dir=$(fasd -Rdl | fzf --no-sort +m) && cd "$dir" 315 | prompt_pure_preprompt_render 316 | zle reset-prompt 317 | } 318 | zle -N fj 319 | 320 | # v - recent files with fasd 321 | function v() { 322 | local file 323 | file="$(fasd -Rfl "$1" | fzf -1 -0 --no-sort +m)" 324 | # prompt_pure_preprompt_render 325 | # zle reset-prompt 326 | vim "${file}" 327 | } 328 | 329 | # fs [FUZZY PATTERN] - Select selected tmux session 330 | # - Bypass fuzzy finder if there's only one match (--select-1) 331 | # - Exit if there's no match (--exit-0) 332 | fs() { 333 | local session 334 | session=$(tmux list-sessions -F "#{session_name}" | \ 335 | fzf --query="$1" --select-1 --exit-0) && 336 | tmux switch-client -t "$session" 337 | } 338 | zle -N fs 339 | 340 | perf() { 341 | curl -so /dev/null -w "\ 342 | namelookup: %{time_namelookup}s\n\ 343 | connect: %{time_connect}s\n\ 344 | appconnect: %{time_appconnect}s\n\ 345 | pretransfer: %{time_pretransfer}s\n\ 346 | redirect: %{time_redirect}s\n\ 347 | starttransfer: %{time_starttransfer}s\n\ 348 | -------------------------\n\ 349 | total: %{time_total}s\n" "$@" 350 | } 351 | 352 | eval "$(pyenv init -)" 353 | 354 | # Lazy load nvm, to prevent it slowly down terminal startup time 355 | export NVM_DIR="$HOME/.nvm" 356 | function nvm() { 357 | unset -f nvm 358 | . $NVM_DIR/nvm.sh 359 | nvm $@ 360 | } 361 | 362 | # Completions 363 | 364 | # homebrew 365 | if type brew &>/dev/null; then 366 | FPATH=$(brew --prefix)/share/zsh/site-functions:$FPATH 367 | fi 368 | 369 | fpath=(~/.zsh/completions $fpath) 370 | 371 | # The following lines were added by compinstall 372 | zstyle :compinstall filename '/Users/tma/.zshrc' 373 | 374 | autoload -Uz compinit 375 | if [ $(date +'%j') != $(stat -f '%Sm' -t '%j' ~/.zcompdump) ]; then 376 | compinit 377 | compdump 378 | else 379 | compinit -C 380 | fi 381 | 382 | autoload -z edit-command-line 383 | zle -N edit-command-line 384 | 385 | # helpful zsh completion for `kubectl` and `helm` 386 | # if [ $commands[kubectl] ]; then source <(kubectl completion zsh); fi 387 | # if [ $commands[helm] ]; then source <(helm completion zsh); fi 388 | 389 | # zprof 390 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | Keeps all my dotfiles 2 | 3 | -------------------------------------------------------------------------------- /bin/flavor: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | # Convert a Markdown README to HTML with Github Flavored Markdown 3 | # Github and Pygments styles are included in the output 4 | # 5 | # Requirements: json gem (`gem install json`) 6 | # 7 | # Input: STDIN or filename 8 | # Output: STDOUT 9 | # Arguments: "-c" to copy to clipboard (or "| pbcopy"), or "> filename.html" to output to a file 10 | # cat README.md | flavor > README.html 11 | 12 | require 'rubygems' 13 | require 'json' 14 | require 'net/https' 15 | 16 | clipboard_output = false 17 | if ARGV[0] == "-c" 18 | clipboard_output = true 19 | ARGV.shift 20 | end 21 | 22 | input = '' 23 | if ARGV.length > 0 24 | if File.exists?(File.expand_path(ARGV[0])) 25 | input = File.new(File.expand_path(ARGV[0])).read 26 | else 27 | puts "File not found: #{ARGV[0]}" 28 | end 29 | else 30 | if STDIN.stat.size > 0 31 | input = STDIN.read 32 | else 33 | puts "No input specified" 34 | end 35 | end 36 | 37 | exit if input == '' 38 | 39 | def e_sh(str) 40 | str.to_s.gsub(/(?=[^a-zA-Z0-9_.\/\-\x7F-\xFF\n])/, '\\').gsub(/\n/, "'\n'").sub(/^$/, "''") 41 | end 42 | 43 | output = {} 44 | output['text'] = input 45 | output['mode'] = 'gfm' 46 | 47 | url = URI.parse("https://api.github.com/markdown") 48 | request = Net::HTTP::Post.new("#{url.path}") 49 | request.body = output.to_json 50 | http = Net::HTTP.new(url.host, url.port) 51 | http.use_ssl = true 52 | response = http.start {|http| http.request(request) } 53 | 54 | if response.code == "200" 55 | html=< 57 | 58 | 59 | 60 | 61 | 64 | 65 | 66 |
67 | #{response.body} 68 |
69 | 70 | 71 | ENDOUTPUT 72 | if clipboard_output 73 | %x{echo #{html}|pbcopy} 74 | puts "Result in clipboard" 75 | else 76 | puts html 77 | end 78 | else 79 | puts "Error #{response.code}" 80 | end 81 | -------------------------------------------------------------------------------- /bin/git-branches: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | import subprocess 4 | import textwrap 5 | 6 | output = subprocess.check_output(['git', 'branch']).strip() 7 | 8 | COLORS = { 9 | 'BLUE' : '\033[94m', 10 | 'GREEN' : '\033[92m', 11 | 'YELLOW': '\033[93m' 12 | } 13 | 14 | def color(text, color): 15 | color_code = COLORS.get(color, COLORS['BLUE']) 16 | return color_code + text + '\033[0m' 17 | 18 | for line in output.split('\n'): 19 | if line: 20 | parts = line.split() 21 | branch = parts[-1] 22 | is_current = len(parts) > 1 23 | try: 24 | description = subprocess.check_output(['git', 'config', 25 | 'branch.{0}.description'.format(branch)]).strip() 26 | except Exception: 27 | description = "" 28 | 29 | description = textwrap.fill(description, width=75, initial_indent=' ', 30 | subsequent_indent=' ') 31 | 32 | if is_current: 33 | print "* " + color(branch, 'GREEN') 34 | else: 35 | print " " + color(branch, 'BLUE') 36 | print description 37 | -------------------------------------------------------------------------------- /bin/karabiner-element-switch-profile.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | from os import path 4 | import sys 5 | import json 6 | 7 | targetfile = path.expanduser('~/.config/karabiner/karabiner.json') 8 | 9 | with open(targetfile) as settings_file: 10 | settings = json.load(settings_file) 11 | 12 | profile_name = sys.argv[1] 13 | for profile in settings['profiles']: 14 | profile['selected'] = False 15 | if profile['name'] == profile_name: 16 | profile['selected'] = True 17 | 18 | with open(targetfile, 'w') as settings_file: 19 | json.dump(settings, settings_file, indent=4, separators=(',', ': ')) 20 | 21 | print 'switched karabiner-element profile to {}'.format(profile_name) 22 | -------------------------------------------------------------------------------- /bin/vimdiff-git: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | vimdiff "$5" "$2" > /dev/tty 3 | -------------------------------------------------------------------------------- /git/templates/hooks/pre-commit: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Patterns to match a repo's "remote.origin.url" 4 | git_remote="git.amazon.com" 5 | 6 | current_remote_url="$(git config --get --local remote.origin.url)" 7 | 8 | if [[ "$current_remote_url" =~ $git_remote ]]; then 9 | git config --local user.name "Terry Ma" 10 | git config --local user.email "henchman@amazon.com" 11 | fi 12 | printf "Committing as %s\n" "$(git config --get user.email)" 13 | 14 | exit 0 15 | -------------------------------------------------------------------------------- /install.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | dotfiles=$HOME/.dotfiles 3 | zshrc=$dotfiles/.zshrc 4 | vimrc=$dotfiles/.vimrc 5 | gvimrc=$dotfiles/.gvimrc 6 | vimfiles=$dotfiles/.vim 7 | tmux_conf=$dotfiles/.tmux.conf 8 | tmux_powerline_rc=$dotfiles/.tmux-powerlinerc 9 | hammerspoon=$dotfiles/.hammerspoon 10 | gitconfig=$dotfiles/.gitconfig 11 | 12 | [[ ! -e $HOME/.zshrc ]] && ln -s $zshrc $HOME/.zshrc \ 13 | || echo ".zshrc already exists..." 14 | 15 | [[ ! -e $HOME/.vimrc ]] && ln -s $vimrc $HOME/.vimrc \ 16 | || echo ".vimrc already exists..." 17 | 18 | [[ ! -e $HOME/.gvimrc ]] && ln -s $gvimrc $HOME/.gvimrc \ 19 | || echo ".gvimrc already exists..." 20 | 21 | [[ ! -e $HOME/.vim ]] && ln -s $vimfiles $HOME/.vim \ 22 | || echo ".vim already exists..." 23 | 24 | [[ ! -e $HOME/.tmux.conf ]] && ln -s $tmux_conf $HOME/.tmux.conf \ 25 | || echo ".tmux.conf already exists..." 26 | 27 | [[ ! -e $HOME/.tmux-powerlinerc ]] && ln -s $tmux_powerline_rc $HOME/.tmux-powerlinerc \ 28 | || echo ".tmux-powerlinerc already exists..." 29 | 30 | [[ ! -e $HOME/.hammerspoon ]] && ln -s $hammerspoon $HOME/.hammerspoon \ 31 | || echo ".hammerspoon already exists..." 32 | 33 | [[ ! -e $HOME/.gitconfig ]] && ln -s $gitconfig $HOME/.gitconfig \ 34 | || echo ".gitconfig already exists..." 35 | 36 | echo "Done" 37 | 38 | -------------------------------------------------------------------------------- /iterm/com.googlecode.iterm2.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AllowClipboardAccess 6 | 7 | AppleAntiAliasingThreshold 8 | 1 9 | AppleScrollAnimationEnabled 10 | 0 11 | AppleSmoothFixedFontsSizeThreshold 12 | 1 13 | AppleWindowTabbingMode 14 | manual 15 | AutoHideTmuxClientSession 16 | 17 | Custom Color Presets 18 | 19 | Afterglow 20 | 21 | Ansi 0 Color 22 | 23 | Blue Component 24 | 0.08235294371843338 25 | Green Component 26 | 0.08235294371843338 27 | Red Component 28 | 0.08235294371843338 29 | 30 | Ansi 1 Color 31 | 32 | Blue Component 33 | 0.2588235438 34 | Green Component 35 | 0.25490197539999998 36 | Red Component 37 | 0.67450982329999998 38 | 39 | Ansi 10 Color 40 | 41 | Blue Component 42 | 0.31444666754949363 43 | Green Component 44 | 0.55576569570135748 45 | Red Component 46 | 0.49473804391474724 47 | 48 | Ansi 11 Color 49 | 50 | Blue Component 51 | 0.4039215686 52 | Green Component 53 | 0.70980392160000005 54 | Red Component 55 | 0.8980392157 56 | 57 | Ansi 12 Color 58 | 59 | Blue Component 60 | 0.73333333333333328 61 | Green Component 62 | 0.59999999999999998 63 | Red Component 64 | 0.42352941176470588 65 | 66 | Ansi 13 Color 67 | 68 | Blue Component 69 | 0.5234466981 70 | Green Component 71 | 0.30697798580000002 72 | Red Component 73 | 0.62333851809999996 74 | 75 | Ansi 14 Color 76 | 77 | Blue Component 78 | 0.8118151991 79 | Green Component 80 | 0.83853216239999995 81 | Red Component 82 | 0.49031879989999999 83 | 84 | Ansi 15 Color 85 | 86 | Blue Component 87 | 0.96078431606292725 88 | Green Component 89 | 0.96078431606292725 90 | Red Component 91 | 0.96078431606292725 92 | 93 | Ansi 2 Color 94 | 95 | Blue Component 96 | 0.3144466675 97 | Green Component 98 | 0.55576569570000001 99 | Red Component 100 | 0.49473804389999998 101 | 102 | Ansi 3 Color 103 | 104 | Blue Component 105 | 0.40392156862745099 106 | Green Component 107 | 0.70980392156862748 108 | Red Component 109 | 0.89803921568627454 110 | 111 | Ansi 4 Color 112 | 113 | Blue Component 114 | 0.73333333329999995 115 | Green Component 116 | 0.59999999999999998 117 | Red Component 118 | 0.42352941179999998 119 | 120 | Ansi 5 Color 121 | 122 | Blue Component 123 | 0.52344669809931299 124 | Green Component 125 | 0.30697798579568808 126 | Red Component 127 | 0.62333851809954743 128 | 129 | Ansi 6 Color 130 | 131 | Blue Component 132 | 0.8118151991 133 | Green Component 134 | 0.83853216239999995 135 | Red Component 136 | 0.49031879989999999 137 | 138 | Ansi 7 Color 139 | 140 | Blue Component 141 | 0.81568628549575806 142 | Green Component 143 | 0.81568628549575806 144 | Red Component 145 | 0.81568628549575806 146 | 147 | Ansi 8 Color 148 | 149 | Blue Component 150 | 0.31372550129890442 151 | Green Component 152 | 0.31372550129890442 153 | Red Component 154 | 0.31372550129890442 155 | 156 | Ansi 9 Color 157 | 158 | Blue Component 159 | 0.2588235438 160 | Green Component 161 | 0.25490197539999998 162 | Red Component 163 | 0.67450982329999998 164 | 165 | Background Color 166 | 167 | Blue Component 168 | 0.1283406391402715 169 | Green Component 170 | 0.1283406391402715 171 | Red Component 172 | 0.1283406391402715 173 | 174 | Bold Color 175 | 176 | Blue Component 177 | 0.81568628549575806 178 | Green Component 179 | 0.81568628549575806 180 | Red Component 181 | 0.81568628549575806 182 | 183 | Cursor Color 184 | 185 | Blue Component 186 | 0.81568628549575806 187 | Green Component 188 | 0.81568628549575806 189 | Red Component 190 | 0.81568628549575806 191 | 192 | Cursor Text Color 193 | 194 | Blue Component 195 | 0.08235294371843338 196 | Green Component 197 | 0.08235294371843338 198 | Red Component 199 | 0.08235294371843338 200 | 201 | Foreground Color 202 | 203 | Blue Component 204 | 0.81568628549575806 205 | Green Component 206 | 0.81568628549575806 207 | Red Component 208 | 0.81568628549575806 209 | 210 | Selected Text Color 211 | 212 | Blue Component 213 | 0.81568628549575806 214 | Green Component 215 | 0.81568628549575806 216 | Red Component 217 | 0.81568628549575806 218 | 219 | Selection Color 220 | 221 | Blue Component 222 | 0.18823529779911041 223 | Green Component 224 | 0.18823529779911041 225 | Red Component 226 | 0.18823529779911041 227 | 228 | 229 | 230 | Default Bookmark Guid 231 | 481D5DCE-0286-467D-840E-C31D5849E02F 232 | DisableFullscreenTransparency 233 | 234 | EnableDivisionView 235 | 236 | EnableProxyIcon 237 | 238 | HideScrollbar 239 | 240 | HideTab 241 | 242 | HotKeyBookmark 243 | 80E489A7-A5DA-4CD2-8E9C-07B273B0309D 244 | HotKeyTogglesWindow 245 | 246 | Hotkey 247 | 248 | HotkeyChar 249 | 0 250 | HotkeyCode 251 | 0 252 | HotkeyMigratedFromSingleToMulti 253 | 254 | HotkeyModifiers 255 | 524288 256 | LoadPrefsFromCustomFolder 257 | 258 | NSNavLastRootDirectory 259 | ~/code/iTerm2-Color-Schemes/schemes 260 | NSNavPanelExpandedSizeForOpenMode 261 | {712, 448} 262 | NSQuotedKeystrokeBinding 263 | 264 | NSRepeatCountBinding 265 | 266 | NSScrollAnimationEnabled 267 | 268 | NSScrollViewShouldScrollUnderTitlebar 269 | 270 | NSTableView Columns v2 KeyBingingTable 271 | 272 | YnBsaXN0MDDUAQIDBAUGNjdYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS 273 | AAGGoK4HCA8aGxwdHh8gJjAxMlUkbnVsbNIJCgsOWk5TLm9iamVjdHNWJGNsYXNzogwN 274 | gAKACoAN0xAJChEVGVdOUy5rZXlzoxITFIADgASABaMWFxiABoAHgAiACVpJZGVudGlm 275 | aWVyVVdpZHRoVkhpZGRlblEwI0BowAAAAAAACNIhIiMkWiRjbGFzc25hbWVYJGNsYXNz 276 | ZXNcTlNEaWN0aW9uYXJ5oiMlWE5TT2JqZWN00xAJCicrGaMSExSAA4AEgAWjLC0YgAuA 277 | DIAIgAlRMSNAc7Gdsi0OVtIhIjM0Xk5TTXV0YWJsZUFycmF5ozM1JVdOU0FycmF5XxAP 278 | TlNLZXllZEFyY2hpdmVy0Tg5VUFycmF5gAEACAARABoAIwAtADIANwBGAEwAUQBcAGMA 279 | ZgBoAGoAbABzAHsAfwCBAIMAhQCJAIsAjQCPAJEAnACiAKkAqwC0ALUAugDFAM4A2wDe 280 | AOcA7gDyAPQA9gD4APwA/gEAAQIBBAEGAQ8BFAEjAScBLwFBAUQBSgAAAAAAAAIBAAAA 281 | AAAAADoAAAAAAAAAAAAAAAAAAAFM 282 | 283 | NSTableView Sort Ordering v2 KeyBingingTable 284 | 285 | YnBsaXN0MDDUAQIDBAUGFBVYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS 286 | AAGGoKMHCA1VJG51bGzSCQoLDFpOUy5vYmplY3RzViRjbGFzc6CAAtIODxARWiRjbGFz 287 | c25hbWVYJGNsYXNzZXNeTlNNdXRhYmxlQXJyYXmjEBITV05TQXJyYXlYTlNPYmplY3Rf 288 | EA9OU0tleWVkQXJjaGl2ZXLRFhdVQXJyYXmAAQgRGiMtMjc7QUZRWFlbYGt0g4ePmKqt 289 | swAAAAAAAAEBAAAAAAAAABgAAAAAAAAAAAAAAAAAAAC1 290 | 291 | NSTableView Supports v2 KeyBingingTable 292 | 293 | NSWindow Frame NSFontPanel 294 | 843 122 683 355 0 0 1680 1027 295 | NSWindow Frame SUAutomaticUpdateAlert 296 | 1196 1121 616 174 0 0 3008 1669 297 | NSWindow Frame SUStatusFrame 298 | 1304 1155 400 129 0 0 3008 1669 299 | NSWindow Frame SUUpdateAlert 300 | 1194 957 620 392 0 0 3008 1669 301 | NSWindow Frame SharedPreferences 302 | 705 554 918 452 0 0 3008 1669 303 | NSWindow Frame iTerm Window 0 304 | 0 23 3008 1646 0 0 3008 1669 305 | NSWindow Frame iTerm Window 1 306 | 517 499 666 578 0 0 3008 1669 307 | NeverWarnAboutShortLivedSessions_481D5DCE-0286-467D-840E-C31D5849E02F 308 | 309 | NeverWarnAboutShortLivedSessions_481D5DCE-0286-467D-840E-C31D5849E02F_selection 310 | 0 311 | New Bookmarks 312 | 313 | 314 | ASCII Anti Aliased 315 | 316 | Ambiguous Double Width 317 | 318 | Ansi 0 Color 319 | 320 | Blue Component 321 | 0.08235294371843338 322 | Green Component 323 | 0.08235294371843338 324 | Red Component 325 | 0.08235294371843338 326 | 327 | Ansi 1 Color 328 | 329 | Blue Component 330 | 0.2588235438 331 | Green Component 332 | 0.25490197539999998 333 | Red Component 334 | 0.67450982329999998 335 | 336 | Ansi 10 Color 337 | 338 | Blue Component 339 | 0.31444666754949363 340 | Green Component 341 | 0.55576569570135748 342 | Red Component 343 | 0.49473804391474724 344 | 345 | Ansi 11 Color 346 | 347 | Blue Component 348 | 0.4039215686 349 | Green Component 350 | 0.70980392160000005 351 | Red Component 352 | 0.8980392157 353 | 354 | Ansi 12 Color 355 | 356 | Blue Component 357 | 0.73333333333333328 358 | Green Component 359 | 0.59999999999999998 360 | Red Component 361 | 0.42352941176470588 362 | 363 | Ansi 13 Color 364 | 365 | Blue Component 366 | 0.5234466981 367 | Green Component 368 | 0.30697798580000002 369 | Red Component 370 | 0.62333851809999996 371 | 372 | Ansi 14 Color 373 | 374 | Blue Component 375 | 0.8118151991 376 | Green Component 377 | 0.83853216239999995 378 | Red Component 379 | 0.49031879989999999 380 | 381 | Ansi 15 Color 382 | 383 | Blue Component 384 | 0.96078431606292725 385 | Green Component 386 | 0.96078431606292725 387 | Red Component 388 | 0.96078431606292725 389 | 390 | Ansi 2 Color 391 | 392 | Blue Component 393 | 0.3144466675 394 | Green Component 395 | 0.55576569570000001 396 | Red Component 397 | 0.49473804389999998 398 | 399 | Ansi 3 Color 400 | 401 | Blue Component 402 | 0.40392156862745099 403 | Green Component 404 | 0.70980392156862748 405 | Red Component 406 | 0.89803921568627454 407 | 408 | Ansi 4 Color 409 | 410 | Blue Component 411 | 0.73333333329999995 412 | Green Component 413 | 0.59999999999999998 414 | Red Component 415 | 0.42352941179999998 416 | 417 | Ansi 5 Color 418 | 419 | Blue Component 420 | 0.52344669809931299 421 | Green Component 422 | 0.30697798579568808 423 | Red Component 424 | 0.62333851809954743 425 | 426 | Ansi 6 Color 427 | 428 | Blue Component 429 | 0.8118151991 430 | Green Component 431 | 0.83853216239999995 432 | Red Component 433 | 0.49031879989999999 434 | 435 | Ansi 7 Color 436 | 437 | Blue Component 438 | 0.81568628549575806 439 | Green Component 440 | 0.81568628549575806 441 | Red Component 442 | 0.81568628549575806 443 | 444 | Ansi 8 Color 445 | 446 | Blue Component 447 | 0.31372550129890442 448 | Green Component 449 | 0.31372550129890442 450 | Red Component 451 | 0.31372550129890442 452 | 453 | Ansi 9 Color 454 | 455 | Blue Component 456 | 0.2588235438 457 | Green Component 458 | 0.25490197539999998 459 | Red Component 460 | 0.67450982329999998 461 | 462 | BM Growl 463 | 464 | Background Color 465 | 466 | Blue Component 467 | 0.1283406391402715 468 | Green Component 469 | 0.1283406391402715 470 | Red Component 471 | 0.1283406391402715 472 | 473 | Background Image Location 474 | 475 | Badge Color 476 | 477 | Alpha Component 478 | 0.5 479 | Blue Component 480 | 0.0 481 | Color Space 482 | sRGB 483 | Green Component 484 | 0.1491314172744751 485 | Red Component 486 | 1 487 | 488 | Blinking Cursor 489 | 490 | Blur 491 | 492 | Bold Color 493 | 494 | Blue Component 495 | 0.81568628549575806 496 | Green Component 497 | 0.81568628549575806 498 | Red Component 499 | 0.81568628549575806 500 | 501 | Character Encoding 502 | 4 503 | Close Sessions On End 504 | 505 | Columns 506 | 80 507 | Command 508 | 509 | Cursor Color 510 | 511 | Blue Component 512 | 0.81568628549575806 513 | Green Component 514 | 0.81568628549575806 515 | Red Component 516 | 0.81568628549575806 517 | 518 | Cursor Guide Color 519 | 520 | Alpha Component 521 | 0.25 522 | Blue Component 523 | 1 524 | Color Space 525 | sRGB 526 | Green Component 527 | 0.9268307089805603 528 | Red Component 529 | 0.70213186740875244 530 | 531 | Cursor Text Color 532 | 533 | Blue Component 534 | 0.08235294371843338 535 | Green Component 536 | 0.08235294371843338 537 | Red Component 538 | 0.08235294371843338 539 | 540 | Custom Command 541 | No 542 | Custom Directory 543 | No 544 | Default Bookmark 545 | No 546 | Description 547 | Default 548 | Disable Window Resizing 549 | 550 | Flashing Bell 551 | 552 | Foreground Color 553 | 554 | Blue Component 555 | 0.81568628549575806 556 | Green Component 557 | 0.81568628549575806 558 | Red Component 559 | 0.81568628549575806 560 | 561 | Guid 562 | 481D5DCE-0286-467D-840E-C31D5849E02F 563 | Horizontal Spacing 564 | 1 565 | Idle Code 566 | 0 567 | Jobs to Ignore 568 | 569 | rlogin 570 | ssh 571 | slogin 572 | telnet 573 | 574 | Keyboard Map 575 | 576 | 0x2d-0x40000 577 | 578 | Action 579 | 11 580 | Text 581 | 0x1f 582 | 583 | 0x32-0x40000 584 | 585 | Action 586 | 11 587 | Text 588 | 0x00 589 | 590 | 0x33-0x40000 591 | 592 | Action 593 | 11 594 | Text 595 | 0x1b 596 | 597 | 0x34-0x40000 598 | 599 | Action 600 | 11 601 | Text 602 | 0x1c 603 | 604 | 0x35-0x40000 605 | 606 | Action 607 | 11 608 | Text 609 | 0x1d 610 | 611 | 0x36-0x40000 612 | 613 | Action 614 | 11 615 | Text 616 | 0x1e 617 | 618 | 0x37-0x40000 619 | 620 | Action 621 | 11 622 | Text 623 | 0x1f 624 | 625 | 0x38-0x40000 626 | 627 | Action 628 | 11 629 | Text 630 | 0x7f 631 | 632 | 0xf700-0x220000 633 | 634 | Action 635 | 10 636 | Text 637 | [1;2A 638 | 639 | 0xf700-0x240000 640 | 641 | Action 642 | 10 643 | Text 644 | [1;5A 645 | 646 | 0xf700-0x260000 647 | 648 | Action 649 | 10 650 | Text 651 | [1;6A 652 | 653 | 0xf700-0x280000 654 | 655 | Action 656 | 11 657 | Text 658 | 0x1b 0x1b 0x5b 0x41 659 | 660 | 0xf701-0x220000 661 | 662 | Action 663 | 10 664 | Text 665 | [1;2B 666 | 667 | 0xf701-0x240000 668 | 669 | Action 670 | 10 671 | Text 672 | [1;5B 673 | 674 | 0xf701-0x260000 675 | 676 | Action 677 | 10 678 | Text 679 | [1;6B 680 | 681 | 0xf701-0x280000 682 | 683 | Action 684 | 11 685 | Text 686 | 0x1b 0x1b 0x5b 0x42 687 | 688 | 0xf702-0x220000 689 | 690 | Action 691 | 10 692 | Text 693 | [1;2D 694 | 695 | 0xf702-0x240000 696 | 697 | Action 698 | 10 699 | Text 700 | [1;5D 701 | 702 | 0xf702-0x260000 703 | 704 | Action 705 | 10 706 | Text 707 | [1;6D 708 | 709 | 0xf702-0x280000 710 | 711 | Action 712 | 11 713 | Text 714 | 0x1b 0x1b 0x5b 0x44 715 | 716 | 0xf703-0x220000 717 | 718 | Action 719 | 10 720 | Text 721 | [1;2C 722 | 723 | 0xf703-0x240000 724 | 725 | Action 726 | 10 727 | Text 728 | [1;5C 729 | 730 | 0xf703-0x260000 731 | 732 | Action 733 | 10 734 | Text 735 | [1;6C 736 | 737 | 0xf703-0x280000 738 | 739 | Action 740 | 11 741 | Text 742 | 0x1b 0x1b 0x5b 0x43 743 | 744 | 0xf704-0x20000 745 | 746 | Action 747 | 10 748 | Text 749 | [1;2P 750 | 751 | 0xf705-0x20000 752 | 753 | Action 754 | 10 755 | Text 756 | [1;2Q 757 | 758 | 0xf706-0x20000 759 | 760 | Action 761 | 10 762 | Text 763 | [1;2R 764 | 765 | 0xf707-0x20000 766 | 767 | Action 768 | 10 769 | Text 770 | [1;2S 771 | 772 | 0xf708-0x20000 773 | 774 | Action 775 | 10 776 | Text 777 | [15;2~ 778 | 779 | 0xf709-0x20000 780 | 781 | Action 782 | 10 783 | Text 784 | [17;2~ 785 | 786 | 0xf70a-0x20000 787 | 788 | Action 789 | 10 790 | Text 791 | [18;2~ 792 | 793 | 0xf70b-0x20000 794 | 795 | Action 796 | 10 797 | Text 798 | [19;2~ 799 | 800 | 0xf70c-0x20000 801 | 802 | Action 803 | 10 804 | Text 805 | [20;2~ 806 | 807 | 0xf70d-0x20000 808 | 809 | Action 810 | 10 811 | Text 812 | [21;2~ 813 | 814 | 0xf70e-0x20000 815 | 816 | Action 817 | 10 818 | Text 819 | [23;2~ 820 | 821 | 0xf70f-0x20000 822 | 823 | Action 824 | 10 825 | Text 826 | [24;2~ 827 | 828 | 0xf729-0x20000 829 | 830 | Action 831 | 10 832 | Text 833 | [1;2H 834 | 835 | 0xf729-0x40000 836 | 837 | Action 838 | 10 839 | Text 840 | [1;5H 841 | 842 | 0xf72b-0x20000 843 | 844 | Action 845 | 10 846 | Text 847 | [1;2F 848 | 849 | 0xf72b-0x40000 850 | 851 | Action 852 | 10 853 | Text 854 | [1;5F 855 | 856 | 857 | Link Color 858 | 859 | Alpha Component 860 | 1 861 | Blue Component 862 | 0.73423302173614502 863 | Color Space 864 | sRGB 865 | Green Component 866 | 0.35916060209274292 867 | Red Component 868 | 0.0 869 | 870 | Mouse Reporting 871 | 872 | Name 873 | Default 874 | Non Ascii Font 875 | EuphemiaUCAS 12 876 | Non-ASCII Anti Aliased 877 | 878 | Normal Font 879 | InconsolataForPowerline-g 14 880 | Option Key Sends 881 | 2 882 | Prompt Before Closing 2 883 | 884 | Right Option Key Sends 885 | 0 886 | Rows 887 | 25 888 | Screen 889 | -1 890 | Scrollback Lines 891 | 1000 892 | Selected Text Color 893 | 894 | Blue Component 895 | 0.81568628549575806 896 | Green Component 897 | 0.81568628549575806 898 | Red Component 899 | 0.81568628549575806 900 | 901 | Selection Color 902 | 903 | Blue Component 904 | 0.18823529779911041 905 | Green Component 906 | 0.18823529779911041 907 | Red Component 908 | 0.18823529779911041 909 | 910 | Send Code When Idle 911 | 912 | Shortcut 913 | 914 | Silence Bell 915 | 916 | Sync Title 917 | 918 | Tags 919 | 920 | Terminal Type 921 | xterm-256color 922 | Transparency 923 | 0.0 924 | Unlimited Scrollback 925 | 926 | Use Bold Font 927 | 928 | Use Bright Bold 929 | 930 | Use Italic Font 931 | 932 | Use Non-ASCII Font 933 | 934 | Vertical Spacing 935 | 1.0703536803463853 936 | Visual Bell 937 | 938 | Window Type 939 | 0 940 | Working Directory 941 | /Users/terryma 942 | 943 | 944 | ASCII Anti Aliased 945 | 946 | Ambiguous Double Width 947 | 948 | Ansi 0 Color 949 | 950 | Blue Component 951 | 0.0 952 | Green Component 953 | 0.0 954 | Red Component 955 | 0.0 956 | 957 | Ansi 1 Color 958 | 959 | Blue Component 960 | 0.0 961 | Green Component 962 | 0.0 963 | Red Component 964 | 0.73333334922790527 965 | 966 | Ansi 10 Color 967 | 968 | Blue Component 969 | 0.3333333432674408 970 | Green Component 971 | 1 972 | Red Component 973 | 0.3333333432674408 974 | 975 | Ansi 11 Color 976 | 977 | Blue Component 978 | 0.3333333432674408 979 | Green Component 980 | 1 981 | Red Component 982 | 1 983 | 984 | Ansi 12 Color 985 | 986 | Blue Component 987 | 1 988 | Green Component 989 | 0.3333333432674408 990 | Red Component 991 | 0.3333333432674408 992 | 993 | Ansi 13 Color 994 | 995 | Blue Component 996 | 1 997 | Green Component 998 | 0.3333333432674408 999 | Red Component 1000 | 1 1001 | 1002 | Ansi 14 Color 1003 | 1004 | Blue Component 1005 | 1 1006 | Green Component 1007 | 1 1008 | Red Component 1009 | 0.3333333432674408 1010 | 1011 | Ansi 15 Color 1012 | 1013 | Blue Component 1014 | 1 1015 | Green Component 1016 | 1 1017 | Red Component 1018 | 1 1019 | 1020 | Ansi 2 Color 1021 | 1022 | Blue Component 1023 | 0.0 1024 | Green Component 1025 | 0.73333334922790527 1026 | Red Component 1027 | 0.0 1028 | 1029 | Ansi 3 Color 1030 | 1031 | Blue Component 1032 | 0.0 1033 | Green Component 1034 | 0.73333334922790527 1035 | Red Component 1036 | 0.73333334922790527 1037 | 1038 | Ansi 4 Color 1039 | 1040 | Blue Component 1041 | 0.73333334922790527 1042 | Green Component 1043 | 0.0 1044 | Red Component 1045 | 0.0 1046 | 1047 | Ansi 5 Color 1048 | 1049 | Blue Component 1050 | 0.73333334922790527 1051 | Green Component 1052 | 0.0 1053 | Red Component 1054 | 0.73333334922790527 1055 | 1056 | Ansi 6 Color 1057 | 1058 | Blue Component 1059 | 0.73333334922790527 1060 | Green Component 1061 | 0.73333334922790527 1062 | Red Component 1063 | 0.0 1064 | 1065 | Ansi 7 Color 1066 | 1067 | Blue Component 1068 | 0.73333334922790527 1069 | Green Component 1070 | 0.73333334922790527 1071 | Red Component 1072 | 0.73333334922790527 1073 | 1074 | Ansi 8 Color 1075 | 1076 | Blue Component 1077 | 0.3333333432674408 1078 | Green Component 1079 | 0.3333333432674408 1080 | Red Component 1081 | 0.3333333432674408 1082 | 1083 | Ansi 9 Color 1084 | 1085 | Blue Component 1086 | 0.3333333432674408 1087 | Green Component 1088 | 0.3333333432674408 1089 | Red Component 1090 | 1 1091 | 1092 | BM Growl 1093 | 1094 | Background Color 1095 | 1096 | Blue Component 1097 | 0.0 1098 | Green Component 1099 | 0.0 1100 | Red Component 1101 | 0.0 1102 | 1103 | Background Image Location 1104 | 1105 | Blinking Cursor 1106 | 1107 | Blur 1108 | 1109 | Bold Color 1110 | 1111 | Blue Component 1112 | 1 1113 | Green Component 1114 | 1 1115 | Red Component 1116 | 1 1117 | 1118 | Character Encoding 1119 | 4 1120 | Close Sessions On End 1121 | 1122 | Columns 1123 | 300 1124 | Command 1125 | 1126 | Cursor Color 1127 | 1128 | Blue Component 1129 | 0.73333334922790527 1130 | Green Component 1131 | 0.73333334922790527 1132 | Red Component 1133 | 0.73333334922790527 1134 | 1135 | Cursor Text Color 1136 | 1137 | Blue Component 1138 | 1 1139 | Green Component 1140 | 1 1141 | Red Component 1142 | 1 1143 | 1144 | Custom Command 1145 | No 1146 | Custom Directory 1147 | No 1148 | Default Bookmark 1149 | No 1150 | Description 1151 | Default 1152 | Disable Window Resizing 1153 | 1154 | Flashing Bell 1155 | 1156 | Foreground Color 1157 | 1158 | Blue Component 1159 | 0.73333334922790527 1160 | Green Component 1161 | 0.73333334922790527 1162 | Red Component 1163 | 0.73333334922790527 1164 | 1165 | Guid 1166 | E9E8A77A-3CE9-4848-B423-8571E591AE13 1167 | Horizontal Spacing 1168 | 1 1169 | Idle Code 1170 | 0 1171 | Jobs to Ignore 1172 | 1173 | rlogin 1174 | ssh 1175 | slogin 1176 | telnet 1177 | 1178 | Keyboard Map 1179 | 1180 | 0x2d-0x40000 1181 | 1182 | Action 1183 | 11 1184 | Text 1185 | 0x1f 1186 | 1187 | 0x32-0x40000 1188 | 1189 | Action 1190 | 11 1191 | Text 1192 | 0x00 1193 | 1194 | 0x33-0x40000 1195 | 1196 | Action 1197 | 11 1198 | Text 1199 | 0x1b 1200 | 1201 | 0x34-0x40000 1202 | 1203 | Action 1204 | 11 1205 | Text 1206 | 0x1c 1207 | 1208 | 0x35-0x40000 1209 | 1210 | Action 1211 | 11 1212 | Text 1213 | 0x1d 1214 | 1215 | 0x36-0x40000 1216 | 1217 | Action 1218 | 11 1219 | Text 1220 | 0x1e 1221 | 1222 | 0x37-0x40000 1223 | 1224 | Action 1225 | 11 1226 | Text 1227 | 0x1f 1228 | 1229 | 0x38-0x40000 1230 | 1231 | Action 1232 | 11 1233 | Text 1234 | 0x7f 1235 | 1236 | 0xf700-0x220000 1237 | 1238 | Action 1239 | 10 1240 | Text 1241 | [1;2A 1242 | 1243 | 0xf700-0x240000 1244 | 1245 | Action 1246 | 10 1247 | Text 1248 | [1;5A 1249 | 1250 | 0xf700-0x260000 1251 | 1252 | Action 1253 | 10 1254 | Text 1255 | [1;6A 1256 | 1257 | 0xf700-0x280000 1258 | 1259 | Action 1260 | 11 1261 | Text 1262 | 0x1b 0x1b 0x5b 0x41 1263 | 1264 | 0xf701-0x220000 1265 | 1266 | Action 1267 | 10 1268 | Text 1269 | [1;2B 1270 | 1271 | 0xf701-0x240000 1272 | 1273 | Action 1274 | 10 1275 | Text 1276 | [1;5B 1277 | 1278 | 0xf701-0x260000 1279 | 1280 | Action 1281 | 10 1282 | Text 1283 | [1;6B 1284 | 1285 | 0xf701-0x280000 1286 | 1287 | Action 1288 | 11 1289 | Text 1290 | 0x1b 0x1b 0x5b 0x42 1291 | 1292 | 0xf702-0x220000 1293 | 1294 | Action 1295 | 10 1296 | Text 1297 | [1;2D 1298 | 1299 | 0xf702-0x240000 1300 | 1301 | Action 1302 | 10 1303 | Text 1304 | [1;5D 1305 | 1306 | 0xf702-0x260000 1307 | 1308 | Action 1309 | 10 1310 | Text 1311 | [1;6D 1312 | 1313 | 0xf702-0x280000 1314 | 1315 | Action 1316 | 11 1317 | Text 1318 | 0x1b 0x1b 0x5b 0x44 1319 | 1320 | 0xf703-0x220000 1321 | 1322 | Action 1323 | 10 1324 | Text 1325 | [1;2C 1326 | 1327 | 0xf703-0x240000 1328 | 1329 | Action 1330 | 10 1331 | Text 1332 | [1;5C 1333 | 1334 | 0xf703-0x260000 1335 | 1336 | Action 1337 | 10 1338 | Text 1339 | [1;6C 1340 | 1341 | 0xf703-0x280000 1342 | 1343 | Action 1344 | 11 1345 | Text 1346 | 0x1b 0x1b 0x5b 0x43 1347 | 1348 | 0xf704-0x20000 1349 | 1350 | Action 1351 | 10 1352 | Text 1353 | [1;2P 1354 | 1355 | 0xf705-0x20000 1356 | 1357 | Action 1358 | 10 1359 | Text 1360 | [1;2Q 1361 | 1362 | 0xf706-0x20000 1363 | 1364 | Action 1365 | 10 1366 | Text 1367 | [1;2R 1368 | 1369 | 0xf707-0x20000 1370 | 1371 | Action 1372 | 10 1373 | Text 1374 | [1;2S 1375 | 1376 | 0xf708-0x20000 1377 | 1378 | Action 1379 | 10 1380 | Text 1381 | [15;2~ 1382 | 1383 | 0xf709-0x20000 1384 | 1385 | Action 1386 | 10 1387 | Text 1388 | [17;2~ 1389 | 1390 | 0xf70a-0x20000 1391 | 1392 | Action 1393 | 10 1394 | Text 1395 | [18;2~ 1396 | 1397 | 0xf70b-0x20000 1398 | 1399 | Action 1400 | 10 1401 | Text 1402 | [19;2~ 1403 | 1404 | 0xf70c-0x20000 1405 | 1406 | Action 1407 | 10 1408 | Text 1409 | [20;2~ 1410 | 1411 | 0xf70d-0x20000 1412 | 1413 | Action 1414 | 10 1415 | Text 1416 | [21;2~ 1417 | 1418 | 0xf70e-0x20000 1419 | 1420 | Action 1421 | 10 1422 | Text 1423 | [23;2~ 1424 | 1425 | 0xf70f-0x20000 1426 | 1427 | Action 1428 | 10 1429 | Text 1430 | [24;2~ 1431 | 1432 | 0xf729-0x20000 1433 | 1434 | Action 1435 | 10 1436 | Text 1437 | [1;2H 1438 | 1439 | 0xf729-0x40000 1440 | 1441 | Action 1442 | 10 1443 | Text 1444 | [1;5H 1445 | 1446 | 0xf72b-0x20000 1447 | 1448 | Action 1449 | 10 1450 | Text 1451 | [1;2F 1452 | 1453 | 0xf72b-0x40000 1454 | 1455 | Action 1456 | 10 1457 | Text 1458 | [1;5F 1459 | 1460 | 1461 | Mouse Reporting 1462 | 1463 | Name 1464 | tmux 1465 | Non Ascii Font 1466 | Monaco 12 1467 | Non-ASCII Anti Aliased 1468 | 1469 | Normal Font 1470 | Monaco 12 1471 | Option Key Sends 1472 | 0 1473 | Prompt Before Closing 2 1474 | 1475 | Right Option Key Sends 1476 | 0 1477 | Rows 1478 | 25 1479 | Screen 1480 | -1 1481 | Scrollback Lines 1482 | 1000 1483 | Selected Text Color 1484 | 1485 | Blue Component 1486 | 0.0 1487 | Green Component 1488 | 0.0 1489 | Red Component 1490 | 0.0 1491 | 1492 | Selection Color 1493 | 1494 | Blue Component 1495 | 1 1496 | Green Component 1497 | 0.8353000283241272 1498 | Red Component 1499 | 0.70980000495910645 1500 | 1501 | Send Code When Idle 1502 | 1503 | Shortcut 1504 | 1505 | Silence Bell 1506 | 1507 | Sync Title 1508 | 1509 | Tags 1510 | 1511 | Terminal Type 1512 | xterm-256color 1513 | Transparency 1514 | 0.0 1515 | Unlimited Scrollback 1516 | 1517 | Use Bold Font 1518 | 1519 | Use Bright Bold 1520 | 1521 | Use Italic Font 1522 | 1523 | Use Non-ASCII Font 1524 | 1525 | Vertical Spacing 1526 | 1 1527 | Visual Bell 1528 | 1529 | Window Type 1530 | 6 1531 | Working Directory 1532 | /Users/terryma 1533 | 1534 | 1535 | ASCII Anti Aliased 1536 | 1537 | Ambiguous Double Width 1538 | 1539 | Ansi 0 Color 1540 | 1541 | Blue Component 1542 | 0.0 1543 | Green Component 1544 | 0.0 1545 | Red Component 1546 | 0.0 1547 | 1548 | Ansi 1 Color 1549 | 1550 | Blue Component 1551 | 0.0 1552 | Green Component 1553 | 0.0 1554 | Red Component 1555 | 0.73333334922790527 1556 | 1557 | Ansi 10 Color 1558 | 1559 | Blue Component 1560 | 0.3333333432674408 1561 | Green Component 1562 | 1 1563 | Red Component 1564 | 0.3333333432674408 1565 | 1566 | Ansi 11 Color 1567 | 1568 | Blue Component 1569 | 0.3333333432674408 1570 | Green Component 1571 | 1 1572 | Red Component 1573 | 1 1574 | 1575 | Ansi 12 Color 1576 | 1577 | Blue Component 1578 | 1 1579 | Green Component 1580 | 0.3333333432674408 1581 | Red Component 1582 | 0.3333333432674408 1583 | 1584 | Ansi 13 Color 1585 | 1586 | Blue Component 1587 | 1 1588 | Green Component 1589 | 0.3333333432674408 1590 | Red Component 1591 | 1 1592 | 1593 | Ansi 14 Color 1594 | 1595 | Blue Component 1596 | 1 1597 | Green Component 1598 | 1 1599 | Red Component 1600 | 0.3333333432674408 1601 | 1602 | Ansi 15 Color 1603 | 1604 | Blue Component 1605 | 1 1606 | Green Component 1607 | 1 1608 | Red Component 1609 | 1 1610 | 1611 | Ansi 2 Color 1612 | 1613 | Blue Component 1614 | 0.0 1615 | Green Component 1616 | 0.73333334922790527 1617 | Red Component 1618 | 0.0 1619 | 1620 | Ansi 3 Color 1621 | 1622 | Blue Component 1623 | 0.0 1624 | Green Component 1625 | 0.73333334922790527 1626 | Red Component 1627 | 0.73333334922790527 1628 | 1629 | Ansi 4 Color 1630 | 1631 | Blue Component 1632 | 0.73333334922790527 1633 | Green Component 1634 | 0.0 1635 | Red Component 1636 | 0.0 1637 | 1638 | Ansi 5 Color 1639 | 1640 | Blue Component 1641 | 0.73333334922790527 1642 | Green Component 1643 | 0.0 1644 | Red Component 1645 | 0.73333334922790527 1646 | 1647 | Ansi 6 Color 1648 | 1649 | Blue Component 1650 | 0.73333334922790527 1651 | Green Component 1652 | 0.73333334922790527 1653 | Red Component 1654 | 0.0 1655 | 1656 | Ansi 7 Color 1657 | 1658 | Blue Component 1659 | 0.73333334922790527 1660 | Green Component 1661 | 0.73333334922790527 1662 | Red Component 1663 | 0.73333334922790527 1664 | 1665 | Ansi 8 Color 1666 | 1667 | Blue Component 1668 | 0.3333333432674408 1669 | Green Component 1670 | 0.3333333432674408 1671 | Red Component 1672 | 0.3333333432674408 1673 | 1674 | Ansi 9 Color 1675 | 1676 | Blue Component 1677 | 0.3333333432674408 1678 | Green Component 1679 | 0.3333333432674408 1680 | Red Component 1681 | 1 1682 | 1683 | BM Growl 1684 | 1685 | Background Color 1686 | 1687 | Blue Component 1688 | 0.0 1689 | Green Component 1690 | 0.0 1691 | Red Component 1692 | 0.0 1693 | 1694 | Background Image Location 1695 | 1696 | Blend 1697 | 0.5 1698 | Blinking Cursor 1699 | 1700 | Blur 1701 | 1702 | Blur Radius 1703 | 2 1704 | Bold Color 1705 | 1706 | Blue Component 1707 | 1 1708 | Green Component 1709 | 1 1710 | Red Component 1711 | 1 1712 | 1713 | Character Encoding 1714 | 4 1715 | Close Sessions On End 1716 | 1717 | Columns 1718 | 80 1719 | Command 1720 | 1721 | Cursor Color 1722 | 1723 | Blue Component 1724 | 0.73333334922790527 1725 | Green Component 1726 | 0.73333334922790527 1727 | Red Component 1728 | 0.73333334922790527 1729 | 1730 | Cursor Text Color 1731 | 1732 | Blue Component 1733 | 1 1734 | Green Component 1735 | 1 1736 | Red Component 1737 | 1 1738 | 1739 | Custom Command 1740 | No 1741 | Custom Directory 1742 | No 1743 | Default Bookmark 1744 | No 1745 | Description 1746 | Default 1747 | Disable Window Resizing 1748 | 1749 | Flashing Bell 1750 | 1751 | Foreground Color 1752 | 1753 | Blue Component 1754 | 0.73333334922790527 1755 | Green Component 1756 | 0.73333334922790527 1757 | Red Component 1758 | 0.73333334922790527 1759 | 1760 | Guid 1761 | 80E489A7-A5DA-4CD2-8E9C-07B273B0309D 1762 | Has Hotkey 1763 | 1764 | Horizontal Spacing 1765 | 1 1766 | HotKey Characters 1767 | 1768 | HotKey Characters Ignoring Modifiers 1769 | 1770 | HotKey Key Code 1771 | 49 1772 | HotKey Modifier Flags 1773 | 524288 1774 | HotKey Window Animates 1775 | 1776 | HotKey Window AutoHides 1777 | 1778 | HotKey Window Dock Click Action 1779 | 0 1780 | HotKey Window Floats 1781 | 1782 | HotKey Window Reopens On Activation 1783 | 1784 | Idle Code 1785 | 0 1786 | Jobs to Ignore 1787 | 1788 | rlogin 1789 | ssh 1790 | slogin 1791 | telnet 1792 | 1793 | Keyboard Map 1794 | 1795 | 0x2d-0x40000 1796 | 1797 | Action 1798 | 11 1799 | Text 1800 | 0x1f 1801 | 1802 | 0x32-0x40000 1803 | 1804 | Action 1805 | 11 1806 | Text 1807 | 0x00 1808 | 1809 | 0x33-0x40000 1810 | 1811 | Action 1812 | 11 1813 | Text 1814 | 0x1b 1815 | 1816 | 0x34-0x40000 1817 | 1818 | Action 1819 | 11 1820 | Text 1821 | 0x1c 1822 | 1823 | 0x35-0x40000 1824 | 1825 | Action 1826 | 11 1827 | Text 1828 | 0x1d 1829 | 1830 | 0x36-0x40000 1831 | 1832 | Action 1833 | 11 1834 | Text 1835 | 0x1e 1836 | 1837 | 0x37-0x40000 1838 | 1839 | Action 1840 | 11 1841 | Text 1842 | 0x1f 1843 | 1844 | 0x38-0x40000 1845 | 1846 | Action 1847 | 11 1848 | Text 1849 | 0x7f 1850 | 1851 | 0xf700-0x220000 1852 | 1853 | Action 1854 | 10 1855 | Text 1856 | [1;2A 1857 | 1858 | 0xf700-0x240000 1859 | 1860 | Action 1861 | 10 1862 | Text 1863 | [1;5A 1864 | 1865 | 0xf700-0x260000 1866 | 1867 | Action 1868 | 10 1869 | Text 1870 | [1;6A 1871 | 1872 | 0xf700-0x280000 1873 | 1874 | Action 1875 | 11 1876 | Text 1877 | 0x1b 0x1b 0x5b 0x41 1878 | 1879 | 0xf701-0x220000 1880 | 1881 | Action 1882 | 10 1883 | Text 1884 | [1;2B 1885 | 1886 | 0xf701-0x240000 1887 | 1888 | Action 1889 | 10 1890 | Text 1891 | [1;5B 1892 | 1893 | 0xf701-0x260000 1894 | 1895 | Action 1896 | 10 1897 | Text 1898 | [1;6B 1899 | 1900 | 0xf701-0x280000 1901 | 1902 | Action 1903 | 11 1904 | Text 1905 | 0x1b 0x1b 0x5b 0x42 1906 | 1907 | 0xf702-0x220000 1908 | 1909 | Action 1910 | 10 1911 | Text 1912 | [1;2D 1913 | 1914 | 0xf702-0x240000 1915 | 1916 | Action 1917 | 10 1918 | Text 1919 | [1;5D 1920 | 1921 | 0xf702-0x260000 1922 | 1923 | Action 1924 | 10 1925 | Text 1926 | [1;6D 1927 | 1928 | 0xf702-0x280000 1929 | 1930 | Action 1931 | 11 1932 | Text 1933 | 0x1b 0x1b 0x5b 0x44 1934 | 1935 | 0xf703-0x220000 1936 | 1937 | Action 1938 | 10 1939 | Text 1940 | [1;2C 1941 | 1942 | 0xf703-0x240000 1943 | 1944 | Action 1945 | 10 1946 | Text 1947 | [1;5C 1948 | 1949 | 0xf703-0x260000 1950 | 1951 | Action 1952 | 10 1953 | Text 1954 | [1;6C 1955 | 1956 | 0xf703-0x280000 1957 | 1958 | Action 1959 | 11 1960 | Text 1961 | 0x1b 0x1b 0x5b 0x43 1962 | 1963 | 0xf704-0x20000 1964 | 1965 | Action 1966 | 10 1967 | Text 1968 | [1;2P 1969 | 1970 | 0xf705-0x20000 1971 | 1972 | Action 1973 | 10 1974 | Text 1975 | [1;2Q 1976 | 1977 | 0xf706-0x20000 1978 | 1979 | Action 1980 | 10 1981 | Text 1982 | [1;2R 1983 | 1984 | 0xf707-0x20000 1985 | 1986 | Action 1987 | 10 1988 | Text 1989 | [1;2S 1990 | 1991 | 0xf708-0x20000 1992 | 1993 | Action 1994 | 10 1995 | Text 1996 | [15;2~ 1997 | 1998 | 0xf709-0x20000 1999 | 2000 | Action 2001 | 10 2002 | Text 2003 | [17;2~ 2004 | 2005 | 0xf70a-0x20000 2006 | 2007 | Action 2008 | 10 2009 | Text 2010 | [18;2~ 2011 | 2012 | 0xf70b-0x20000 2013 | 2014 | Action 2015 | 10 2016 | Text 2017 | [19;2~ 2018 | 2019 | 0xf70c-0x20000 2020 | 2021 | Action 2022 | 10 2023 | Text 2024 | [20;2~ 2025 | 2026 | 0xf70d-0x20000 2027 | 2028 | Action 2029 | 10 2030 | Text 2031 | [21;2~ 2032 | 2033 | 0xf70e-0x20000 2034 | 2035 | Action 2036 | 10 2037 | Text 2038 | [23;2~ 2039 | 2040 | 0xf70f-0x20000 2041 | 2042 | Action 2043 | 10 2044 | Text 2045 | [24;2~ 2046 | 2047 | 0xf729-0x20000 2048 | 2049 | Action 2050 | 10 2051 | Text 2052 | [1;2H 2053 | 2054 | 0xf729-0x40000 2055 | 2056 | Action 2057 | 10 2058 | Text 2059 | [1;5H 2060 | 2061 | 0xf72b-0x20000 2062 | 2063 | Action 2064 | 10 2065 | Text 2066 | [1;2F 2067 | 2068 | 0xf72b-0x40000 2069 | 2070 | Action 2071 | 10 2072 | Text 2073 | [1;5F 2074 | 2075 | 2076 | Mouse Reporting 2077 | 2078 | Name 2079 | Hotkey Window 2080 | Non Ascii Font 2081 | Monaco 12 2082 | Non-ASCII Anti Aliased 2083 | 2084 | Normal Font 2085 | DroidSansMonoSlashedForPowerline 12 2086 | Option Key Sends 2087 | 2 2088 | Prompt Before Closing 2 2089 | 2090 | Right Option Key Sends 2091 | 0 2092 | Rows 2093 | 25 2094 | Screen 2095 | -1 2096 | Scrollback Lines 2097 | 1000 2098 | Selected Text Color 2099 | 2100 | Blue Component 2101 | 0.0 2102 | Green Component 2103 | 0.0 2104 | Red Component 2105 | 0.0 2106 | 2107 | Selection Color 2108 | 2109 | Blue Component 2110 | 1 2111 | Green Component 2112 | 0.8353000283241272 2113 | Red Component 2114 | 0.70980000495910645 2115 | 2116 | Send Code When Idle 2117 | 2118 | Shortcut 2119 | 2120 | Silence Bell 2121 | 2122 | Space 2123 | -1 2124 | Sync Title 2125 | 2126 | Tags 2127 | 2128 | Terminal Type 2129 | xterm-256color 2130 | Transparency 2131 | 0.30000001192092896 2132 | Unlimited Scrollback 2133 | 2134 | Use Bold Font 2135 | 2136 | Use Bright Bold 2137 | 2138 | Use Italic Font 2139 | 2140 | Use Non-ASCII Font 2141 | 2142 | Vertical Spacing 2143 | 1.0703536803463853 2144 | Visual Bell 2145 | 2146 | Window Type 2147 | 2 2148 | Working Directory 2149 | /Users/terryma 2150 | 2151 | 2152 | NoSyncHaveRequestedFullDiskAccess 2153 | 2154 | NoSyncHaveWarnedAboutPasteConfirmationChange 2155 | 2156 | NoSyncInstallationId 2157 | AE4C1850-F588-4133-9173-831CB6DD5BB4 2158 | NoSyncLastTipTime 2159 | 564018336.177212 2160 | NoSyncNeverRemindPrefsChangesLostForFile 2161 | 2162 | NoSyncNeverRemindPrefsChangesLostForFile_selection 2163 | 0 2164 | NoSyncPermissionToShowTip 2165 | 2166 | NoSyncTimeOfFirstLaunchOfVersionWithTip 2167 | 559504717.82134497 2168 | NoSyncTipsToNotShow 2169 | 2170 | 000 2171 | 0000 2172 | 0001 2173 | 0002 2174 | 0003 2175 | 0004 2176 | 0005 2177 | 0006 2178 | 0007 2179 | 0008 2180 | 0009 2181 | 0010 2182 | 0011 2183 | 0012 2184 | 0013 2185 | 0014 2186 | 0015 2187 | 0016 2188 | 0017 2189 | 0018 2190 | 0019 2191 | 0020 2192 | 0021 2193 | 0022 2194 | 0023 2195 | 0024 2196 | 0025 2197 | 0026 2198 | 0027 2199 | 0028 2200 | 0029 2201 | 2202 | OpenTmuxWindowsIn 2203 | 1 2204 | PMPrintingExpandedStateForPrint2 2205 | 2206 | PointerActions 2207 | 2208 | Button,1,1,, 2209 | 2210 | Action 2211 | kContextMenuPointerAction 2212 | 2213 | Button,2,1,, 2214 | 2215 | Action 2216 | kPasteFromSelectionPointerAction 2217 | 2218 | Gesture,ThreeFingerSwipeDown,, 2219 | 2220 | Action 2221 | kPrevWindowPointerAction 2222 | 2223 | Gesture,ThreeFingerSwipeLeft,, 2224 | 2225 | Action 2226 | kPrevTabPointerAction 2227 | 2228 | Gesture,ThreeFingerSwipeRight,, 2229 | 2230 | Action 2231 | kNextTabPointerAction 2232 | 2233 | Gesture,ThreeFingerSwipeUp,, 2234 | 2235 | Action 2236 | kNextWindowPointerAction 2237 | 2238 | 2239 | PrefsCustomFolder 2240 | /Users/tma/.dotfiles/iterm 2241 | Print In Black And White 2242 | 2243 | SUAutomaticallyUpdate 2244 | 2245 | SUEnableAutomaticChecks 2246 | 2247 | SUFeedAlternateAppNameKey 2248 | iTerm 2249 | SUFeedURL 2250 | https://iterm2.com/appcasts/final.xml?shard=16 2251 | SUHasLaunchedBefore 2252 | 2253 | SULastCheckTime 2254 | 2018-11-16T01:27:29Z 2255 | SUSendProfileInfo 2256 | 2257 | ShowBookmarkName 2258 | 2259 | ShowFullScreenTabBar 2260 | 2261 | ShowPaneTitles 2262 | 2263 | StretchTabsToFillBar 2264 | 2265 | TabStyle 2266 | 1 2267 | TabStyleWithAutomaticOption 2268 | 4 2269 | TabViewType 2270 | 0 2271 | UseBorder 2272 | 2273 | WordCharacters 2274 | /-+\~_. 2275 | findMode_iTerm 2276 | 0 2277 | iTerm Version 2278 | 3.2.5 2279 | kCPKSelectionViewPreferredModeKey 2280 | 0 2281 | kCPKSelectionViewShowHSBTextFieldsKey 2282 | 2283 | 2284 | 2285 | -------------------------------------------------------------------------------- /pure.zsh-theme: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env zsh 2 | 3 | # ------------------------------------------------------------------------------ 4 | # 5 | # Pure - A minimal and beautiful theme for oh-my-zsh 6 | # 7 | # Based on the custom Zsh-prompt of the same name by Sindre Sorhus. A huge 8 | # thanks goes out to him for designing the fantastic Pure prompt in the first 9 | # place! I'd also like to thank Julien Nicoulaud for his "nicoulaj" theme from 10 | # which I've borrowed both some ideas and some actual code. You can find out 11 | # more about both of these fantastic two people here: 12 | # 13 | # Sindre Sorhus 14 | # Github: https://github.com/sindresorhus 15 | # Twitter: https://twitter.com/sindresorhus 16 | # 17 | # Julien Nicoulaud 18 | # Github: https://github.com/nicoulaj 19 | # Twitter: https://twitter.com/nicoulaj 20 | # 21 | # License 22 | # 23 | # Copyright (c) 2013 Kasper Kronborg Isager 24 | # 25 | # Permission is hereby granted, free of charge, to any person obtaining a copy 26 | # of this software and associated documentation files (the "Software"), to deal 27 | # in the Software without restriction, including without limitation the rights 28 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 29 | # copies of the Software, and to permit persons to whom the Software is 30 | # furnished to do so, subject to the following conditions: 31 | # 32 | # The above copyright notice and this permission notice shall be included in 33 | # all copies or substantial portions of the Software. 34 | # 35 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 36 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 37 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 38 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 39 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 40 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 41 | # THE SOFTWARE. 42 | # 43 | # ------------------------------------------------------------------------------ 44 | 45 | # Set required options 46 | # 47 | setopt prompt_subst 48 | 49 | # Load required modules 50 | # 51 | autoload -Uz vcs_info 52 | 53 | # Set vcs_info parameters 54 | # 55 | zstyle ':vcs_info:*' enable hg bzr git 56 | zstyle ':vcs_info:*:*' unstagedstr '!' 57 | zstyle ':vcs_info:*:*' stagedstr '+' 58 | zstyle ':vcs_info:*:*' formats "$FX[bold]%r$FX[no-bold]/%S" "%s/%b" "%%u%c" 59 | zstyle ':vcs_info:*:*' actionformats "$FX[bold]%r$FX[no-bold]/%S" "%s/%b" "%u%c (%a)" 60 | zstyle ':vcs_info:*:*' nvcsformats "%~" "" "" 61 | 62 | # Fastest possible way to check if repo is dirty 63 | # 64 | git_dirty() { 65 | # Check if we're in a git repo 66 | command git rev-parse --is-inside-work-tree &>/dev/null || return 67 | # Check if it's dirty 68 | command git diff --quiet --ignore-submodules HEAD &>/dev/null; [ $? -eq 1 ] && echo "*" 69 | } 70 | 71 | # Display information about the current repository 72 | # 73 | repo_information() { 74 | echo "%F{blue}${vcs_info_msg_0_%%/.} %F{8}$vcs_info_msg_1_`git_dirty` $vcs_info_msg_2_%f" 75 | } 76 | 77 | # Displays the exec time of the last command if set threshold was exceeded 78 | # 79 | cmd_exec_time() { 80 | local stop=`date +%s` 81 | local start=${cmd_timestamp:-$stop} 82 | let local elapsed=$stop-$start 83 | [ $elapsed -gt 5 ] && echo ${elapsed}s 84 | } 85 | 86 | # Get the intial timestamp for cmd_exec_time 87 | # 88 | preexec() { 89 | cmd_timestamp=`date +%s` 90 | } 91 | 92 | # Output additional information about paths, repos and exec time 93 | # 94 | precmd() { 95 | vcs_info # Get version control info before we start outputting stuff 96 | print -P "\n$(repo_information) %F{yellow}$(cmd_exec_time)%f" 97 | } 98 | 99 | # Define prompts 100 | # 101 | PROMPT="%(?.%F{magenta}.%F{red})❯%f " # Display a red prompt char on failure 102 | RPROMPT="%F{8}${SSH_TTY:+%n@%m}%f" # Display username if connected via SSH 103 | 104 | # ------------------------------------------------------------------------------ 105 | # 106 | # List of vcs_info format strings: 107 | # 108 | # %b => current branch 109 | # %a => current action (rebase/merge) 110 | # %s => current version control system 111 | # %r => name of the root directory of the repository 112 | # %S => current path relative to the repository root directory 113 | # %m => in case of Git, show information about stashes 114 | # %u => show unstaged changes in the repository 115 | # %c => show staged changes in the repository 116 | # 117 | # List of prompt format strings: 118 | # 119 | # prompt: 120 | # %F => color dict 121 | # %f => reset color 122 | # %~ => current path 123 | # %* => time 124 | # %n => username 125 | # %m => shortname host 126 | # %(?..) => prompt conditional - %(condition.true.false) 127 | # 128 | # ------------------------------------------------------------------------------ 129 | -------------------------------------------------------------------------------- /work.applescript: -------------------------------------------------------------------------------- 1 | tell application "iTerm" 2 | activate 3 | 4 | -- Count number of terminal windows 5 | set termcount to count of terminal 6 | 7 | -- If there are no terminal windows open, create a new one 8 | if termcount is 0 then 9 | set term to (make new terminal) 10 | else 11 | set term to (terminal 0) 12 | end if 13 | 14 | tell term 15 | -- Make a new session 16 | launch session "terryma" 17 | tell the last session 18 | set name to "desktop" 19 | write text "work" 20 | end tell 21 | launch session "terryma" 22 | tell the last session 23 | set name to "laptop" 24 | write text "tmux kill-session" 25 | write text "tmux attach -d" 26 | delay 1 27 | write text "t laptop" 28 | end tell 29 | 30 | -- Terminate first session 31 | terminate session 0 32 | -- Put it in the right place 33 | tell i term application "System Events" to keystroke "l" using {command down, control down, shift down, option down} 34 | tell i term application "System Events" to keystroke return 35 | end tell 36 | end tell 37 | --------------------------------------------------------------------------------