Browse Source

Move from iterm2 -> alacritty (way faster)

Move from wm -> chunkwm
Use khdrc for listening/mapping keypresses (chunkwm dependency)
Add ctags support for vim
Move from Vundle -> Plug (faster/better)
Reorganize vimfile
Add plugins to vimfile
Add/change keymappings in vimfile
Add FZF default command in exports.zsh
Add kitty alias for launching tty (testing)
Reorganize/add comment in functions.zsh
remotes/remote_mirror_0048a893dc9c9faa373a1b34fba08204/master
Andrew Zah 1 year ago
parent
commit
9886906fda
Signed by: Andrew Zah <zah@andrewzah.com> GPG Key ID: 0AE942445EB70FAA
7 changed files with 497 additions and 118 deletions
  1. 321
    0
      .alacritty.yml
  2. 22
    0
      .ctags
  3. 0
    9
      .khdrc
  4. 138
    105
      .nvimrc
  5. 7
    0
      zsh/aliases.zsh
  6. 5
    2
      zsh/exports.zsh
  7. 4
    2
      zsh/functions.zsh

+ 321
- 0
.alacritty.yml View File

@@ -0,0 +1,321 @@
1
+# Configuration for Alacritty, the GPU enhanced terminal emulator
2
+
3
+# Any items in the `env` entry below will be added as
4
+# environment variables. Some entries may override variables
5
+# set by alacritty it self.
6
+env:
7
+  # TERM env customization.
8
+  #
9
+  # If this property is not set, alacritty will set it to xterm-256color.
10
+  #
11
+  # Note that some xterm terminfo databases don't declare support for italics.
12
+  # You can verify this by checking for the presence of `smso` and `sitm` in
13
+  # `infocmp xterm-256color`.
14
+  TERM: xterm-256color
15
+
16
+# Window dimensions in character columns and lines
17
+# (changes require restart)
18
+dimensions:
19
+  columns: 160
20
+  lines: 60
21
+
22
+# Adds this many blank pixels of padding around the window
23
+# Units are physical pixels; this is not DPI aware.
24
+# (change requires restart)
25
+padding:
26
+  x: 2
27
+  y: 2
28
+
29
+# Display tabs using this many cells (changes require restart)
30
+tabspaces: 2
31
+
32
+# When true, bold text is drawn using the bright variant of colors.
33
+draw_bold_text_with_bright_colors: true
34
+
35
+# Font configuration (changes require restart)
36
+font:
37
+  # The normal (roman) font face to use.
38
+  normal:
39
+    family: Menlo
40
+    # Style can be specified to pick a specific face.
41
+    # style: Regular
42
+
43
+  # The bold font face
44
+  bold:
45
+    family: Menlo
46
+    # Style can be specified to pick a specific face.
47
+    # style: Bold
48
+
49
+  # The italic font face
50
+  italic:
51
+    family: Menlo
52
+    # Style can be specified to pick a specific face.
53
+    # style: Italic
54
+
55
+  # Point size of the font
56
+  size: 12.0
57
+
58
+  # Offset is the extra space around each character. offset.y can be thought of
59
+  # as modifying the linespacing, and offset.x as modifying the letter spacing.
60
+  offset:
61
+    x: 0.0
62
+    y: 0.0
63
+
64
+  # Glyph offset determines the locations of the glyphs within their cells with
65
+  # the default being at the bottom. Increase the x offset to move the glyph to
66
+  # the right, increase the y offset to move the glyph upward.
67
+  glyph_offset:
68
+    x: 0.0
69
+    y: 0.0
70
+
71
+  # OS X only: use thin stroke font rendering. Thin strokes are suitable
72
+  # for retina displays, but for non-retina you probably want this set to
73
+  # false.
74
+  use_thin_strokes: true
75
+
76
+# Should display the render timer
77
+render_timer: false
78
+
79
+# Use custom cursor colors. If true, display the cursor in the cursor.foreground
80
+# and cursor.background colors, otherwise invert the colors of the cursor.
81
+custom_cursor_colors: false
82
+
83
+# Colors (Gruvbox dark)
84
+colors:
85
+  # Default colors
86
+  primary:
87
+    # hard contrast: background = '0x1d2021'
88
+    background: '0x282828'
89
+    # soft contrast: background = '0x32302f'
90
+    foreground: '0xebdbb2'
91
+
92
+  # Normal colors
93
+  normal:
94
+    black:   '0x282828'
95
+    red:     '0xcc241d'
96
+    green:   '0x98971a'
97
+    yellow:  '0xd79921'
98
+    blue:    '0x458588'
99
+    magenta: '0xb16286'
100
+    cyan:    '0x689d6a'
101
+    white:   '0xa89984'
102
+
103
+  # Bright colors
104
+  bright:
105
+    black:   '0x928374'
106
+    red:     '0xfb4934'
107
+    green:   '0xb8bb26'
108
+    yellow:  '0xfabd2f'
109
+    blue:    '0x83a598'
110
+    magenta: '0xd3869b'
111
+    cyan:    '0x8ec07c'
112
+    white:   '0xebdbb2'
113
+
114
+# Visual Bell
115
+#
116
+# Any time the BEL code is received, Alacritty "rings" the visual bell. Once
117
+# rung, the terminal background will be set to white and transition back to the
118
+# default background color. You can control the rate of this transition by
119
+# setting the `duration` property (represented in milliseconds). You can also
120
+# configure the transition function by setting the `animation` property.
121
+#
122
+# Possible values for `animation`
123
+# `Ease`
124
+# `EaseOut`
125
+# `EaseOutSine`
126
+# `EaseOutQuad`
127
+# `EaseOutCubic`
128
+# `EaseOutQuart`
129
+# `EaseOutQuint`
130
+# `EaseOutExpo`
131
+# `EaseOutCirc`
132
+# `Linear`
133
+#
134
+# To completely disable the visual bell, set its duration to 0.
135
+#
136
+visual_bell:
137
+  animation: EaseOutExpo
138
+  duration: 0
139
+
140
+# Background opacity
141
+background_opacity: 0.9
142
+
143
+# Mouse bindings
144
+#
145
+# Currently doesn't support modifiers. Both the `mouse` and `action` fields must
146
+# be specified.
147
+#
148
+# Values for `mouse`:
149
+# - Middle
150
+# - Left
151
+# - Right
152
+# - Numeric identifier such as `5`
153
+#
154
+# Values for `action`:
155
+# - Paste
156
+# - PasteSelection
157
+# - Copy (TODO)
158
+mouse_bindings:
159
+  - { mouse: Middle, action: PasteSelection }
160
+
161
+mouse:
162
+  double_click: { threshold: 300 }
163
+  triple_click: { threshold: 300 }
164
+
165
+selection:
166
+  semantic_escape_chars: ",│`|:\"' ()[]{}<>"
167
+
168
+hide_cursor_when_typing: false
169
+
170
+# Live config reload (changes require restart)
171
+live_config_reload: true
172
+
173
+# Shell
174
+#
175
+# You can set shell.program to the path of your favorite shell, e.g. /bin/fish.
176
+# Entries in shell.args are passed unmodified as arguments to the shell.
177
+#
178
+# shell:
179
+#   program: /bin/bash
180
+#   args:
181
+#     - --login
182
+shell:
183
+  program: /bin/zsh
184
+
185
+# Key bindings
186
+#
187
+# Each binding is defined as an object with some properties. Most of the
188
+# properties are optional. All of the alphabetical keys should have a letter for
189
+# the `key` value such as `V`. Function keys are probably what you would expect
190
+# as well (F1, F2, ..). The number keys above the main keyboard are encoded as
191
+# `Key1`, `Key2`, etc. Keys on the number pad are encoded `Number1`, `Number2`,
192
+# etc.  These all match the glutin::VirtualKeyCode variants.
193
+#
194
+# Possible values for `mods`
195
+# `Command`, `Super` refer to the super/command/windows key
196
+# `Control` for the control key
197
+# `Shift` for the Shift key
198
+# `Alt` and `Option` refer to alt/option
199
+#
200
+# mods may be combined with a `|`. For example, requiring control and shift
201
+# looks like:
202
+#
203
+# mods: Control|Shift
204
+#
205
+# The parser is currently quite sensitive to whitespace and capitalization -
206
+# capitalization must match exactly, and piped items must not have whitespace
207
+# around them.
208
+#
209
+# Either an `action`, `chars`, or `command` field must be present.
210
+#   `action` must be one of `Paste`, `PasteSelection`, `Copy`, or `Quit`.
211
+#   `chars` writes the specified string every time that binding is activated.
212
+#     These should generally be escape sequences, but they can be configured to
213
+#     send arbitrary strings of bytes.
214
+#   `command` must be a map containing a `program` string, and `args` array of
215
+#     strings. For example:
216
+#     - { ... , command: { program: "alacritty", args: ["-e", "vttest"] } }
217
+key_bindings:
218
+  - { key: N,        mods: Command, command: { program: "open", args: ["-n", "/Applications/Alacritty.app"] } }
219
+  - { key: V,        mods: Command, action: Paste                        }
220
+  - { key: C,        mods: Command, action: Copy                         }
221
+  - { key: Q,        mods: Command, action: Quit                         }
222
+  - { key: W,        mods: Command, action: Quit                         }
223
+  - { key: Home,                    chars: "\x1bOH",   mode: AppCursor   }
224
+  - { key: Home,                    chars: "\x1b[H",   mode: ~AppCursor  }
225
+  - { key: End,                     chars: "\x1bOF",   mode: AppCursor   }
226
+  - { key: End,                     chars: "\x1b[F",   mode: ~AppCursor  }
227
+  - { key: Key0,     mods: Command, action: ResetFontSize                }
228
+  - { key: Equals,   mods: Command, action: IncreaseFontSize             }
229
+  - { key: Minus,    mods: Command, action: DecreaseFontSize             }
230
+  - { key: PageUp,   mods: Shift,   chars: "\x1b[5;2~"                   }
231
+  - { key: PageUp,   mods: Control, chars: "\x1b[5;5~"                   }
232
+  - { key: PageUp,                  chars: "\x1b[5~"                     }
233
+  - { key: PageDown, mods: Shift,   chars: "\x1b[6;2~"                   }
234
+  - { key: PageDown, mods: Control, chars: "\x1b[6;5~"                   }
235
+  - { key: PageDown,                chars: "\x1b[6~"                     }
236
+  - { key: Tab,      mods: Shift,   chars: "\x1b[Z"                      }
237
+  - { key: Back,                    chars: "\x7f"                        }
238
+  - { key: Back,     mods: Alt,     chars: "\x1b\x7f"                    }
239
+  - { key: Insert,                  chars: "\x1b[2~"                     }
240
+  - { key: Delete,                  chars: "\x1b[3~"                     }
241
+  - { key: Left,     mods: Shift,   chars: "\x1b[1;2D"                   }
242
+  - { key: Left,     mods: Control, chars: "\x1b[1;5D"                   }
243
+  - { key: Left,     mods: Alt,     chars: "\x1b[1;3D"                   }
244
+  - { key: Left,                    chars: "\x1b[D",   mode: ~AppCursor  }
245
+  - { key: Left,                    chars: "\x1bOD",   mode: AppCursor   }
246
+  - { key: Right,    mods: Shift,   chars: "\x1b[1;2C"                   }
247
+  - { key: Right,    mods: Control, chars: "\x1b[1;5C"                   }
248
+  - { key: Right,    mods: Alt,     chars: "\x1b[1;3C"                   }
249
+  - { key: Right,                   chars: "\x1b[C",   mode: ~AppCursor  }
250
+  - { key: Right,                   chars: "\x1bOC",   mode: AppCursor   }
251
+  - { key: Up,       mods: Shift,   chars: "\x1b[1;2A"                   }
252
+  - { key: Up,       mods: Control, chars: "\x1b[1;5A"                   }
253
+  - { key: Up,       mods: Alt,     chars: "\x1b[1;3A"                   }
254
+  - { key: Up,                      chars: "\x1b[A",   mode: ~AppCursor  }
255
+  - { key: Up,                      chars: "\x1bOA",   mode: AppCursor   }
256
+  - { key: Down,     mods: Shift,   chars: "\x1b[1;2B"                   }
257
+  - { key: Down,     mods: Control, chars: "\x1b[1;5B"                   }
258
+  - { key: Down,     mods: Alt,     chars: "\x1b[1;3B"                   }
259
+  - { key: Down,                    chars: "\x1b[B",   mode: ~AppCursor  }
260
+  - { key: Down,                    chars: "\x1bOB",   mode: AppCursor   }
261
+  - { key: F1,                      chars: "\x1bOP"                      }
262
+  - { key: F2,                      chars: "\x1bOQ"                      }
263
+  - { key: F3,                      chars: "\x1bOR"                      }
264
+  - { key: F4,                      chars: "\x1bOS"                      }
265
+  - { key: F5,                      chars: "\x1b[15~"                    }
266
+  - { key: F6,                      chars: "\x1b[17~"                    }
267
+  - { key: F7,                      chars: "\x1b[18~"                    }
268
+  - { key: F8,                      chars: "\x1b[19~"                    }
269
+  - { key: F9,                      chars: "\x1b[20~"                    }
270
+  - { key: F10,                     chars: "\x1b[21~"                    }
271
+  - { key: F11,                     chars: "\x1b[23~"                    }
272
+  - { key: F12,                     chars: "\x1b[24~"                    }
273
+  - { key: F1,       mods: Shift,   chars: "\x1b[1;2P"                   }
274
+  - { key: F2,       mods: Shift,   chars: "\x1b[1;2Q"                   }
275
+  - { key: F3,       mods: Shift,   chars: "\x1b[1;2R"                   }
276
+  - { key: F4,       mods: Shift,   chars: "\x1b[1;2S"                   }
277
+  - { key: F5,       mods: Shift,   chars: "\x1b[15;2~"                  }
278
+  - { key: F6,       mods: Shift,   chars: "\x1b[17;2~"                  }
279
+  - { key: F7,       mods: Shift,   chars: "\x1b[18;2~"                  }
280
+  - { key: F8,       mods: Shift,   chars: "\x1b[19;2~"                  }
281
+  - { key: F9,       mods: Shift,   chars: "\x1b[20;2~"                  }
282
+  - { key: F10,      mods: Shift,   chars: "\x1b[21;2~"                  }
283
+  - { key: F11,      mods: Shift,   chars: "\x1b[23;2~"                  }
284
+  - { key: F12,      mods: Shift,   chars: "\x1b[24;2~"                  }
285
+  - { key: F1,       mods: Control, chars: "\x1b[1;5P"                   }
286
+  - { key: F2,       mods: Control, chars: "\x1b[1;5Q"                   }
287
+  - { key: F3,       mods: Control, chars: "\x1b[1;5R"                   }
288
+  - { key: F4,       mods: Control, chars: "\x1b[1;5S"                   }
289
+  - { key: F5,       mods: Control, chars: "\x1b[15;5~"                  }
290
+  - { key: F6,       mods: Control, chars: "\x1b[17;5~"                  }
291
+  - { key: F7,       mods: Control, chars: "\x1b[18;5~"                  }
292
+  - { key: F8,       mods: Control, chars: "\x1b[19;5~"                  }
293
+  - { key: F9,       mods: Control, chars: "\x1b[20;5~"                  }
294
+  - { key: F10,      mods: Control, chars: "\x1b[21;5~"                  }
295
+  - { key: F11,      mods: Control, chars: "\x1b[23;5~"                  }
296
+  - { key: F12,      mods: Control, chars: "\x1b[24;5~"                  }
297
+  - { key: F1,       mods: Alt,     chars: "\x1b[1;6P"                   }
298
+  - { key: F2,       mods: Alt,     chars: "\x1b[1;6Q"                   }
299
+  - { key: F3,       mods: Alt,     chars: "\x1b[1;6R"                   }
300
+  - { key: F4,       mods: Alt,     chars: "\x1b[1;6S"                   }
301
+  - { key: F5,       mods: Alt,     chars: "\x1b[15;6~"                  }
302
+  - { key: F6,       mods: Alt,     chars: "\x1b[17;6~"                  }
303
+  - { key: F7,       mods: Alt,     chars: "\x1b[18;6~"                  }
304
+  - { key: F8,       mods: Alt,     chars: "\x1b[19;6~"                  }
305
+  - { key: F9,       mods: Alt,     chars: "\x1b[20;6~"                  }
306
+  - { key: F10,      mods: Alt,     chars: "\x1b[21;6~"                  }
307
+  - { key: F11,      mods: Alt,     chars: "\x1b[23;6~"                  }
308
+  - { key: F12,      mods: Alt,     chars: "\x1b[24;6~"                  }
309
+  - { key: F1,       mods: Command, chars: "\x1b[1;3P"                   }
310
+  - { key: F2,       mods: Command, chars: "\x1b[1;3Q"                   }
311
+  - { key: F3,       mods: Command, chars: "\x1b[1;3R"                   }
312
+  - { key: F4,       mods: Command, chars: "\x1b[1;3S"                   }
313
+  - { key: F5,       mods: Command, chars: "\x1b[15;3~"                  }
314
+  - { key: F6,       mods: Command, chars: "\x1b[17;3~"                  }
315
+  - { key: F7,       mods: Command, chars: "\x1b[18;3~"                  }
316
+  - { key: F8,       mods: Command, chars: "\x1b[19;3~"                  }
317
+  - { key: F9,       mods: Command, chars: "\x1b[20;3~"                  }
318
+  - { key: F10,      mods: Command, chars: "\x1b[21;3~"                  }
319
+  - { key: F11,      mods: Command, chars: "\x1b[23;3~"                  }
320
+  - { key: F12,      mods: Command, chars: "\x1b[24;3~"                  }
321
+

