├── Xresources ├── aliases.local ├── config ├── i3 │ └── config ├── i3status │ └── config ├── picom.conf └── termite │ └── config ├── gitconfig.local ├── tmux.conf.local ├── vim ├── after │ ├── ftplugin │ │ ├── eruby.vim │ │ ├── haskell.vim │ │ └── ruby.vim │ └── indent │ │ └── html.vim └── plugin │ ├── cd.vim │ ├── copyrtf.vim │ ├── git.vim │ └── mergetabs.vim ├── vimrc.bundles.local └── vimrc.local /Xresources: -------------------------------------------------------------------------------- 1 | Xft.dpi: 96 2 | 3 | xterm*faceName: xft:Inconsolata:size=14 4 | 5 | URxvt*font: xft:Inconsolata:size=14,xft:Noto Emoji:size=14 6 | URxvt*urlLauncher: chromium 7 | URxvt*borderLess: false 8 | URxvt*internalBorder: 0 9 | 10 | URxvt.perl-ext-common: default,clipboard,url-picker 11 | URxvt.keysym.M-u: perl:url-picker 12 | 13 | URxvt.iso14755: false 14 | URxvt.iso14755_52: false 15 | 16 | URxvt*scrollBar: false 17 | URxvt*scrollTtyOutput: false 18 | URxvt*scrollWithBuffer: true 19 | URxvt*scrollTtyKeypress: true 20 | URxvt*saveLines: 5000 21 | 22 | Xft*autohint: 0 23 | Xft*lcdfilter: lcddefault 24 | Xft*hintstyle: hintfull 25 | Xft*hinting: 1 26 | Xft*antialias: 1 27 | Xft*rgba: rgb 28 | URxvt*letterSpace: -1 29 | -------------------------------------------------------------------------------- /aliases.local: -------------------------------------------------------------------------------- 1 | alias s=rspec 2 | alias migrate="rake db:migrate db:test:prepare" 3 | alias remigrate="rake db:migrate && rake db:rollback && rake db:migrate && rake db:test:prepare" 4 | alias pm="sudo pacman" 5 | alias pms="sudo pacman -S --needed" 6 | alias sc="sudo systemctl" 7 | alias dc="docker-compose" 8 | alias brew="echo brew" 9 | alias launchctl="echo launchctl" 10 | alias xclipi="xclip -in -selection CLIPBOARD" 11 | alias vim='vim --servername $(basename $(pwd))' 12 | -------------------------------------------------------------------------------- /config/i3/config: -------------------------------------------------------------------------------- 1 | set $mod Mod1 2 | 3 | font pango:DejaVu Sans Mono 8 4 | 5 | floating_modifier $mod 6 | 7 | bindsym $mod+Return exec termite 8 | 9 | bindsym $mod+Shift+q kill 10 | 11 | bindsym $mod+Shift+y exec "$HOME/.bin/lockscreen" 12 | 13 | bindsym $mod+d exec i3-dmenu-desktop 14 | bindsym $mod+shift+d exec --no-startup-id dmenu_run 15 | 16 | bindsym $mod+h focus left 17 | bindsym $mod+j focus down 18 | bindsym $mod+k focus up 19 | bindsym $mod+l focus right 20 | 21 | bindsym $mod+Shift+h move left 22 | bindsym $mod+Shift+j move down 23 | bindsym $mod+Shift+k move up 24 | bindsym $mod+Shift+l move right 25 | 26 | bindsym $mod+space split toggle 27 | 28 | bindsym $mod+f fullscreen toggle 29 | 30 | bindsym $mod+s layout stacking 31 | bindsym $mod+t layout tabbed 32 | bindsym $mod+e layout toggle split 33 | 34 | bindsym $mod+Shift+space floating toggle 35 | 36 | bindsym $mod+a focus mode_toggle 37 | 38 | bindsym $mod+p focus parent 39 | bindsym $mod+c focus child 40 | 41 | bindsym $mod+1 workspace 1 42 | bindsym $mod+2 workspace 2 43 | bindsym $mod+3 workspace 3 44 | bindsym $mod+4 workspace 4 45 | bindsym $mod+5 workspace 5 46 | bindsym $mod+6 workspace 6 47 | bindsym $mod+7 workspace 7 48 | bindsym $mod+8 workspace 8 49 | bindsym $mod+9 workspace 9 50 | bindsym $mod+0 workspace 10 51 | 52 | bindsym $mod+Shift+1 move container to workspace 1 53 | bindsym $mod+Shift+2 move container to workspace 2 54 | bindsym $mod+Shift+3 move container to workspace 3 55 | bindsym $mod+Shift+4 move container to workspace 4 56 | bindsym $mod+Shift+5 move container to workspace 5 57 | bindsym $mod+Shift+6 move container to workspace 6 58 | bindsym $mod+Shift+7 move container to workspace 7 59 | bindsym $mod+Shift+8 move container to workspace 8 60 | bindsym $mod+Shift+9 move container to workspace 9 61 | bindsym $mod+Shift+0 move container to workspace 10 62 | 63 | bindsym $mod+Shift+c reload 64 | bindsym $mod+Shift+r restart 65 | 66 | bar { 67 | status_command i3status 68 | tray_padding 0 69 | output primary 70 | } 71 | 72 | hide_edge_borders both 73 | focus_on_window_activation focus 74 | 75 | exec --no-startup-id nm-applet 76 | exec --no-startup-id pasystray 77 | exec_always --no-startup-id feh --bg-fill ~/.background.jpg 78 | exec_always --no-startup-id picom 79 | 80 | bindsym $mod+shift+w move workspace to output left 81 | bindsym $mod+shift+e move workspace to output right 82 | 83 | bindsym $mod+x exec --no-startup-id "$HOME/.bin/update-xrandr" 84 | 85 | bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -2% 86 | bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +2% 87 | bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle 88 | 89 | mode "focus" { 90 | bindsym b [class="(?i)chromium"] focus; mode "default" 91 | bindsym s [class="(?i)slack"] focus; mode "default" 92 | bindsym m [class="(?i)spotify"] focus; mode "default" 93 | bindsym Escape mode "default" 94 | } 95 | 96 | bindsym $mod+apostrophe mode "focus" 97 | -------------------------------------------------------------------------------- /config/i3status/config: -------------------------------------------------------------------------------- 1 | # It is important that this file is edited as UTF-8. 2 | # The following line should contain a sharp s: 3 | # ß 4 | # If the above line is not correctly displayed, fix your editor first! 5 | 6 | general { 7 | colors = true 8 | interval = 5 9 | } 10 | 11 | order += "battery all" 12 | order += "tztime local" 13 | 14 | wireless _first_ { 15 | format_up = "%essid" 16 | format_down = "W: down" 17 | } 18 | 19 | battery all { 20 | format = "%status %percentage " 21 | hide_seconds = true 22 | integer_battery_capacity = true 23 | last_full_capacity = true 24 | status_chr = "⚡" 25 | status_full = "⚡" 26 | status_bat = "🔋" 27 | low_threshold = 60 28 | threshold_type = "time" 29 | } 30 | 31 | tztime local { 32 | format = "🕐%l:%M " 33 | } 34 | -------------------------------------------------------------------------------- /config/picom.conf: -------------------------------------------------------------------------------- 1 | # Thank you code_nomad: http://9m.no/ꪯ鵞 2 | # and Arch Wiki contributors: https://wiki.archlinux.org/index.php/Compton 3 | 4 | ################################# 5 | # 6 | # Backend 7 | # 8 | ################################# 9 | 10 | # Backend to use: "xrender" or "glx". 11 | # GLX backend is typically much faster but depends on a sane driver. 12 | backend = "glx"; 13 | 14 | ################################# 15 | # 16 | # GLX backend 17 | # 18 | ################################# 19 | 20 | glx-no-stencil = true; 21 | 22 | # GLX backend: Copy unmodified regions from front buffer instead of redrawing them all. 23 | # My tests with nvidia-drivers show a 10% decrease in performance when the whole screen is modified, 24 | # but a 20% increase when only 1/4 is. 25 | # My tests on nouveau show terrible slowdown. 26 | glx-copy-from-front = false; 27 | 28 | # GLX backend: Use MESA_copy_sub_buffer to do partial screen update. 29 | # My tests on nouveau shows a 200% performance boost when only 1/4 of the screen is updated. 30 | # May break VSync and is not available on some drivers. 31 | # Overrides --glx-copy-from-front. 32 | # glx-use-copysubbuffermesa = true; 33 | 34 | # GLX backend: Avoid rebinding pixmap on window damage. 35 | # Probably could improve performance on rapid window content changes, but is known to break things on some drivers (LLVMpipe). 36 | # Recommended if it works. 37 | # glx-no-rebind-pixmap = true; 38 | 39 | # GLX backend: GLX buffer swap method we assume. 40 | # Could be undefined (0), copy (1), exchange (2), 3-6, or buffer-age (-1). 41 | # undefined is the slowest and the safest, and the default value. 42 | # copy is fastest, but may fail on some drivers, 43 | # 2-6 are gradually slower but safer (6 is still faster than 0). 44 | # Usually, double buffer means 2, triple buffer means 3. 45 | # buffer-age means auto-detect using GLX_EXT_buffer_age, supported by some drivers. 46 | # Useless with --glx-use-copysubbuffermesa. 47 | # Partially breaks --resize-damage. 48 | # Defaults to undefined. 49 | #glx-swap-method = "undefined"; 50 | 51 | ################################# 52 | # 53 | # Shadows 54 | # 55 | ################################# 56 | 57 | # Enabled client-side shadows on windows. 58 | shadow = true; 59 | # The blur radius for shadows. (default 12) 60 | shadow-radius = 5; 61 | # The left offset for shadows. (default -15) 62 | shadow-offset-x = -5; 63 | # The top offset for shadows. (default -15) 64 | shadow-offset-y = -5; 65 | # The translucency for shadows. (default .75) 66 | shadow-opacity = 0.5; 67 | 68 | # Set if you want different colour shadows 69 | # shadow-red = 0.0; 70 | # shadow-green = 0.0; 71 | # shadow-blue = 0.0; 72 | 73 | # The shadow exclude options are helpful if you have shadows enabled. Due to the way picom draws its shadows, certain applications will have visual glitches 74 | # (most applications are fine, only apps that do weird things with xshapes or argb are affected). 75 | # This list includes all the affected apps I found in my testing. The "! name~=''" part excludes shadows on any "Unknown" windows, this prevents a visual glitch with the XFWM alt tab switcher. 76 | shadow-exclude = [ 77 | "! name~=''", 78 | "name = 'Notification'", 79 | "name = 'Plank'", 80 | "name = 'Docky'", 81 | "name = 'Kupfer'", 82 | "name = 'xfce4-notifyd'", 83 | "name *= 'VLC'", 84 | "name *= 'compton'", 85 | "name *= 'picom'", 86 | "name *= 'Chromium'", 87 | "name *= 'Chrome'", 88 | "class_g = 'Firefox' && argb", 89 | "class_g = 'Conky'", 90 | "class_g = 'Kupfer'", 91 | "class_g = 'Synapse'", 92 | "class_g ?= 'Notify-osd'", 93 | "class_g ?= 'Cairo-dock'", 94 | "class_g ?= 'Xfce4-notifyd'", 95 | "class_g ?= 'Xfce4-power-manager'", 96 | "_GTK_FRAME_EXTENTS@:c", 97 | "_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'" 98 | ]; 99 | # Avoid drawing shadow on all shaped windows (see also: --detect-rounded-corners) 100 | shadow-ignore-shaped = false; 101 | 102 | ################################# 103 | # 104 | # Opacity 105 | # 106 | ################################# 107 | 108 | inactive-opacity = 1; 109 | active-opacity = 1; 110 | frame-opacity = 1; 111 | inactive-opacity-override = false; 112 | 113 | # Dim inactive windows. (0.0 - 1.0) 114 | # inactive-dim = 0.2; 115 | # Do not let dimness adjust based on window opacity. 116 | # inactive-dim-fixed = true; 117 | # Blur background of transparent windows. Bad performance with X Render backend. GLX backend is preferred. 118 | # blur-background = true; 119 | # Blur background of opaque windows with transparent frames as well. 120 | # blur-background-frame = true; 121 | # Do not let blur radius adjust based on window opacity. 122 | blur-background-fixed = false; 123 | blur-background-exclude = [ 124 | "window_type = 'dock'", 125 | "window_type = 'desktop'" 126 | ]; 127 | 128 | ################################# 129 | # 130 | # Fading 131 | # 132 | ################################# 133 | 134 | # Fade windows during opacity changes. 135 | fading = true; 136 | # The time between steps in a fade in milliseconds. (default 10). 137 | fade-delta = 4; 138 | # Opacity change between steps while fading in. (default 0.028). 139 | fade-in-step = 0.03; 140 | # Opacity change between steps while fading out. (default 0.03). 141 | fade-out-step = 0.03; 142 | # Fade windows in/out when opening/closing 143 | # no-fading-openclose = true; 144 | 145 | # Specify a list of conditions of windows that should not be faded. 146 | fade-exclude = [ ]; 147 | 148 | ################################# 149 | # 150 | # Other 151 | # 152 | ################################# 153 | 154 | # Try to detect WM windows and mark them as active. 155 | mark-wmwin-focused = true; 156 | # Mark all non-WM but override-redirect windows active (e.g. menus). 157 | mark-ovredir-focused = true; 158 | # Use EWMH _NET_WM_ACTIVE_WINDOW to determine which window is focused instead of using FocusIn/Out events. 159 | # Usually more reliable but depends on a EWMH-compliant WM. 160 | use-ewmh-active-win = true; 161 | # Detect rounded corners and treat them as rectangular when --shadow-ignore-shaped is on. 162 | detect-rounded-corners = true; 163 | 164 | # Detect _NET_WM_OPACITY on client windows, useful for window managers not passing _NET_WM_OPACITY of client windows to frame windows. 165 | # This prevents opacity being ignored for some apps. 166 | # For example without this enabled my xfce4-notifyd is 100% opacity no matter what. 167 | detect-client-opacity = true; 168 | 169 | # Specify refresh rate of the screen. 170 | # If not specified or 0, picom will try detecting this with X RandR extension. 171 | refresh-rate = 0; 172 | 173 | # Vertical synchronization: match the refresh rate of the monitor 174 | vsync = true; 175 | 176 | # Enable DBE painting mode, intended to use with VSync to (hopefully) eliminate tearing. 177 | # Reported to have no effect, though. 178 | dbe = false; 179 | 180 | # Limit picom to repaint at most once every 1 / refresh_rate second to boost performance. 181 | # This should not be used with --vsync drm/opengl/opengl-oml as they essentially does --sw-opti's job already, 182 | # unless you wish to specify a lower refresh rate than the actual value. 183 | #sw-opti = true; 184 | 185 | # Unredirect all windows if a full-screen opaque window is detected, to maximize performance for full-screen windows, like games. 186 | # Known to cause flickering when redirecting/unredirecting windows. 187 | unredir-if-possible = false; 188 | 189 | # Specify a list of conditions of windows that should always be considered focused. 190 | focus-exclude = [ ]; 191 | 192 | # Use WM_TRANSIENT_FOR to group windows, and consider windows in the same group focused at the same time. 193 | detect-transient = true; 194 | # Use WM_CLIENT_LEADER to group windows, and consider windows in the same group focused at the same time. 195 | # WM_TRANSIENT_FOR has higher priority if --detect-transient is enabled, too. 196 | detect-client-leader = true; 197 | 198 | ################################# 199 | # 200 | # Window type settings 201 | # 202 | ################################# 203 | 204 | wintypes: 205 | { 206 | tooltip = 207 | { 208 | # fade: Fade the particular type of windows. 209 | fade = true; 210 | # shadow: Give those windows shadow 211 | shadow = false; 212 | # opacity: Default opacity for the type of windows. 213 | opacity = 0.85; 214 | # focus: Whether to always consider windows of this type focused. 215 | focus = true; 216 | }; 217 | }; 218 | 219 | ###################### 220 | # 221 | # XSync 222 | # See: https://github.com/yshui/picom/commit/b18d46bcbdc35a3b5620d817dd46fbc76485c20d 223 | # 224 | ###################### 225 | 226 | # Use X Sync fence to sync clients' draw calls. Needed on nvidia-drivers with GLX backend for some users. 227 | xrender-sync-fence = true; 228 | -------------------------------------------------------------------------------- /config/termite/config: -------------------------------------------------------------------------------- 1 | [options] 2 | font = Inconsolata 14 3 | cursor_blink = off 4 | scrollback_lines = 5000 5 | 6 | [colors] 7 | foreground = #ffffff 8 | background = #000000 9 | -------------------------------------------------------------------------------- /gitconfig.local: -------------------------------------------------------------------------------- 1 | [alias] 2 | a = add --all 3 | ad = !git add -A && git diff --cached 4 | ap = commit --amend -C HEAD 5 | bd = !sh -c 'git branch -D $1 && git push origin :$1' - 6 | c = commit -v -S 7 | com = !git-checkout-main 8 | contrib = !sh -c 'git log $1 --pretty=format:%an | sort | uniq' - 9 | cp = cherry-pick 10 | dic = diff --cached 11 | mm = !git-merge-branch 12 | pr = !git push -u && hub pull-request 13 | ps = push 14 | rbc = !git rebase --continue && git status 15 | rbi = !git-up -i 16 | shsh = !git rev-parse --short HEAD | tr -d '\n' | xclip -i -selection clipboard 17 | unwip = !test "`git log -n1 --pretty=format:%s`" = "wip" && git reset HEAD~1 18 | wip = !git add -A && git commit -m "wip" 19 | [user] 20 | name = Joe Ferris 21 | email = jferris@thoughtbot.com 22 | signingkey = 678CF148 23 | -------------------------------------------------------------------------------- /tmux.conf.local: -------------------------------------------------------------------------------- 1 | # Use default prefix 2 | unbind C-a 3 | set -g prefix C-b 4 | 5 | # Switch to last pane 6 | bind-key C-b last-pane 7 | -------------------------------------------------------------------------------- /vim/after/ftplugin/eruby.vim: -------------------------------------------------------------------------------- 1 | function! ERubyIterVar(collection) 2 | " remove leading space 3 | let collection = substitute(a:collection,"^\\s\\+","","") 4 | " remove chains like post.users 5 | let collection = substitute(collection,"^.*\\.","","") 6 | " remove instance variable punctuation 7 | let collection = substitute(collection,"^@","","") 8 | " singularize 9 | return rails#singularize(collection) 10 | endfunction 11 | 12 | function! PrefixWithKeyArgument(text) 13 | return ToTranslateKey(a:text) . '", :default => "' . a:text 14 | endfunction 15 | -------------------------------------------------------------------------------- /vim/after/ftplugin/haskell.vim: -------------------------------------------------------------------------------- 1 | setl autoindent 2 | setl shiftwidth=4 3 | setl include=^import\\s*\\(qualified\\)\\?\\s* 4 | setl includeexpr=substitute(v:fname,'\\.','/','g').'.' 5 | setl suffixesadd=hs,lhs,hsc 6 | setl path=src 7 | 8 | function! Hoogle(function) 9 | call system("chromium \"https://www.fpcomplete.com/hoogle?q=" . a:function . "&env=ghc-7.4.2-stable-13.09\"") 10 | endfunction 11 | 12 | function! CheckTest() 13 | cclose 14 | update 15 | GhcModCheck 16 | if empty(getqflist()) 17 | Start stack test 18 | endif 19 | endfunction 20 | 21 | " Search for the current word using Hoogle 22 | nmap K :call Hoogle("") 23 | 24 | " Run tests 25 | nmap t :call CheckTest() 26 | 27 | " Compile with cabal 28 | let s:cabalFilePresent = filereadable(glob('*.cabal')) 29 | let s:stackFilePresent = filereadable('stack.yaml') 30 | if s:stackFilePresent 31 | setl makeprg=stack\ build 32 | 33 | " Load in Stack repl 34 | nmap i :Start stack ghci --ghci-options % 35 | elseif s:cabalFilePresent 36 | setl makeprg=cabal\ build 37 | 38 | " Load in Cabal repl 39 | nmap i :Start cabal exec -- ghci % 40 | else 41 | " Load in GHCI 42 | nmap i :Start ghci % 43 | 44 | let s:currentFile = expand('%') 45 | if !exists('b:qfOutputdir') 46 | let b:qfOutputdir = tempname() 47 | call mkdir(b:qfOutputdir) 48 | endif 49 | let &l:makeprg = 'ghc --make % -outputdir ' . b:qfOutputdir 50 | endif 51 | 52 | setl errorformat= 53 | \%-Z\ %#, 54 | \%W%f:%l:%c:\ Warning:\ %m, 55 | \%E%f:%l:%c:\ %m, 56 | \%E%>%f:%l:%c:, 57 | \%+C\ \ %#%m, 58 | \%W%>%f:%l:%c:, 59 | \%+C\ \ %#%tarning:\ %m, 60 | 61 | highlight hsundefined ctermbg=red guibg=red 62 | call matchadd("hsundefined", "undefined") 63 | 64 | nmap ? :update:GhcModType 65 | nmap _ :update:GhcModTypeInsert 66 | nmap = :update:GhcModSigCodegen 67 | -------------------------------------------------------------------------------- /vim/after/ftplugin/ruby.vim: -------------------------------------------------------------------------------- 1 | nmap yh lF:xEpf=dW 2 | -------------------------------------------------------------------------------- /vim/after/indent/html.vim: -------------------------------------------------------------------------------- 1 | let g:html_indent_tags = g:html_indent_tags . '\|li\|p\|section\|header' 2 | 3 | -------------------------------------------------------------------------------- /vim/plugin/cd.vim: -------------------------------------------------------------------------------- 1 | function! Jump(target) 2 | execute "cd " . a:target 3 | edit . 4 | endfunction 5 | 6 | function! CdPaths() 7 | let paths = split(globpath(&cdpath, '*'), '\n') 8 | let result = [] 9 | for path in paths 10 | if isdirectory(path) 11 | let result += [path] 12 | endif 13 | endfor 14 | return paths 15 | endfunction 16 | 17 | function! CompleteDirInCdPath(ArgLead, CmdLine, CursorPos) 18 | let result = [] 19 | for path in CdPaths() 20 | let result += [fnamemodify(path, ':t')] 21 | endfor 22 | return join(result, "\n") 23 | endfunction 24 | 25 | command! -nargs=1 -complete=custom,CompleteDirInCdPath Jump call Jump() 26 | cabbr j Jump 27 | -------------------------------------------------------------------------------- /vim/plugin/copyrtf.vim: -------------------------------------------------------------------------------- 1 | function! CopyRTF() range 2 | let command = "!cat % | " 3 | if a:firstline 4 | let command = command . "sed -n " . a:firstline . "," . a:lastline . "p | clean_indent | " 5 | endif 6 | let command = command . "pygmentize -f rtf '-Pfontface=Inconsolata' -l " . &filetype . " | pbcopy" 7 | exec ":silent :" . command 8 | redraw! 9 | endfunction 10 | 11 | command! -nargs=0 -range CopyRTF ,call CopyRTF() 12 | -------------------------------------------------------------------------------- /vim/plugin/git.vim: -------------------------------------------------------------------------------- 1 | function! GitUnmerged() 2 | let unmerged = system("git-unmerged-next") 3 | if unmerged == '' 4 | echo "No unmerged files remaining" 5 | else 6 | execute "edit " . unmerged 7 | endif 8 | endfunction 9 | 10 | function! GitResolve() 11 | write 12 | execute "silent !git add %" 13 | call GitUnmerged() 14 | endfunction 15 | 16 | command! -nargs=0 GitUnmerged call GitUnmerged() 17 | command! -nargs=0 GitResolve call GitResolve() 18 | -------------------------------------------------------------------------------- /vim/plugin/mergetabs.vim: -------------------------------------------------------------------------------- 1 | function! MergeTabs() 2 | if tabpagenr() == 1 3 | return 4 | endif 5 | let bufferName = bufname("%") 6 | if tabpagenr("$") == tabpagenr() 7 | close! 8 | else 9 | close! 10 | tabprev 11 | endif 12 | split 13 | execute "buffer " . bufferName 14 | endfunction 15 | 16 | nmap m :call MergeTabs() 17 | -------------------------------------------------------------------------------- /vimrc.bundles.local: -------------------------------------------------------------------------------- 1 | UnPlug 'vim-run-interactive' 2 | UnPlug 'vim-elixir' 3 | UnPlug 'vim-go' 4 | UnPlug 'vim-coffee-script' 5 | UnPlug 'vim-slim' 6 | UnPlug 'ale' 7 | 8 | Plug 'JazzCore/ctrlp-cmatcher' 9 | Plug 'derekwyatt/vim-scala' 10 | Plug 'skwp/greplace.vim' 11 | Plug 'tpope/vim-dispatch' 12 | Plug 'neoclide/coc.nvim', {'do': { -> coc#util#install()}} 13 | Plug 'ElmCast/elm-vim' 14 | Plug 'hashivim/vim-terraform' 15 | Plug 'bfrg/vim-jq' 16 | -------------------------------------------------------------------------------- /vimrc.local: -------------------------------------------------------------------------------- 1 | " Disable Ale 2 | augroup ale 3 | autocmd! 4 | set updatetime=300 5 | augroup END 6 | 7 | " Use relativenumber 8 | if v:version > 702 9 | set number 10 | set relativenumber 11 | set numberwidth=4 12 | endif 13 | 14 | " Complete terms from all buffers 15 | set complete=.,w,b,u,t,i 16 | 17 | " Search for the word under the cursor 18 | " Normal mode: K 19 | nmap K :grep "\b\b" 20 | 21 | set textwidth=80 22 | set colorcolumn=+1 23 | 24 | " Snippets are activated by Shift+Tab 25 | iunmap 26 | let g:snippetsEmu_key = "" 27 | 28 | set wildmenu wildmode=longest:full,full 29 | 30 | " Run specs using vim-dispatch 31 | let g:rspec_command = "Dispatch rspec {spec}" 32 | 33 | nmap g :silent !termite --exec gitsh &> /dev/null &:redraw! 34 | nmap z :silent !termite &> /dev/null &:redraw! 35 | 36 | " Easier than "+ 37 | nmap cp "+y 38 | nmap cv "+p 39 | nmap cV "+P 40 | 41 | " Indent HTML tags 42 | let g:html_indent_inctags = "p,li" 43 | 44 | set background=dark 45 | highlight Pmenu ctermfg=black ctermbg=white guibg=white 46 | 47 | " zsh will reset PATH 48 | set shell=/usr/bin/sh 49 | 50 | let test#strategy = 'dispatch' 51 | 52 | set mouse=a 53 | 54 | au BufRead,BufNewFile *.sbt set filetype=scala 55 | au BufRead,BufNewFile *.tf.tmpl set filetype=terraform 56 | au BufRead,BufNewFile *.bats set filetype=bash 57 | 58 | set shortmess+=c 59 | set cmdheight=2 60 | 61 | let g:markdown_fenced_languages = ['scala'] 62 | 63 | " Disable elm-vim keybindings and formattign 64 | let g:elm_setup_keybindings = 0 65 | let g:elm_format_autosave = 0 66 | 67 | """""""""""""""" 68 | " COC.NVIM 69 | 70 | " autocmd BufWrite :call CocAction('format') 71 | 72 | nmap e (coc-diagnostic-next) 73 | 74 | nmap gr (coc-references) 75 | nmap d :CocList diagnostics 76 | nmap gf (coc-definition) 77 | nmap gp :call CocAction('format') 78 | 79 | " Always show sign column 80 | set signcolumn=yes 81 | 82 | " Trigger completion 83 | inoremap coc#refresh() 84 | 85 | " Use for confirm completion, `u` means break undo chain at current position. 86 | " Coc only does snippet and additional edit on confirm. 87 | " inoremap pumvisible() ? "\" : "\u\" 88 | 89 | " nmap rn (coc-rename) 90 | 91 | " Use ? for show documentation in preview window 92 | nnoremap ? :call show_documentation() 93 | 94 | function! s:show_documentation() 95 | if &filetype == 'vim' 96 | execute 'h '.expand('') 97 | else 98 | call CocAction('doHover') 99 | endif 100 | endfunction 101 | 102 | function ShowCocStatus() 103 | let info = get(b:, 'coc_diagnostic_info', {}) 104 | if empty(info) | return 'Compiled' | endif 105 | let msgs = [] 106 | if get(info, 'error', 0) 107 | call add(msgs, 'E' . info['error']) 108 | endif 109 | if get(info, 'warning', 0) 110 | call add(msgs, 'W' . info['warning']) 111 | endif 112 | return join(msgs, ' ') . ' ' . get(g:, 'coc_status', '') 113 | endfunction 114 | --------------------------------------------------------------------------------