diff --git a/.chezmoi.toml.tmpl b/.chezmoi.toml.tmpl
new file mode 100644
index 0000000..c5d0bb9
--- /dev/null
+++ b/.chezmoi.toml.tmpl
@@ -0,0 +1,2 @@
+[diff]
+reverse = true
diff --git a/.chezmoiexternal.toml b/.chezmoiexternal.toml
new file mode 100644
index 0000000..6df5d05
--- /dev/null
+++ b/.chezmoiexternal.toml
@@ -0,0 +1,4 @@
+[".tmux/plugins/tpm"]
+ type = "git-repo"
+ url = "https://github.com/tmux-plugins/tpm"
+ refreshPeriod = "168h"
diff --git a/.config/fish/config.fish b/.config/fish/config.fish
deleted file mode 100644
index b07e1e8..0000000
--- a/.config/fish/config.fish
+++ /dev/null
@@ -1,5 +0,0 @@
-set PATH ~/bin /bin /sbin /usr/local/bin /usr/local/sbin /usr/bin /usr/sbin ~/.cabal/bin /usr/lib/go/bin ~/.gem/ruby/1.9.1/bin $PATH
-
-set fish_greeting ""
-
-. ~/.bash_aliases
diff --git a/.config/nvim b/.config/nvim
deleted file mode 120000
index bb038bd..0000000
--- a/.config/nvim
+++ /dev/null
@@ -1 +0,0 @@
-/home/barak/.vim
\ No newline at end of file
diff --git a/.config/systemd/user/default.target.wants/ssh-agent.service b/.config/systemd/user/default.target.wants/ssh-agent.service
deleted file mode 120000
index 8c9a931..0000000
--- a/.config/systemd/user/default.target.wants/ssh-agent.service
+++ /dev/null
@@ -1 +0,0 @@
-/home/barak/.config/systemd/user/ssh-agent.service
\ No newline at end of file
diff --git a/.config/xfce4/desktop/icons.screen0-1904x1033.rc b/.config/xfce4/desktop/icons.screen0-1904x1033.rc
deleted file mode 100644
index 901fb0b..0000000
--- a/.config/xfce4/desktop/icons.screen0-1904x1033.rc
+++ /dev/null
@@ -1,15 +0,0 @@
-[xfdesktop-version-4.10.3+-rcfile_format]
-4.10.3+=true
-
-[/home/barak/Desktop/steam.desktop]
-row=5
-col=0
-
-[/]
-row=0
-col=0
-
-[/home/barak]
-row=1
-col=0
-
diff --git a/.config/xfce4/desktop/icons.screen0-2544x1344.rc b/.config/xfce4/desktop/icons.screen0-2544x1344.rc
deleted file mode 100644
index 901fb0b..0000000
--- a/.config/xfce4/desktop/icons.screen0-2544x1344.rc
+++ /dev/null
@@ -1,15 +0,0 @@
-[xfdesktop-version-4.10.3+-rcfile_format]
-4.10.3+=true
-
-[/home/barak/Desktop/steam.desktop]
-row=5
-col=0
-
-[/]
-row=0
-col=0
-
-[/home/barak]
-row=1
-col=0
-
diff --git a/.config/xfce4/desktop/icons.screen0-2544x1424.rc b/.config/xfce4/desktop/icons.screen0-2544x1424.rc
deleted file mode 100644
index 44bc09c..0000000
--- a/.config/xfce4/desktop/icons.screen0-2544x1424.rc
+++ /dev/null
@@ -1,27 +0,0 @@
-[xfdesktop-version-4.10.3+-rcfile_format]
-4.10.3+=true
-
-[/home/barak/Desktop/steam.desktop]
-row=5
-col=0
-
-[/home/barak/Desktop/Hearthstone.desktop]
-row=3
-col=0
-
-[/home/barak/Desktop/Heroes of the Storm.desktop]
-row=2
-col=0
-
-[/home/barak/Desktop/Battle.net.desktop]
-row=4
-col=0
-
-[/]
-row=0
-col=0
-
-[/home/barak]
-row=1
-col=0
-
diff --git a/.config/xfce4/helpers.rc b/.config/xfce4/helpers.rc
deleted file mode 100644
index ba9ad62..0000000
--- a/.config/xfce4/helpers.rc
+++ /dev/null
@@ -1 +0,0 @@
-WebBrowser=google-chrome-beta
diff --git a/.config/xfce4/panel/cpugraph-9.rc b/.config/xfce4/panel/cpugraph-9.rc
deleted file mode 100644
index acfb22c..0000000
--- a/.config/xfce4/panel/cpugraph-9.rc
+++ /dev/null
@@ -1,17 +0,0 @@
-UpdateInterval=1
-TimeScale=0
-Size=56
-Mode=0
-Frame=1
-Border=0
-Bars=0
-TrackedCore=0
-Command=xfce4-taskmanager
-InTerminal=0
-StartupNotification=1
-ColorMode=1
-Foreground1=#0000ffff0000
-Foreground2=#ffff00000000
-Foreground3=#00000000ffff
-Background=#000000000000
-
diff --git a/.config/xfce4/panel/netload-10.rc b/.config/xfce4/panel/netload-10.rc
deleted file mode 100644
index 0836938..0000000
--- a/.config/xfce4/panel/netload-10.rc
+++ /dev/null
@@ -1,14 +0,0 @@
-Use_Label=true
-Show_Values=false
-Show_Bars=true
-Colorize_Values=true
-Color_In=rgb(255,79,0)
-Color_Out=rgb(255,229,0)
-Text=wlp4s0
-Network_Device=wlp4s0
-Max_In=4096
-Max_Out=4096
-Auto_Max=true
-Update_Interval=500
-Values_As_Bits=true
-
diff --git a/.config/xfce4/xfce4-screenshooter b/.config/xfce4/xfce4-screenshooter
deleted file mode 100644
index 4326fc5..0000000
--- a/.config/xfce4/xfce4-screenshooter
+++ /dev/null
@@ -1,8 +0,0 @@
-delay=1
-region=3
-action=1
-show_mouse=1
-screenshot_dir=file:/home/barak/Pictures
-app=env
-last_user=
-
diff --git a/.config/xfce4/xfce4-taskmanager.rc b/.config/xfce4/xfce4-taskmanager.rc
deleted file mode 100644
index fe08189..0000000
--- a/.config/xfce4/xfce4-taskmanager.rc
+++ /dev/null
@@ -1,25 +0,0 @@
-[Settings]
-ShowAllProcesses=FALSE
-MorePrecision=FALSE
-FullCommandLine=FALSE
-ShowStatusIcon=FALSE
-ShowMemoryInXBytes=FALSE
-MonitorPaintBox=TRUE
-ShowApplicationIcons=TRUE
-ToolbarStyle=DEFAULT
-PromptTerminateTask=TRUE
-RefreshRate=750
-ColumnUID=FALSE
-ColumnPID=TRUE
-ColumnPPID=FALSE
-ColumnState=FALSE
-ColumnVSZ=TRUE
-ColumnRSS=TRUE
-ColumnCPU=TRUE
-ColumnPriority=FALSE
-SortColumn=7
-SortType=1
-WindowWidth=2556
-WindowHeight=1411
-HandlePosition=100
-ProcessTreeView=FALSE
diff --git a/.config/xfce4/xfconf/xfce-perchannel-xml/displays.xml b/.config/xfce4/xfconf/xfce-perchannel-xml/displays.xml
deleted file mode 100644
index 5d97713..0000000
--- a/.config/xfce4/xfconf/xfce-perchannel-xml/displays.xml
+++ /dev/null
@@ -1,55 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/.config/xfce4/xfconf/xfce-perchannel-xml/keyboard-layout.xml b/.config/xfce4/xfconf/xfce-perchannel-xml/keyboard-layout.xml
deleted file mode 100644
index fac136c..0000000
--- a/.config/xfce4/xfconf/xfce-perchannel-xml/keyboard-layout.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
diff --git a/.config/xfce4/xfconf/xfce-perchannel-xml/pointers.xml b/.config/xfce4/xfconf/xfce-perchannel-xml/pointers.xml
deleted file mode 100644
index 3f991b4..0000000
--- a/.config/xfce4/xfconf/xfce-perchannel-xml/pointers.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/.config/xfce4/xfconf/xfce-perchannel-xml/thunar.xml b/.config/xfce4/xfconf/xfce-perchannel-xml/thunar.xml
deleted file mode 100644
index 550d2b0..0000000
--- a/.config/xfce4/xfconf/xfce-perchannel-xml/thunar.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-appfinder.xml b/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-appfinder.xml
deleted file mode 100644
index 7b82ee2..0000000
--- a/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-appfinder.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-desktop.xml b/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-desktop.xml
deleted file mode 100644
index 8dd67fe..0000000
--- a/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-desktop.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-notifyd.xml b/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-notifyd.xml
deleted file mode 100644
index 6bef1da..0000000
--- a/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-notifyd.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml b/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml
deleted file mode 100644
index 4f25354..0000000
--- a/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml
+++ /dev/null
@@ -1,99 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-power-manager.xml b/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-power-manager.xml
deleted file mode 100644
index 7fc07f0..0000000
--- a/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-power-manager.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
-
-
diff --git a/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-settings-editor.xml b/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-settings-editor.xml
deleted file mode 100644
index 236eff9..0000000
--- a/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-settings-editor.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/.emacs.d/init.el b/.emacs.d/init.el
deleted file mode 100644
index 289257d..0000000
--- a/.emacs.d/init.el
+++ /dev/null
@@ -1,35 +0,0 @@
-;;; init.el --- Spacemacs Initialization File
-;;
-;; Copyright (c) 2012-2016 Sylvain Benner & Contributors
-;;
-;; Author: Sylvain Benner
-;; URL: https://github.com/syl20bnr/spacemacs
-;;
-;; This file is not part of GNU Emacs.
-;;
-;;; License: GPLv3
-
-;; Without this comment emacs25 adds (package-initialize) here
-;; (package-initialize)
-
-;; Increase gc-cons-threshold, depending on your system you may set it back to a
-;; lower value in your dotfile (function `dotspacemacs/user-config')
-(setq gc-cons-threshold 100000000)
-
-(defconst spacemacs-version "0.200.3" "Spacemacs version.")
-(defconst spacemacs-emacs-min-version "24.4" "Minimal version of Emacs.")
-
-(if (not (version<= spacemacs-emacs-min-version emacs-version))
- (message (concat "Your version of Emacs (%s) is too old. "
- "Spacemacs requires Emacs version %s or above.")
- emacs-version spacemacs-emacs-min-version)
- (load-file (concat (file-name-directory load-file-name)
- "core/core-load-paths.el"))
- (require 'core-spacemacs)
- (spacemacs/init)
- (spacemacs/maybe-install-dotfile)
- (configuration-layer/sync)
- (spacemacs-buffer/display-info-box)
- (spacemacs/setup-startup-hook)
- (require 'server)
- (unless (server-running-p) (server-start)))
diff --git a/.fonts.conf b/.fonts.conf
deleted file mode 120000
index 20d11f6..0000000
--- a/.fonts.conf
+++ /dev/null
@@ -1 +0,0 @@
-/home/barak/.config/fontconfig/fonts.conf
\ No newline at end of file
diff --git a/.gitignore b/.gitignore
deleted file mode 100644
index b25c15b..0000000
--- a/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-*~
diff --git a/.local/share/fonts b/.local/share/fonts
deleted file mode 120000
index fe8ce3a..0000000
--- a/.local/share/fonts
+++ /dev/null
@@ -1 +0,0 @@
-/home/barak/.fonts
\ No newline at end of file
diff --git a/.nvim b/.nvim
deleted file mode 120000
index 8355b52..0000000
--- a/.nvim
+++ /dev/null
@@ -1 +0,0 @@
-.vim
\ No newline at end of file
diff --git a/.nvimrc b/.nvimrc
deleted file mode 120000
index 1490f7a..0000000
--- a/.nvimrc
+++ /dev/null
@@ -1 +0,0 @@
-.vimrc
\ No newline at end of file
diff --git a/.tmux.conf b/.tmux.conf
deleted file mode 100644
index 28d15df..0000000
--- a/.tmux.conf
+++ /dev/null
@@ -1,41 +0,0 @@
-set -g prefix C-a
-unbind C-b
-bind-key C-o last-window
-bind-key C-a select-pane -t :.+
-bind-key a send-prefix
-bind-key j select-pane -D
-bind-key k select-pane -U
-bind-key h select-pane -L
-bind-key l select-pane -R
-bind-key C-n next-window
-bind-key C-p previous-window
-set -g set-titles off
-set -g default-terminal xterm-256color
-setw -g mode-keys vi
-new -d
-
-
-# shift-movement keys will resize panes
-bind -r H resize-pane -L 5
-bind -r J resize-pane -D 5
-bind -r K resize-pane -U 5
-bind -r L resize-pane -R 5
-
-# better mnemonics for splitting panes!
-bind | split-window -h
-bind - split-window -v
-
-# Status Bar
-set -g status-bg black
-set -g status-fg white
-set -g status-interval 1
-set -g status-left '#[fg=green]#H#[default]'
-set -g status-left-length 20
-set -g status-right '#[fg=green]#(~/src/tpom/tpom) #[fg=cyan,bold]%Y-%m-%d %H:%M:%S#[default]'
-
-# Notifying if other windows has activities
-setw -g monitor-activity on
-set -g visual-activity on
-
-# Highlighting the active window in status bar
-setw -g window-status-current-bg red
diff --git a/.vim/init.vim b/.vim/init.vim
deleted file mode 120000
index 4d1e87b..0000000
--- a/.vim/init.vim
+++ /dev/null
@@ -1 +0,0 @@
-/home/barak/.vimrc
\ No newline at end of file
diff --git a/.vim/plugin/slime.vim b/.vim/plugin/slime.vim
deleted file mode 100644
index 940c349..0000000
--- a/.vim/plugin/slime.vim
+++ /dev/null
@@ -1,32 +0,0 @@
-
-""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-
-function Send_to_Screen(text)
- if !exists("g:screen_sessionname") || !exists("g:screen_windowname")
- call Screen_Vars()
- end
-
- echo system("screen -S " . g:screen_sessionname . " -p " . g:screen_windowname . " -X stuff '" . substitute(a:text, "'", "'\\\\''", 'g') . "'")
-endfunction
-
-function Screen_Session_Names(A,L,P)
- return system("screen -ls | awk '/Attached/ {print $1}'")
-endfunction
-
-function Screen_Vars()
- if !exists("g:screen_sessionname") || !exists("g:screen_windowname")
- let g:screen_sessionname = ""
- let g:screen_windowname = "0"
- end
-
- let g:screen_sessionname = input("session name: ", "", "custom,Screen_Session_Names")
- let g:screen_windowname = input("window name: ", g:screen_windowname)
-endfunction
-
-""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-
-vmap "ry :call Send_to_Screen(@r)
-nmap vip
-
-nmap v :call Screen_Vars()
-
diff --git a/.vim/plugin/supertab.vim b/.vim/plugin/supertab.vim
deleted file mode 100644
index cda61bd..0000000
--- a/.vim/plugin/supertab.vim
+++ /dev/null
@@ -1,501 +0,0 @@
-" Author:
-" Original: Gergely Kontra
-" Current: Eric Van Dewoestine (as of version 0.4)
-" Please direct all correspondence to Eric.
-" Version: 0.51
-"
-" Description: {{{
-" Use your tab key to do all your completion in insert mode!
-" You can cycle forward and backward with the and keys
-" Note: you must press once to be able to cycle back
-"
-" http://www.vim.org/scripts/script.php?script_id=1643
-" }}}
-"
-" License: {{{
-" Software License Agreement (BSD License)
-"
-" Copyright (c) 2002 - 2009
-" All rights reserved.
-"
-" Redistribution and use of this software in source and binary forms, with
-" or without modification, are permitted provided that the following
-" conditions are met:
-"
-" * Redistributions of source code must retain the above
-" copyright notice, this list of conditions and the
-" following disclaimer.
-"
-" * Redistributions in binary form must reproduce the above
-" copyright notice, this list of conditions and the
-" following disclaimer in the documentation and/or other
-" materials provided with the distribution.
-"
-" * Neither the name of Gergely Kontra or Eric Van Dewoestine nor the names
-" of its contributors may be used to endorse or promote products derived
-" from this software without specific prior written permission of Gergely
-" Kontra or Eric Van Dewoestine.
-"
-" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
-" IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-" THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
-" CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-" EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-" PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-" PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-" LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-" NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-" SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-" }}}
-"
-" Testing Info: {{{
-" Running vim + supertab with the absolute bar minimum settings:
-" $ vim -u NONE -U NONE -c "set nocp | runtime plugin/supertab.vim"
-" }}}
-
-if v:version < 700
- finish
-endif
-
-if exists('complType') " Integration with other completion functions.
- finish
-endif
-
-" Global Variables {{{
-
- " Used to set the default completion type.
- " There is no need to escape this value as that will be done for you when
- " the type is set.
- " Ex. let g:SuperTabDefaultCompletionType = ""
- "
- " Note that a special value of 'context' is supported which will result in
- " super tab attempting to use the text preceding the cursor to decide which
- " type of completion to attempt. Currently super tab can recognize method
- " calls or attribute references via '.', '::' or '->', and file path
- " references containing '/'.
- " Ex. let g:SuperTabDefaultCompletionType = 'context'
- " /usr/l # will use filename completion
- " myvar.t # will use user completion if completefunc set, or omni
- " # completion if omnifunc set.
- " myvar-> # same as above
- "
- " When using context completion, super tab will fall back to a secondary
- " default completion type set by g:SuperTabContextDefaultCompletionType.
- if !exists("g:SuperTabDefaultCompletionType")
- let g:SuperTabDefaultCompletionType = ""
- endif
-
- " Sets the default completion type used when g:SuperTabDefaultCompletionType
- " is set to 'context' and the text preceding the cursor does not match any
- " patterns mapped to other specific completion types.
- if !exists("g:SuperTabContextDefaultCompletionType")
- let g:SuperTabContextDefaultCompletionType = ""
- endif
-
- " When 'context' completion is enabled, this setting can be used to fallback
- " to g:SuperTabContextDefaultCompletionType as the default for files whose
- " file type occurs in this configured list. This allows you to provide an
- " exclusion for which 'context' completion is not activated.
- if !exists("g:SuperTabContextFileTypeExclusions")
- let g:SuperTabContextFileTypeExclusions = []
- endif
-
- " Used to set a list of variable, completion type pairs used to determine
- " the default completion type to use for the current buffer. If the
- " variable is non-zero and non-empty then the associated completion type
- " will be used.
- " Ex. To use omni or user completion when available, but fall back to the
- " global default otherwise:
- " let g:SuperTabDefaultCompletionTypeDiscovery = [
- " \ "&completefunc:",
- " \ "&omnifunc:",
- " \ ]
- if !exists("g:SuperTabDefaultCompletionTypeDiscovery")
- let g:SuperTabDefaultCompletionTypeDiscovery = []
- endif
-
- " Determines if, and for how long, the current completion type is retained.
- " The possible values include:
- " 0 - The current completion type is only retained for the current completion.
- " Once you have chosen a completion result or exited the completion
- " mode, the default completion type is restored.
- " 1 - The current completion type is saved for the duration of your vim
- " session or until you enter a different completion mode.
- " (SuperTab default).
- " 2 - The current completion type is saved until you exit insert mode (via
- " ESC). Once you exit insert mode the default completion type is
- " restored.
- if !exists("g:SuperTabRetainCompletionType")
- let g:SuperTabRetainCompletionType = 1
- endif
-
- " Sets whether or not mid word completion is enabled.
- " When enabled, will kick off completion when ever a word character is
- " to the left of the cursor. When disabled, completion will only occur if
- " the char to the left is a word char and the char to the right is not (you
- " are at the end of the word).
- if !exists("g:SuperTabMidWordCompletion")
- let g:SuperTabMidWordCompletion = 1
- endif
-
- " The following two variables allow you to set the key mapping used to kick
- " off the current completion. By default this is and . To
- " change to something like and , you can add the
- " following to your vimrc.
- "
- " let g:SuperTabMappingForward = ''
- " let g:SuperTabMappingBackward = ''
- "
- " Note: if the above does not have the desired effect (which may happen in
- " console version of vim), you can try the following mappings. Although the
- " backwards mapping still doesn't seem to work in the console for me, your
- " milage may vary.
- "
- " let g:SuperTabMappingForward = ''
- " let g:SuperTabMappingBackward = ''
- "
- if !exists("g:SuperTabMappingForward")
- let g:SuperTabMappingForward = ''
- endif
- if !exists("g:SuperTabMappingBackward")
- let g:SuperTabMappingBackward = ''
- endif
-
- " Sets the key mapping used to insert a literal tab where supertab would
- " otherwise attempt to kick off insert completion.
- " The default is '' (ctrl-tab) which unfortunately might not work at
- " the console. So if you are using a console vim and want this
- " functionality, you'll have to change it to something that is supported.
- if !exists("g:SuperTabMappingTabLiteral")
- let g:SuperTabMappingTabLiteral = ''
- endif
-
- " Sets whether or not to pre-highlight first match when completeopt has
- " the popup menu enabled and the 'longest' option as well.
- " When enabled, will kick off completion and pre-select the first
- " entry in the popup menu, allowing you to simply hit to use it.
- if !exists("g:SuperTabLongestHighlight")
- let g:SuperTabLongestHighlight = 0
- endif
-
-" }}}
-
-" Script Variables {{{
-
- " construct the help text.
- let s:tabHelp =
- \ "Hit or CTRL-] on the completion type you wish to switch to.\n" .
- \ "Use :help ins-completion for more information.\n" .
- \ "\n" .
- \ "|| - Keywords in 'complete' searching down.\n" .
- \ "|| - Keywords in 'complete' searching up (SuperTab default).\n" .
- \ "|| - Whole lines.\n" .
- \ "|| - Keywords in current file.\n" .
- \ "|| - Keywords in 'dictionary'.\n" .
- \ "|| - Keywords in 'thesaurus', thesaurus-style.\n" .
- \ "|| - Keywords in the current and included files.\n" .
- \ "|| - Tags.\n" .
- \ "|| - File names.\n" .
- \ "|| - Definitions or macros.\n" .
- \ "|| - Vim command-line.\n" .
- \ "|| - User defined completion.\n" .
- \ "|| - Omni completion.\n" .
- \ "|s| - Spelling suggestions."
-
- " set the available completion types and modes.
- let s:types =
- \ "\\\\\\\\" .
- \ "\\\\\\\\\s"
- let s:modes = '/^E/^Y/^L/^N/^K/^T/^I/^]/^F/^D/^V/^P/^U/^O/s'
- let s:types = s:types . "np"
- let s:modes = s:modes . '/n/p'
-
-" }}}
-
-" CtrlXPP() {{{
-" Handles entrance into completion mode.
-function! CtrlXPP()
- if &smd
- echo '' | echo '-- ^X++ mode (' . s:modes . ')'
- endif
- let complType = nr2char(getchar())
- if stridx(s:types, complType) != -1
- if stridx("\\", complType) != -1 " no memory, just scroll...
- return "\" . complType
- elseif stridx('np', complType) != -1
- let complType = nr2char(char2nr(complType) - 96)
- else
- let complType = "\" . complType
- endif
-
- if g:SuperTabRetainCompletionType
- let b:complType = complType
- endif
-
- " Hack to workaround appent bug when invoking command line completion via
- " =
- if complType == "\\"
- return s:CommandLineCompletion()
- endif
-
- return complType
- endif
-
- echohl "Unknown mode"
- return complType
-endfunction " }}}
-
-" SuperTabSetCompletionType(type) {{{
-" Globally available function that user's can use to create mappings to
-" quickly switch completion modes. Useful when a user wants to restore the
-" default or switch to another mode without having to kick off a completion
-" of that type or use SuperTabHelp.
-" Example mapping to restore SuperTab default:
-" nmap :call SetSuperTabCompletionType("")
-function! SuperTabSetCompletionType(type)
- exec "let b:complType = \"" . escape(a:type, '<') . "\""
-endfunction " }}}
-
-" s:Init {{{
-" Global initilization when supertab is loaded.
-function! s:Init()
- augroup supertab_init
- autocmd!
- autocmd BufEnter * call InitBuffer()
- augroup END
-
- " ensure InitBuffer gets called for the first buffer, after the ftplugins
- " have been called.
- augroup supertab_init_first
- autocmd!
- autocmd FileType call InitBuffer()
- augroup END
-
- " Setup mechanism to restore orignial completion type upon leaving insert
- " mode if g:SuperTabRetainCompletionType == 2
- if g:SuperTabRetainCompletionType == 2
- augroup supertab_retain
- autocmd!
- autocmd InsertLeave * call s:SetDefaultCompletionType()
- augroup END
- endif
-endfunction " }}}
-
-" s:InitBuffer {{{
-" Per buffer initilization.
-function! s:InitBuffer()
- if exists("b:complType")
- return
- endif
-
- " init hack for workaround.
- let b:complCommandLine = 0
-
- if !exists("b:SuperTabDefaultCompletionType")
- " loop through discovery list to find the default
- if !empty(g:SuperTabDefaultCompletionTypeDiscovery)
- " backward compatiability with old string value.
- if type(g:SuperTabDefaultCompletionTypeDiscovery) == 1
- let dlist = split(g:SuperTabDefaultCompletionTypeDiscovery, ',')
- else
- let dlist = g:SuperTabDefaultCompletionTypeDiscovery
- endif
- for pair in dlist
- let var = substitute(pair, '\(.*\):.*', '\1', '')
- let type = substitute(pair, '.*:\(.*\)', '\1', '')
- exec 'let value = ' . var
- if value !~ '^\s*$' && value != '0'
- let b:SuperTabDefaultCompletionType = type
- break
- endif
- endfor
- endif
-
- " fallback to configured default.
- if !exists("b:SuperTabDefaultCompletionType")
- let b:SuperTabDefaultCompletionType = g:SuperTabDefaultCompletionType
- endif
- endif
-
- " set the default completion type.
- call SuperTabSetCompletionType(b:SuperTabDefaultCompletionType)
-endfunction " }}}
-
-" s:SetCompletionType() {{{
-" Sets the completion type based on what the user has chosen from the help
-" buffer.
-function! s:SetCompletionType()
- let chosen = substitute(getline('.'), '.*|\(.*\)|.*', '\1', '')
- if chosen != getline('.')
- let winnr = b:winnr
- close
- exec winnr . 'winc w'
- call SuperTabSetCompletionType(chosen)
- endif
-endfunction " }}}
-
-" s:SetDefaultCompletionType() {{{
-function! s:SetDefaultCompletionType()
- if exists('b:SuperTabDefaultCompletionType') && !b:complCommandLine
- call SuperTabSetCompletionType(b:SuperTabDefaultCompletionType)
- endif
-endfunction " }}}
-
-" s:SuperTab(command) {{{
-" Used to perform proper cycle navigation as the user requests the next or
-" previous entry in a completion list, and determines whether or not to simply
-" retain the normal usage of based on the cursor position.
-function! s:SuperTab(command)
- if s:WillComplete()
- " rare case where no autocmds have fired for this buffer to initialize the
- " supertab vars.
- call s:InitBuffer()
-
- let key = ''
- " highlight first result if longest enabled
- if g:SuperTabLongestHighlight && !pumvisible() && &completeopt =~ 'longest'
- let key = (b:complType == "\") ? "\" : "\"
- endif
-
- " exception: if in mode, then should move up the list, and
- " down the list.
- if a:command == 'p' &&
- \ (b:complType == "\" ||
- \ (b:complType == 'context' &&
- \ tolower(g:SuperTabContextDefaultCompletionType) == ''))
- return "\"
- endif
-
- if b:complType == 'context'
- if index(g:SuperTabContextFileTypeExclusions, &ft) == -1
- let curline = getline('.')
- let cnum = col('.')
- let synname = synIDattr(synID(line('.'), cnum - 1, 1), 'name')
- if curline =~ '.*/\w*\%' . cnum . 'c' ||
- \ ((has('win32') || has('win64')) && curline =~ '.*\\\w*\%' . cnum . 'c')
- return "\\" . key
- elseif curline =~ '.*\(\w\|[\])]\)\(\.\|::\|->\)\w*\%' . cnum . 'c' &&
- \ synname !~ '\(String\|Comment\)'
- if &completefunc != ''
- return "\\" . key
- elseif &omnifunc != ''
- return "\\" . key
- endif
- endif
- endif
- exec "let complType = \"" . escape(g:SuperTabContextDefaultCompletionType, '<') . "\""
- return complType . key
- endif
-
- " Hack to workaround appent bug when invoking command line completion via
- " =
- if b:complType == "\\"
- return s:CommandLineCompletion()
- endif
- return b:complType . key
- endif
-
- return "\"
-endfunction " }}}
-
-" s:SuperTabHelp() {{{
-" Opens a help window where the user can choose a completion type to enter.
-function! s:SuperTabHelp()
- let winnr = winnr()
- if bufwinnr("SuperTabHelp") == -1
- botright split SuperTabHelp
-
- setlocal noswapfile
- setlocal buftype=nowrite
- setlocal bufhidden=delete
-
- let saved = @"
- let @" = s:tabHelp
- silent put
- call cursor(1, 1)
- silent 1,delete
- call cursor(4, 1)
- let @" = saved
- exec "resize " . line('$')
-
- syntax match Special "|.\{-}|"
-
- setlocal readonly
- setlocal nomodifiable
-
- nmap :call SetCompletionType()
- nmap :call SetCompletionType()
- else
- exec bufwinnr("SuperTabHelp") . "winc w"
- endif
- let b:winnr = winnr
-endfunction " }}}
-
-" s:WillComplete() {{{
-" Determines if completion should be kicked off at the current location.
-function! s:WillComplete()
- let line = getline('.')
- let cnum = col('.')
-
- " Start of line.
- let prev_char = strpart(line, cnum - 2, 1)
- if prev_char =~ '^\s*$'
- return 0
- endif
-
- " Within a word, but user does not have mid word completion enabled.
- let next_char = strpart(line, cnum - 1, 1)
- if !g:SuperTabMidWordCompletion && next_char =~ '\k'
- return 0
- endif
-
- " In keyword completion mode and no preceding word characters.
- "if (b:complType == "\" || b:complType == "\") && prev_char !~ '\k'
- " return 0
- "endif
-
- return 1
-endfunction " }}}
-
-" s:CommandLineCompletion() {{{
-" Hack needed to account for apparent bug in vim command line mode completion
-" when invoked via =
-function! s:CommandLineCompletion()
- " This hack will trigger InsertLeave which will then invoke
- " s:SetDefaultCompletionType. To prevent default completion from being
- " restored prematurely, set an internal flag for s:SetDefaultCompletionType
- " to check for.
- let b:complCommandLine = 1
- return "\\:call feedkeys('\\\', 'n') | " .
- \ "let b:complCommandLine = 0\"
-endfunction " }}}
-
-" Key Mappings {{{
- " map a regular tab to ctrl-tab (note: doesn't work in console vim)
- exec 'inoremap ' . g:SuperTabMappingTabLiteral . ' '
-
- imap =CtrlXPP()
-
- " From the doc |insert.txt| improved
- exec 'imap ' . g:SuperTabMappingForward . ' '
- exec 'imap ' . g:SuperTabMappingBackward . ' '
-
- " After hitting , hitting it once more will go to next match
- " (because in XIM mode and mappings are ignored)
- " and wont start a brand new completion
- " The side effect, that in the beginning of line and inserts a
- " , but I hope it may not be a problem...
- inoremap =SuperTab('n')
- inoremap =SuperTab('p')
-" }}}
-
-" Command Mappings {{{
- if !exists(":SuperTabHelp")
- command SuperTabHelp :call SuperTabHelp()
- endif
-" }}}
-
-call s:Init()
-
-" vim:ft=vim:fdm=marker
diff --git a/.vimrc b/.vimrc
deleted file mode 100644
index e829aa8..0000000
--- a/.vimrc
+++ /dev/null
@@ -1,651 +0,0 @@
- " ___ _ _ _
-" | _ ) __ _ _ _ __ _| |_( )___ __ _(_)_ __ _ _ __
-" | _ \/ _` | '_/ _` | / //(_-< \ V / | ' \| '_/ _|
-" |___/\__,_|_| \__,_|_\_\ /__/ (_)_/|_|_|_|_|_| \__|
-"
-"
-" ** BASIC EDITOR SETTINGS **
-"
-" First, we are vim, not vi, so start as many others do with
-set nocompatible
-
-" Allow background buffers. Super important for various tab modes.
-set hidden
-
-" Set default spacing.
-" Hard tabs should show as 8.
-set ts=8
-" Soft tabs should be 2 wide, and we should use spaces.
-" (This is the Googler in me. I've converted to spaces over
-" the years because it really is more consistent.)
-set softtabstop=2
-set shiftwidth=2
-set expandtab
-" I like comma instead of slash, but that probably comes from playing
-" Nethack and Angband
-let mapleader = ","
-let maplocalleader = "\\"
-
-" Set 'smart' things in Vim
-" Search case insensitive, unless it contains Uppercase letters
-set smartcase
-" Use all the indent features
-set autoindent
-set smartindent
-set cindent
-" Make backspace remove indents and line breaks, like a normal editor
-set backspace=indent,eol,start
-
-" Keep a bigger history
-set history=1000
-" Allow tab completion for files in command mode.
-set wildmenu
-set wildmode=list:longest
-" Show where you are in the file in the statusbar.
-set ruler
-
-" I hate split above, so make it split below. Likewise, to the right.
-set splitbelow
-" For autocomplete, show a menu, show it when there's only one option,
-" and only complete the longest common bit instead of the whole thing (like
-" bash).
-set completeopt=menu,menuone,longest
-
-" Some stuff for 256-Color consoles that I've forgotten.
-set t_Co=256
-set t_Sf=ESC[3%dm
-set t_Sb=ESC[4%dm
-"set t_kb=
-
-" This is like HiglightTooLongLines below, but for modern vim. The problem is
-" that it highlights the column, even if your short. Good for measuring, bad for
-" my eyes.
-"if v:version >= 703
- "set relativenumber
- "set colorcolumn=81
-"endif
-" ** PATH SETTINGS **
-
-let $RUST_SRC_PATH="/usr/src/rust/src/"
-
-"let g:ft_ignore_pat = '.org'
-
-" Required:
-set runtimepath+=/home/barak/.vim/bundle/repos/github.com/Shougo/dein.vim
-
-" Required:
-call plug#begin('/home/barak/.vim/bundle')
-
-Plug '/home/barak/.vim/bundle/repos/github.com/Shougo/dein.vim'
-Plug 'vim-scripts/DrawIt'
-Plug 'tpope/vim-speeddating'
-Plug 'vim-scripts/EasyGrep'
-Plug 'chrisbra/NrrwRgn'
-Plug 'hsitz/VimOrganizer'
-Plug 'mattn/calendar-vim'
-Plug 'sjbach/lusty'
-Plug 'scrooloose/nerdcommenter'
-Plug 'scrooloose/nerdtree'
-Plug 'rstacruz/sparkup'
-Plug 'scrooloose/syntastic'
-Plug 'tpope/vim-fugitive'
-Plug 'airblade/vim-gitgutter'
-Plug 'lunaru/vim-less'
-"Plug 'terryma/vim-multiple-cursors'
-Plug 'tpope/vim-unimpaired'
-"Plug 'Valloric/YouCompleteMe'
-Plug 'Shougo/deoplete.nvim'
-Plug 'zchee/deoplete-go', {'build': {'unix': 'make'}}
-Plug 'zchee/deoplete-jedi'
-Plug 'b4winckler/vim-angry'
-Plug 'tristen/vim-sparkup'
-Plug 'vim-airline/vim-airline'
-Plug 'vim-airline/vim-airline-themes'
-Plug 'kien/ctrlp.vim'
-Plug 'bling/vim-bufferline'
-Plug 'majutsushi/tagbar'
-Plug 'eagletmt/neco-ghc', {'for': 'haskell'}
-Plug 'eagletmt/ghcmod-vim', {'for': 'haskell'}
-Plug 'Shougo/vimproc.vim'
-Plug 'Shougo/vimfiler.vim'
-Plug 'Shougo/unite.vim'
-Plug 'SirVer/ultisnips'
-Plug 'honza/vim-snippets'
-Plug 'tpope/vim-surround'
-"Plug 'farseer90718/vim-taskwarrior'
-Plug 'fatih/vim-go'
-"Plug 't-yuki/vim-go-coverlay'
-Plug 'tpope/vim-abolish'
-Plug 'hylang/vim-hy'
-Plug 'jiangmiao/auto-pairs'
-Plug 'racer-rust/vim-racer', {'for': 'rust'}
-Plug 'let-def/vimbufsync'
-"Plug 'lucas8/coquille', {'branch': 'error_on_coq_error', 'for': 'coq'}
-Plug 'whonore/coquille', {'branch': 'pathogen-bundle', 'for': 'coq'}
-
-Plug 'mhartington/nvim-typescript'
-
-Plug 'sheerun/vim-polyglot'
-Plug 'Shougo/denite.nvim'
-"Plug 'vim-scripts/fish-syntax'
-"Plug 'kchmck/vim-coffee-script'
-"Plug 'rodjek/vim-puppet'
-"Plug 'JuliaLang/julia-vim'
-"Plug 'rust-lang/rust.vim'
-"Plug 'hashivim/vim-terraform'
-"Plug 'HerringtonDarkholme/yats.vim'
-Plug 'tpope/vim-fireplace'
-Plug 'junegunn/vim-easy-align'
-
-call plug#end()
-
-
-"NeoBundle 'eclim'
-"https://git.wincent.com/command-t.git
-filetype plugin indent on " required
-syntax enable
-
-"filetype plugin indent on
-" If you prefer the Omni-Completion tip window to close when a selection is
-" made, these lines close it on movement in insert mode or when leaving
-" insert mode
-autocmd CursorMovedI * if pumvisible() == 0|pclose|endif
-autocmd InsertLeave * if pumvisible() == 0|pclose|endif
-
-" Sources
-"source ~/.vim/supertab.vim
-"source ~/.vim/charm.vim
-"source ~/.vim/plugin/AppleT.vim
-runtime macros/matchit.vim
-
-" Completion features (TODO: Add to filetype.vim)
-autocmd FileType ruby,eruby set omnifunc=rubycomplete#Complete
-autocmd FileType python set tags+=$HOME/.vim/tags/python.ctags
-"autocmd FileType python set omnifunc=pythoncomplete#Complete
-"autocmd FileType python call SuperTabSetCompletionType("")
-
-" Set filetype for VimOrganizer
-au! BufRead,BufWrite,BufWritePost,BufNewFile *.org
-au BufEnter *.org call org#SetOrgFileType()
-
-"au! BufRead,BufWrite,BufWritePost,BufNewFile *.org
-"au BufEnter *.org call org#SetOrgFileType()
-command! OrgCapture :call org#CaptureBuffer()
-command! OrgCaptureFile :call org#OpenCaptureFile()
-
-" Cull trailing whitespace for all files.
-autocmd BufWritePre * :call AutoTrimWhitespace()
-
-" Set syntax and highlighting
-syntax on
-" baraknew is my own colorscheme. I used to use slate or dante.
-colorscheme baraknew
-"colorscheme slate
-"colorscheme dante
-
-" Turn on the cursorline (highlight on line under cursor) but only for the
-" window and buffer you're currently in. A handy trick, I'm trying out as of
-" 2013-04-12 but the jury is still out.
-autocmd BufEnter * setlocal cursorline
-autocmd WinEnter * setlocal cursorline
-autocmd WinLeave * setlocal nocursorline
-setlocal cursorline
-
-
-" ** PLUGIN CONFIGURATION **
-"
-let g:deoplete#enable_at_startup = 1
-" * Vim general/Unknown
-let python_highlight_all = 1
-let g:Tb_MaxSize=0
-let g:Tb_MapCTabSwitchBufs = 1
-let g:UseGooglePythonSettings = 0
-
-" * Eclim
-let g:EclimCompletionMethod = 'omnifunc'
-
-" * Syntastic
-let g:syntastic_python_checkers = ['python', 'pylint']
-let g:syntastic_go_checkers=['go', 'govet', 'govetshadow', 'golintc']
-let g:syntastic_always_populate_loc_list = 1
-let g:syntastic_auto_loc_list = 2
-let g:syntastic_loc_list_height = 10
-" E111 = Spaces should be multiples of 4. I use 2.
-
-" * Configure browser for haskell_doc.vim
-let g:haddock_browser = "open"
-let g:haddock_browser_callformat = "%s %s"
-
-" * Lusty plugins
-let g:LustyExplorerSuppressRubyWarning = 1
-let g:LustyJugglerSuppressRubyWarning = 1
-let g:LustyJugglerShowKeys = 'a'
-
-" * Buftabs
-let g:buftabs_only_basename = 1
-"let g:buftabs_in_statusline=1
-
-" Bufferline
-let g:bufferline_echo = 0
-let g:bufferline_modified = '+'
-let g:bufferline_show_bufnr = 1
-let g:bufferline_rotate = 1
-
-" * NERDTree
-"let g:NERDChristmasTree = 1
-"let g:NERDChristmasTree = 1
-let g:NERDTreeQuitOnOpen = 1
-let g:NERDTreeWinPos = "right"
-let g:NERDTreeWinSize = 40
-let g:NERDTreeDirArrows=0
-
-let g:NERDTreeMarkBookmarks = 0
-let g:NERDTreeMinimalUI = 1
-
-" * VimFiler
-let g:vimfiler_tree_indentation = 2
-
-" * Tagbar plugin settings
-let g:tagbar_width = 40
-let g:tagbar_autofocus = 1
-let g:tagbar_autoclose = 1
-let g:tagbar_compact = 1
-
-" * Taglist plugin settings (deprecated)
-let Tlist_GainFocus_On_ToggleOpen = 1
-let Tlist_Use_Right_Window = 1
-let Tlist_Inc_Winwidth = 0
-let Tlist_File_Fold_Auto_Close = 1
-let Tlist_WinWidth = 40
-let Tlist_Show_One_File = 0
-
-" * ConqueTerm
-let g:ConqueTerm_CWInsert = 1
-let g:ConqueTerm_InsertOnEnter = 0
-let g:ConqueTerm_SendVisKey = 'ss'
-
-" * YouCompleteMe
-let g:ycm_global_ycm_extra_conf = '~/.ycm_extra_conf.py'
-let g:ycm_confirm_extra_conf = 0
-let g:ycm_key_invoke_completion = ""
-let g:ycm_use_ultisnips_completer = 1
-"let g:ycm_add_preview_to_completeopt = 1
-"let g:ycm_autoclose_preview_window_after_completion = 1
-
-" * UltiSnips
-let g:UltiSnipsSnippetDirectories=["UltiSnips", "usnips"]
-let g:UltiSnipsExpandTrigger=","
-let g:UltiSnipsJumpForwardTrigger=","
-let g:UltiSnipsJumpBackwardTrigger=""
-
-" * MinBufExplorer
-"let g:miniBufExplMapWindowNavVim = 1
-"let g:miniBufExplMapWindowNavArrows = 1
-"let g:miniBufExplMapCTabSwitchBufs = 1
-"let g:miniBufExplModSelTarget = 1
-"let g:miniBufExplForceSyntaxEnable = 1
-
-" * CommandT
-let g:CommandTMaxFiles = 1000
-let g:CommandTMaxDepth = 7
-
-" * VimOrganizer
-" default Tag list. Will be changed in near future so
-" that these are defined by config lines in each .org
-" file itself, but now these are where you can change things:
-" let g:org_todo_setup='TODO | DONE'
-" while g:org_tag_setup is itself a string
-"let g:org_tag_setup='{@home(h) @work(w) @tennisclub(t)} \n {easy(e) hard(d)} \n {computer(c) phone(p)}'
-"au! BufRead,BufWrite,BufWritePost,BufNewFile *.org
-"au BufEnter *.org call org#SetOrgFileType()
-
-" * Airline
-set noshowmode
-let g:airline#extensions#branch#enabled = 1
-let g:airline#extensions#syntastic#enabled = 1
-let g:airline#extensions#tagbar#enabled = 1
-let g:airline_theme="murmur"
-let g:airline_left_sep = ''
-let g:airline_right_sep = ''
-let g:airline#extensions#syntastic#enabled = 1
-let g:airline#extensions#hunks#non_zero_only = 1
-let g:airline#extensions#whitespace#enabled = 0
-let g:airline_mode_map = {
- \ '__' : '-',
- \ 'n' : 'N',
- \ 'i' : 'I',
- \ 'R' : 'R',
- \ 'c' : 'C',
- \ 'v' : 'V',
- \ 'V' : 'V',
- \ '' : 'V',
- \ 's' : 'S',
- \ 'S' : 'S',
- \ '' : 'S',
- \ }
-
-
-" * CtrlP
-let g:ctrlp_map = ',t'
-let g:ctrlp_cmd = 'CtrlP'
-let g:ctrlp_working_path_mode = 'ra'
-let g:ctrlp_match_window = 'bottom,order:ttb,min:1,max:15'
-
-" * Vim-Go
-let g:go_fmt_command = "goimports"
-let g:go_auto_type_info = 1
-let g:go_updatetime = 300
-"let g:go_bin_path = "$HOME/.go/bin"
-
-
-" ** STATUSLINE **
-"
-set laststatus=2
-set statusline=%t "tail of the filename
-"set statusline+=[%{&ff}] "file format
-"set statusline+=%h "help file flag
-set statusline+=\ %w "help file flag
-set statusline+=%r "read only flag
-set statusline+=%y "filetype
-set statusline+=\ %m "modified flag
-set statusline+=%= "left/right separator
-set statusline+=%{fugitive#statusline()}\ \
-set statusline+=%c, "cursor column
-set statusline+=%l/%L "cursor line/total lines
-set statusline+=\ %P "percent through file
-
-" ** SMALL FUNCTIONS THAT DON'T FIT AS PLUGINS ***
-
-" Add capital W so I can be lazy about my shift key
-if !exists(":W")
- command W :w
-endif
-
-" CD to the path of the file I'm editing.
-command Cdf :cd %:p:h
-
-" Save a vim session! Useful if you want to save buffer states and so on
-command SaveSession :mksession! ~/.vim_last_session
-command LoadSession :source ~/.vim_last_session
-
-" This is a quick way to edit a persistent scratch buffer for me...
-command ScratchOpen :e scp://barak@barakmich.com//home/barak/notes/scratch
-
-" Sudo-make-me-a-sandwich write. For when I forget to be root.
-command Wdammit :w !sudo tee > /dev/null %
-
-" I can never remember markdown fully. Open me a cheatsheet
-command MarkdownCheatsheet :rightb vsplit ~/.vim/markdown_cheatsheet.md
-
-
-" Doesn't quite work right but can be a real savior if needed.
-" Oh-shit-what-was-this-like-before-I-changed-it?
-function! s:DiffWithSaved()
- let filetype=&ft
- diffthis
- vnew | r # | normal! 1Gdd
- diffthis
- exe "setlocal bt=nofile bh=wipe nobl noswf ro ft=" . filetype
-endfunction
-com! DiffSaved call s:DiffWithSaved()
-
-" Highlight lines that are longer than textwidth for the filetype, commonly 80
-" characters.
-function! HighlightTooLongLines()
- highlight def link RightMargin Error
- if &textwidth != 0
- exec 'match RightMargin /\%<' . (&textwidth + 3) . 'v.\%>' . (&textwidth + 1) . 'v/'
- endif
-endfunction
-
-" Toggles the quickfix window split.
-command -bang -nargs=? QFix call QFixToggle(0)
-function! QFixToggle(forced)
- if exists("g:qfix_win") && a:forced == 0
- cclose
- else
- execute "copen " . 15
- endif
-endfunction
-
-" Toggle LocationList
-command -bang -nargs=? LFix call LFixToggle(0)
-function! LFixToggle(forced)
- if exists("g:lfix_win") && a:forced == 0
- unlet! g:lfix_win
- lclose
- else
- execute "lopen " . 10
- let g:lfix_win = "t"
- endif
-endfunction
-
-"au FileType go nmap C (go-clearlay)
-"clear overlay
-command -bang -nargs=? GoCoverlayT call GoCoverlayToggle(0)
-function! GoCoverlayToggle(forced)
- if exists("g:go_coverlay_t") && a:forced == 0
- unlet! g:go_coverlay_t
- GoClearlay
- "call (go-clearlay)
- else
- "call (go-coverlay)
- GoCoverlay
- let g:go_coverlay_t = "t"
- endif
-endfunction
-
-
-" Toggle GoCoverlay
-au FileType go nmap c :GoCoverlayT
-
-" Coquille
-au FileType coq nmap a :CoqToCursor
-au FileType coq imap a :CoqToCursor
-
-" Make the Quickfix window respond well to commands (for instance, q to close,
-" Enter to select, etc). In tandem with the above.
-augroup QFixToggle
- autocmd!
- autocmd BufWinEnter quickfix let g:qfix_win = bufnr("$")
- autocmd BufWinEnter quickfix exec "nnoremap q :QFix"
- autocmd BufWinLeave * if exists("g:qfix_win") && expand("") == g:qfix_win | unlet! g:qfix_win | endif
-augroup END
-
-
-" Execute a command that pipes output to window. Captures output into a new,
-" appropriately titled, buffer.
-function! s:ExecuteInShellOutput(command)
- let command = join(map(split(a:command), 'expand(v:val)'))
- let winnr = bufwinnr('^' . command . '$')
- silent! execute winnr < 0 ? 'botright new ' . fnameescape(command) : winnr . 'wincmd w'
- setlocal buftype=nowrite bufhidden=wipe nobuflisted noswapfile wrap number
- echo 'Executing ' . command . '...'
- silent! execute 'silent %!'. command
-" uncomment this if you want the new buffer to try to grow to accommodate the output
- "silent! execute 'resize ' . line('$')
- silent! redraw
- silent! execute 'au BufUnload execute bufwinnr(' . bufnr('#') . ') . ''wincmd w'''
- silent! execute 'nnoremap r :call ExecuteInShell(''' . command . ''')'
- echo 'Execution of ' . command . ' complete.'
-endfunction
-
-" Same as above, doesn't capture output
-function! s:ExecuteInShell(command)
- let command = join(map(split(a:command), 'expand(v:val)'))
- silent! execute 'silent !'. command
- redraw!
- echo 'Execution of ' . command . ' complete.'
-endfunction
-
-command! -complete=shellcmd -nargs=+ Shell call s:ExecuteInShellOutput()
-command! -complete=shellcmd -nargs=+ Exec call s:ExecuteInShell()
-command! -nargs=* Make call s:ExecuteInShellOutput('make '.)
-command! -nargs=* PTW call s:ExecuteInShell('ptw post --client=vim "'..'"')
-
-" Highlight all instances of word under cursor, when idle.
-" Useful when studying strange source code.
-" Type z/ to toggle highlighting on/off.
-nnoremap z/ :if AutoHighlightToggle()set hlselseset nohlsendif
-function! AutoHighlightToggle()
- let @/ = ''
- if exists('#auto_highlight')
- au! auto_highlight
- augroup! auto_highlight
- setl updatetime=4000
- echo 'Highlight current word: off'
- return 0
- else
- augroup auto_highlight
- au!
- au CursorHold * let @/ = '\V\<'.escape(expand(''), '\').'\>'
- augroup end
- setl updatetime=500
- echo 'Highlight current word: ON'
- return 1
- endif
-endfunction
-
-" Removes trailing spaces
-function AutoTrimWhitespace()
- if exists("b:auto_trim_whitespace")
- if b:auto_trim_whitespace == 1
- let l:winview = winsaveview()
- silent! %s/\s\+$//
- call winrestview(l:winview)
- endif
- endif
-endfunction
-
-" ** KEY REMAPPINGS **
-"
-" I used to use tabs, but then I took an arrow to the knee.
-" Tabs in vim suck because they aren't what you want. Use tabbar.
-"nnoremap gc :tabnew
-"nnoremap gK :tabclose
-"nnoremap gn gt
-"nnoremap gp gT
-
-" I don't know how I came up with gt for opening the tree, but it stuck.
-"nmap gt :NERDTreeToggle
-nmap gt :VimFilerExplorer -winwidth=40 -toggle -direction=rightbelow -parent -status -force-hide
-" The same for the TagList, useful for large C files.
-"nmap gb :TlistToggle
-nmap gb :TagbarToggle
-"nnoremap gx :Kwbd
-" :Kwbd (defined below) really kills a buffer dead, and closes the window.
-" gK is similar.
-nnoremap gc :Kwbd
-"nnoremap gc :bdelete
-nnoremap gK :bdelete!
-
-" I use gn/gp to cycle through open tabs/buffers
-nnoremap gn :bn
-nnoremap gp :bp
-nnoremap gz :pclose
-" The single most handy way to get around a file. Cursor over a word, and then
-" type g* -- you'll go to the next instance of that word in the file. Make it
-" easier to reach by calling it gw (go-word) instead of hidden away.
-nnoremap gw g*
-" Make shift-p like p except, put the line above instead of below.
-nmap P op
-" Line-based movement is cute, but it's tricky for files with lines that wrap.
-" Attune more to what you see on the screen instead of where the lines actually
-" are.
-nnoremap j gj
-nnoremap k gk
-xnoremap j gj
-xnoremap k gk
-nnoremap gj
-nnoremap gk
-xnoremap gj
-xnoremap gk
-inoremap gj
-inoremap gk
-nnoremap
-" Years of using bash and zsh have caused my fingers to expect these Emacs-like
-" mappings to exist. Make them exist in vim as well. But eye them with
-" suspicion, as they come from Emacs.
-nnoremap ^
-nnoremap $
-xnoremap ^
-xnoremap $
-inoremap ^
-inoremap $
-
-" Dealing with split windows is a pain. Make it less of a pain, by making
-" Ctrl-direction appropriate.
-nnoremap j
-nnoremap k
-nnoremap l
-nnoremap h
-"nnoremap w
-"nnoremap W
-inoremap j
-inoremap k
-inoremap l
-inoremap h
-
-if has('nvim')
- tnoremap