+ 22
- 0
.ctags View File

@@ -0,0 +1,22 @@
1
+--recurse=yes
2
+--tag-relative=yes
3
+--exclude=.git
4
+--exclude=*.min.*
5
+--exclude=*.pack.js
6
+
7
+--langdef=Clojure
8
+--langmap=Clojure:.clj
9
+--langmap=Clojure:+.cljx
10
+--langmap=Clojure:+.cljs
11
+--regex-clojure=/\([ \t]*create-ns[ \t]+([-[:alnum:]*+!_:\/.?]+)/\1/n,namespace/
12
+--regex-clojure=/\([ \t]*def[ \t]+([-[:alnum:]*+!_:\/.?]+)/\1/d,definition/
13
+--regex-clojure=/\([ \t]*defn[ \t]+([-[:alnum:]*+!_:\/.?]+)/\1/f,function/
14
+--regex-clojure=/\([ \t]*defn-[ \t]+([-[:alnum:]*+!_:\/.?]+)/\1/p,private function/
15
+--regex-clojure=/\([ \t]*defmacro[ \t]+([-[:alnum:]*+!_:\/.?]+)/\1/m,macro/
16
+--regex-clojure=/\([ \t]*definline[ \t]+([-[:alnum:]*+!_:\/.?]+)/\1/i,inline/
17
+--regex-clojure=/\([ \t]*defmulti[ \t]+([-[:alnum:]*+!_:\/.?]+)/\1/a,multimethod definition/
18
+--regex-clojure=/\([ \t]*defmethod[ \t]+([-[:alnum:]*+!_:\/.?]+)/\1/b,multimethod instance/
19
+--regex-clojure=/\([ \t]*defonce[ \t]+([-[:alnum:]*+!_:\/.?]+)/\1/c,definition (once)/
20
+--regex-clojure=/\([ \t]*defstruct[ \t]+([-[:alnum:]*+!_:\/.?]+)/\1/s,struct/
21
+--regex-clojure=/\([ \t]*intern[ \t]+([-[:alnum:]*+!_:\/.?]+)/\1/v,intern/
22
+--regex-clojure=/\([ \t]*ns[ \t]+([-[:alnum:]*+!_:\/.?]+)/\1/n,namespace/

+ 0
- 9
.khdrc View File

@@ -135,12 +135,3 @@ ctrl + alt - s : chunkc tiling::desktop --layout monocle
135 135
 ctrl + alt - d : chunkc tiling::desktop --layout float
136 136
 
137 137
 ctrl + alt - w : chunkc tiling::desktop --deserialize ~/.chunkwm_layouts/dev_1
138
-
139
-# remap caps-lock to escape for this config only !!!
140
-# macos sierra can also perform this remap for a given keyboard
141
-- capslock : khd -p "- escape"
142
-
143
-# key remap for norwegian layout \ { }
144
-cmd - 7 : khd -p "shift + alt - 7"
145
-cmd - 8 : khd -p "shift + alt - 8"
146
-cmd - 9 : khd -p "shift + alt - 9"

+ 138
- 105
.nvimrc View File

@@ -1,65 +1,90 @@
1
-set nocompatible
2
-filetype off
3
-
4
-" Leader key
5
-let mapleader = ","
1
+" Load vim-plug if it's not found
2
+if empty(glob("~/.vim/autoload/plug.vim"))
3
+	execute 'curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
4
+endif
6 5
 
7 6
 set rtp+=/usr/local/opt/fzf
8
-set rtp+=~/.vim/bundle/Vundle.vim
9
-call vundle#begin()
10
-
11
-Plugin 'VundleVim/Vundle.vim'
12
-Plugin 'tpope/vim-fugitive'
13
-Plugin 'tpope/vim-fireplace'
14
-Plugin 'venantius/vim-eastwood'
15
-Plugin 'morhetz/gruvbox'
16
-Plugin 'yuttie/comfortable-motion.vim'
17
-Plugin 'fisadev/FixedTaskList.vim'
18
-Plugin 'nathanaelkane/vim-indent-guides'
19
-Plugin 'luochen1990/rainbow'
20
-Plugin 'tpope/vim-surround'
21
-Plugin 'godlygeek/tabular'
22
-Plugin 'bhurlow/vim-parinfer'
23
-Plugin 'rosenfeld/conque-term'
24
-Plugin 'scrooloose/nerdcommenter'
25
-Plugin 'junegunn/fzf.vim'
26
-Plugin 'majutsushi/tagbar'
27
-
28
-call vundle#end()
29
-filetype plugin on
30 7
 
31
-set hidden
32
-
33
-nnoremap ' `
34
-nnoremap ` '
8
+call plug#begin('~/.vim/plugged')
9
+
10
+Plug 'AndrewRadev/sideways.vim'
11
+Plug 'bhurlow/vim-parinfer'
12
+Plug 'cespare/vim-toml', { 'for': 'toml' }
13
+Plug 'chrisbra/NrrwRgn'
14
+Plug 'fisadev/FixedTaskList.vim'
15
+Plug 'gcmt/wildfire.vim'
16
+Plug 'godlygeek/tabular'
17
+Plug 'haya14busa/vim-signjk-motion'
18
+Plug 'iamcco/markdown-preview.vim', { 'for': 'markdown' }
19
+Plug 'junegunn/fzf.vim'
20
+Plug 'luochen1990/rainbow'
21
+Plug 'machakann/vim-sandwich'
22
+Plug 'majutsushi/tagbar'
23
+Plug 'morhetz/gruvbox'
24
+Plug 'nathanaelkane/vim-indent-guides'
25
+Plug 'rosenfeld/conque-term'
26
+Plug 'scrooloose/nerdcommenter'
27
+Plug 'soramugi/auto-ctags.vim'
28
+Plug 'tpope/vim-fireplace', { 'for': 'clojure' }
29
+Plug 'tpope/vim-fugitive'
30
+Plug 'venantius/vim-eastwood', { 'for': 'clojure' }
31
+Plug 'vim-scripts/ReplaceWithRegister'
32
+Plug 'yuttie/comfortable-motion.vim'
33
+
34
+call plug#end()
35
+filetype plugin indent on
36
+runtime macros/matchit.vim
35 37
 
38
+syntax enable 
39
+set hidden
36 40
 set title
37
-
38 41
 set history=1000
39
-" Gruvbox
42
+
43
+" theme / colors
40 44
 set background=dark
41
-" let g:gruvbox_italic = 1
42 45
 colorscheme gruvbox
46
+set termguicolors
43 47
 
44
-filetype plugin indent on
45
-runtime macros/matchit.vim
48
+set scrolloff=3
46 49
 
47
-" Get out of insert mode with jj 
48
-inoremap jj <Esc>
50
+" Cursor position
51
+set ruler
49 52
 
50
-syntax enable 
51
-syntax on
52
-" set t_co=256
53
-set termguicolors
53
+" Line Numbers
54
+set number
54 55
 
55
-" Fast Saving
56
-nmap <leader>w :w!<cr>
56
+" make backspace behave
57
+set backspace=eol,start,indent
58
+set whichwrap+=<,>
57 59
 
58
-" Fast Save+Quit
59
-nmap <leader>x :wq<cr>
60
+set magic
60 61
 
61
-set scrolloff=3
62
+set showmatch
63
+set mat=2
64
+
65
+" tab behavior
66
+set tabstop=2
67
+set shiftwidth=2
68
+set expandtab
69
+set smarttab "paste correctly
70
+
71
+" searching
72
+set hls "highlight search
73
+set is "incsearch
74
+set ignorecase " Ignore case when searching...
75
+set smartcase  " Except when starting with a capital
76
+
77
+" Quick timeouts on key combinations.
78
+set timeoutlen=300
79
+
80
+set shortmess=atIwmfl
62 81
 
82
+"""
83
+""" Variables for plugins
84
+"""
85
+
86
+" Rainbow brackets/parens
87
+let g:rainbow_active = 1
63 88
 
64 89
 let g:fzf_tags_command = 'ctags --extra=+f -R'
65 90
 let g:fzf_colors =
@@ -76,62 +101,69 @@ let g:fzf_colors =
76 101
   \ 'spinner': ['fg', 'Label'],
77 102
   \ 'header':  ['fg', 'Comment'] }
78 103
 
79
-nmap <Leader>t :Tags<CR>
80
-nmap <Leader>b :Buffers<CR>
81
-nmap <c-p> :Files<cr>
82
-" Ctrl-P
83
-"let g:ctrlp_map = '<c-p>'
84
-"let g:ctrlp_cmd = 'CtrlP'
85
-"let g:ctrlp_working_path_mode = 'ra'
104
+" Disable arrow movement, resize splits instead.
105
+let g:elite_mode = 1
106
+if get(g:, 'elite_mode')
107
+	nnoremap <Up>    :resize +2<CR>
108
+	nnoremap <Down>  :resize -2<CR>
109
+	nnoremap <Left>  :vertical resize +2<CR>
110
+	nnoremap <Right> :vertical resize -2<CR>
111
+endif
86 112
 
87
-nnoremap <C-e> 3<C-e>
88
-nnoremap <C-y> 3<C-y>
113
+let g:comfortable_motion_scroll_down_key = "j"
114
+let g:comfortable_motion_scroll_up_key = "k"  
89 115
 
90
-set ruler
116
+" auto-ctags options
117
+let g:auto_ctags = 1
118
+let g:auto_ctags_directory_list = ['.git']
91 119
 
92
-" Line Numbers
93
-set number
120
+let g:wildfire_objects = {
121
+  \ "*" : ["i'", 'i"', "i)", "i]", "i}"],
122
+  \ "html,xml" : ["at", "it"],
123
+\ }
124
+"for appending types to * rather than excluding: https://github.com/gcmt/wildfire.vim
94 125
 
95
-" Rainbow brackets/parens
96
-let g:rainbow_active = 1
126
+"stellar var name
127
+let g:mkdp_path_to_chrome = "open -F -n -a Google\\ Chrome"
97 128
 
98
-" 7 lines to the cursor when moving vertically using j/k
99
-" set so=7
129
+"""
130
+""" Key remapping
131
+"""
100 132
 
101
-set backspace=eol,start,indent
102
-set whichwrap+=<,>,h,l
133
+" Leader key
134
+let mapleader = ","
103 135
 
104
-set magic
136
+" signjk 
137
+nmap <Leader>j <Plug>(signjk-j)
138
+nmap <Leader>k <Plug>(signjk-k)
105 139
 
106
-set showmatch
107
-set mat=2
140
+" ease of access
141
+nnoremap ' `
142
+nnoremap ` '
108 143
 
109
-vmap <Tab> >gv
110
-vmap <S-Tab> <gv
144
+" Get out of insert mode with jj 
145
+inoremap jj <Esc>
111 146
 
112
-set tabstop=2
113
-set softtabstop=0
114
-set expandtab
115
-set shiftwidth=2
116
-set smarttab
117
-" set cursorline
118
-set hls is
147
+" Fast Saving
148
+nmap <leader>w :w!<cr>
119 149
 
120
-" clear search highlight
121
-" nnoremap <silent> <C-l><C-l> :nohl<CR><C-l>
122
-nnoremap <silent> <Leader>l :nohl<CR>
150
+" Fast Save+Quit
151
+nmap <leader>x :wq<cr>
123 152
 
124
-" Quick timeouts on key combinations.
125
-set timeoutlen=300
153
+" fast fuzzy searching
154
+nmap <Leader>t :Tags<CR>
155
+nmap <Leader>b :Buffers<CR>
156
+nmap <c-p> :Files<cr>
126 157
 
127
-set shortmess=atI
158
+" push window up/down
159
+nnoremap <C-e> 3<C-e>
160
+nnoremap <C-y> 3<C-y>
128 161
 
129
-set incsearch
130
-set ignorecase " Ignore case when searching...
131
-set smartcase  " Except when starting with a capital
162
+" clear search highlight
163
+nnoremap <silent> <C-l><C-l> :nohl<CR><C-l>
132 164
 
133
-" NerdTree
134
-map <F2> :NERDTreeToggle<CR>
165
+vmap <Tab> >gv
166
+vmap <S-Tab> <gv
135 167
 
136 168
 " Tabularize
137 169
 nmap <Leader>a= :Tabularize /=<CR>
@@ -154,36 +186,34 @@ nmap <silent> <Leader><Leader> V
154 186
 vmap <Leader><Leader> <Esc>
155 187
 
156 188
 " When pressing <leader>cd switch to the directory of the open buffer
157
-map <Leader>cd :lcd %:p:h<CR>:pwd<CR>
189
+nmap <Leader>cd :lcd %:p:h<CR>:pwd<CR>
158 190
 
159 191
 " Use backspace key for matchit.vim
160 192
 nmap <BS> %
161 193
 xmap <BS> %
162 194
 
163
-" Disable arrow movement, resize splits instead.
195
+" Session stuff
196
+nnoremap <leader>ss :call MakeSession()<cr>
197
+nnoremap <leader>sl :call LoadSession()<cr>
164 198
 
165
-let g:elite_mode = 1
166
-if get(g:, 'elite_mode')
167
-	nnoremap <Up>    :resize +2<CR>
168
-	nnoremap <Down>  :resize -2<CR>
169
-	nnoremap <Left>  :vertical resize +2<CR>
170
-	nnoremap <Right> :vertical resize -2<CR>
171
-endif
199
+" tagbar
200
+nnoremap <silent> <c-b> :TagbarToggle<CR>
201
+
202
+" sideways plugin
203
+nnoremap <c-h> :SidewaysLeft<cr>
204
+nnoremap <c-l> :SidewaysRight<cr>
205
+
206
+" This selects the next closest text object.
207
+nmap <SPACE> <Plug>(wildfire-fuel)
208
+" This selects the previous closest text object.
209
+vmap <C-SPACE> <Plug>(wildfire-water)
172 210
 
173
-let g:comfortable_motion_scroll_down_key = "j"
174
-let g:comfortable_motion_scroll_up_key = "k"  
175 211
 " Autoset slang -> slim syntax highlighting
176 212
 au BufRead,BufNewFile *.slang set filetype=slim
177 213
 
178 214
 " Autoset ecr -> erb syntax highlighting
179 215
 au BufRead,BufNewFile *.ecr set filetype=erb
180 216
 
181
-" Session stuff
182
-nnoremap <leader>ss :call MakeSession()<cr>
183
-nnoremap <leader>sl :call LoadSession()<cr>
184
-
185
-" tagbar
186
-nnoremap <silent> <c-b> :TagbarToggle<CR>
187 217
 
188 218
 " Clojure
189 219
 " au Filetype clojure nmap <c-c><c-k> :Require<cr>  
@@ -226,3 +256,6 @@ augroup autosourcing
226 256
         au VimLeave * :call MakeSession()
227 257
     endif
228 258
 augroup END
259
+
260
+" FZF :Find
261
+command! -bang -nargs=* Find call fzf#vim#grep('rg --column --line-number --no-heading --fixed-strings --ignore-case --no-ignore --hidden --follow --glob "!.git/*" --color "always" '.shellescape(<q-args>).'| tr -d "\017"', 1, <bang>0)

+ 7
- 0
zsh/aliases.zsh View File

@@ -12,4 +12,11 @@ alias dcu="docker-compose up"
12 12
 alias dcd="docker-compose down"
13 13
 alias dcb="docker-compose build"
14 14
 
15
+# ctags
15 16
 alias ctags="`brew --prefix`/bin/ctags -f ./.git/tags"
17
+
18
+# alacritty
19
+alias a="open -n /Applications/Alacritty.app"
20
+
21
+#kitty
22
+alias kitty="python3 /Users/andrew/Desktop/Sync/_programming/C/kitty &"

+ 5
- 2
zsh/exports.zsh View File

@@ -4,8 +4,7 @@
4 4
 export ZSH=/Users/andrew/.oh-my-zsh
5 5
 export UPDATE_ZSH_DAYS=1
6 6
 
7
-# If you come from bash you might have to change your $PATH.
8
-# export PATH=$HOME/bin:/usr/local/bin:$PATH
7
+export PATH=$HOME/.cargo/bin:$PATH
9 8
 
10 9
 # Custom
11 10
 ########
@@ -40,4 +39,8 @@ export PKG_CONFIG_PATH=/usr/local/opt/openssl/lib/pkgconfig
40 39
 # Apps
41 40
 #########
42 41
 
42
+# local db testing
43 43
 export MAIN_SITE_DB_URL="postgres://kemalyst:kemalyst@localhost:5432/main_site_dev"
44
+
45
+# Vim FZF
46
+export FZF_DEFAULT_COMMAND='rg --files --no-ignore --hidden --follow --glob "!.git/*"'

+ 4
- 2
zsh/functions.zsh View File

@@ -20,6 +20,7 @@ function extract {
20 20
   fi
21 21
 }
22 22
 
23
+# move files to trash instead of rm
23 24
 function trash () {
24 25
   local path
25 26
   for path in "$@"; do
@@ -64,6 +65,9 @@ function v() {
64 65
 	fi;
65 66
 }
66 67
 
68
+# SOURCES
69
+# https://github.com/mathiasbynens/dotfiles/blob/master/.functions
70
+
67 71
 
68 72
 # transfer.sh alias
69 73
 transfer() { if [ $# -eq 0 ]; then echo -e "No arguments specified. Usage:\necho transfer /tmp/test.md\ncat /tmp/test.md | transfer test.md"; return 1; fi 
@@ -77,5 +81,3 @@ function tre() {
77 81
 	tree -aC -I '.git|node_modules|bower_components' --dirsfirst "$@"
78 82
 }
79 83
 
80
-# SOURCES
81
-# https://github.com/mathiasbynens/dotfiles/blob/master/.functions

Loading…
Cancel
Save