Compare commits
No commits in common. "bb91f1a4c9c15f5cf275f800ca4c813028608737" and "89a8647656d7642362eec570c6bcc3459d14f30d" have entirely different histories.
bb91f1a4c9
...
89a8647656
43
bash/.bashrc
43
bash/.bashrc
|
@ -1,43 +0,0 @@
|
||||||
#
|
|
||||||
# ~/.bashrc
|
|
||||||
#
|
|
||||||
|
|
||||||
# If not running interactively, don't do anything
|
|
||||||
[[ $- != *i* ]] && return
|
|
||||||
|
|
||||||
# ALIASES
|
|
||||||
|
|
||||||
alias ls='ls --color=auto'
|
|
||||||
alias calc='qalc'
|
|
||||||
alias nano='nano -A -i -w'
|
|
||||||
alias p='python3'
|
|
||||||
alias p2='python2'
|
|
||||||
alias tmux='tmux -2'
|
|
||||||
alias myip='curl ident.me ; echo '
|
|
||||||
alias lls='ls --color=none'
|
|
||||||
alias y='ytda `xclip -out` &'
|
|
||||||
alias mb='~/bin-client/mbin.sh'
|
|
||||||
alias ll='ls -l'
|
|
||||||
|
|
||||||
# VARIABLES
|
|
||||||
|
|
||||||
export HISTCONTROL=ignoredups
|
|
||||||
export HISTSIZE=1000000
|
|
||||||
export VISUAL="vim"
|
|
||||||
export LANG=en_US.UTF-8
|
|
||||||
HISTIGNORE="[ ]*"
|
|
||||||
export VAGRANT_DEFAULT_PROVIDER="libvirt"
|
|
||||||
export MKR_BIN="https://bin.webionite.com/"
|
|
||||||
export HASTEBIN=1
|
|
||||||
export EDITOR="vim"
|
|
||||||
|
|
||||||
PROMPT_COMMAND="history -a;"
|
|
||||||
[[ -r "/usr/share/z/z.sh" ]] && source /usr/share/z/z.sh
|
|
||||||
|
|
||||||
# WISH
|
|
||||||
|
|
||||||
WISH_PLUGINS=(newline exit_code bg_jobs hostname date path vcs newline username space)
|
|
||||||
WISH_POWERLINE=1
|
|
||||||
WISH_DATE_FORMAT="%d %b %H:%M"
|
|
||||||
WISH_THEME=rgb_gradient
|
|
||||||
source ~/.config/wish/wish.sh
|
|
64
deploy.sh
64
deploy.sh
|
@ -1,53 +1,44 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
function find_package_manager() {
|
function find_package_manager() {
|
||||||
hash pacman &> /dev/null && echo pacman && return 0
|
hash pacman && echo pacman && return 0
|
||||||
hash apt-get &> /dev/null && echo apt-get && return 0
|
hash apt-get && echo apt-get && return 0
|
||||||
hash apk &> /dev/null && echo apk && return 0
|
hash apk && echo apk && return 0
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
function install_package() {
|
function install_package() {
|
||||||
package_manager=$(find_package_manager)
|
package_manager=$(find_package_manager)
|
||||||
if [[ $? -ne 0 ]]; then
|
if [[ $? -ne 0 ]]; then
|
||||||
echo -e "\033[38;5;1mCould not find package manager\033[0;5;0m" >&2
|
echo -e "\033[38;5;1mCould not find package manager" >&2
|
||||||
return 1
|
exit
|
||||||
fi
|
fi
|
||||||
case $package_manager in
|
case package_manager in
|
||||||
pacman)
|
pacman)
|
||||||
sudo pacman -S $*
|
sudo pacman -S $*
|
||||||
return $?
|
|
||||||
;;
|
;;
|
||||||
apt-get)
|
apt-get)
|
||||||
sudo apt-get install $*
|
sudo apt-get install $*
|
||||||
return $?
|
|
||||||
;;
|
;;
|
||||||
apk)
|
apk)
|
||||||
sudo apk add $*
|
sudo apk add $*
|
||||||
return $?
|
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
return 2
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function check_and_install() {
|
function check_and_install() {
|
||||||
if hash $1 &> /dev/null; then
|
if hash $1 &> /dev/null; then
|
||||||
echo -e "\033[38;5;2m$1 is already installed.\033[0;5;0m"
|
echo -e "\033[38;5;2m$1 is already installed."
|
||||||
else
|
else
|
||||||
echo -e "\033[38;5;2mInstalling $1.\033[0;5;0m"
|
echo -e "\033[38;5;2mInstalling $1."
|
||||||
if install_package $1; then
|
if install_package $1; then
|
||||||
echo -e "\033[38;5;2m$1 installed.\033[0;5;0m"
|
echo -e "\033[38;5;2m$1 installed."
|
||||||
else
|
else
|
||||||
echo -e "\033[38;5;1mInstalling $1 failed.\033[0;5;0m" >&2
|
echo -e "\033[38;5;1mInstalling $1 failed." >&2
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function stow_cfg() {
|
|
||||||
echo -e "\033[38;5;2mStowing $1"
|
|
||||||
stow $1
|
|
||||||
}
|
|
||||||
|
|
||||||
package_manager=$(find_package_manager)
|
package_manager=$(find_package_manager)
|
||||||
if [[ $? -ne 0 ]]; then
|
if [[ $? -ne 0 ]]; then
|
||||||
echo -e "\033[38;5;1mCould not find package manager" >&2
|
echo -e "\033[38;5;1mCould not find package manager" >&2
|
||||||
|
@ -55,43 +46,8 @@ else
|
||||||
echo -e "\033[38;5;2mPackage manager: $package_manager"
|
echo -e "\033[38;5;2mPackage manager: $package_manager"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
bd=$(dirname $0)
|
|
||||||
cd "$bd"
|
|
||||||
echo -e "\033[38;5;2mBase Directory: $(pwd)\n\033[0;5;0m"
|
|
||||||
echo -e "\033[38;5;2mInstalling packages\n\033[0;5;0m"
|
|
||||||
|
|
||||||
check_and_install stow
|
check_and_install stow
|
||||||
check_and_install bash
|
check_and_install bash
|
||||||
check_and_install tmux
|
check_and_install tmux
|
||||||
check_and_install vim
|
check_and_install vim
|
||||||
check_and_install curl
|
|
||||||
check_and_install git
|
|
||||||
|
|
||||||
echo -e "\n\033[38;5;2mStowing config\033[0;5;0m\n"
|
|
||||||
|
|
||||||
mv ~/.bashrc{,.old} &> /dev/null
|
|
||||||
stow_cfg bash
|
|
||||||
|
|
||||||
mv ~/.tmux.conf{,.old} &> /dev/null
|
|
||||||
mv ~/.tmux{,.old} &> /dev/null
|
|
||||||
stow_cfg tmux
|
|
||||||
|
|
||||||
mv ~/.vimrc{,.old} &> /dev/null
|
|
||||||
mv ~/.vim{,.old} &> /dev/null
|
|
||||||
stow_cfg vim
|
|
||||||
|
|
||||||
echo -e "\n\033[38;5;2mSetting up wish\033[0;5;0m\n"
|
|
||||||
mkdir -p ~/.config/
|
|
||||||
git clone https://gitlab.com/ceda_ei/wish.git ~/.config/wish
|
|
||||||
|
|
||||||
echo -e "\n\033[38;5;2mSetting up tmux plugins\033[0;5;0m\n"
|
|
||||||
mkdir -p ~/.tmux/plugins/
|
|
||||||
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
|
|
||||||
~/.tmux/plugins/tpm/bin/install_plugins
|
|
||||||
|
|
||||||
echo -e "\n\033[38;5;2mSetting up vim plugins\033[0;5;0m\n"
|
|
||||||
curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
|
|
||||||
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
|
||||||
vim +PlugInstall +qall
|
|
||||||
|
|
||||||
echo -e "\n\033[38;5;2mComplete\033[0;5;0m\n"
|
|
||||||
|
|
|
@ -1,36 +0,0 @@
|
||||||
unbind C-b
|
|
||||||
set -g prefix C-a
|
|
||||||
set-option -g default-terminal "screen-256color"
|
|
||||||
bind-key "'" split-window -h
|
|
||||||
set -g base-index 1
|
|
||||||
set-window-option -g xterm-keys on
|
|
||||||
setw -g pane-base-index 1
|
|
||||||
set -g renumber-windows on
|
|
||||||
set -g history-limit 10000
|
|
||||||
setw -g xterm-keys on
|
|
||||||
set -g default-terminal "screen-256color"
|
|
||||||
bind 0 select-window -t :10
|
|
||||||
setw -g automatic-rename on
|
|
||||||
set -g status-bg default
|
|
||||||
# List of plugins
|
|
||||||
set-window-option -g status-fg colour15
|
|
||||||
set-window-option -g xterm-keys on
|
|
||||||
setw -g mouse off
|
|
||||||
bind-key g split-window -h -c "#{pane_current_path}"
|
|
||||||
bind-key G split-window -v -c "#{pane_current_path}"
|
|
||||||
bind h select-pane -L
|
|
||||||
bind j select-pane -D
|
|
||||||
bind k select-pane -U
|
|
||||||
bind l select-pane -R
|
|
||||||
bind R source-file ~/.tmux.conf \; display-message "Config reloaded..."
|
|
||||||
set -g status-justify centre
|
|
||||||
|
|
||||||
set -g @themepack 'powerline/double/cyan'
|
|
||||||
|
|
||||||
set -g @plugin 'tmux-plugins/tpm'
|
|
||||||
set -g @plugin 'tmux-plugins/tmux-sensible'
|
|
||||||
set -g @plugin 'tmux-plugins/tmux-yank'
|
|
||||||
set -g @plugin 'jimeh/tmux-themepack'
|
|
||||||
set-option -g status-position bottom
|
|
||||||
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
|
|
||||||
run '~/.tmux/plugins/tpm/tpm'
|
|
|
@ -1,490 +0,0 @@
|
||||||
" Tomorrow Night Bright - Full Colour and 256 Colour
|
|
||||||
" http://chriskempson.com
|
|
||||||
"
|
|
||||||
" Hex colour conversion functions borrowed from the theme "Desert256""
|
|
||||||
|
|
||||||
" Default GUI Colours
|
|
||||||
let s:foreground = "eaeaea"
|
|
||||||
let s:background = "0b0a16"
|
|
||||||
let s:selection = "424242"
|
|
||||||
let s:line = "2a2a2a"
|
|
||||||
let s:comment = "969896"
|
|
||||||
let s:red = "d54e53"
|
|
||||||
let s:orange = "e78c45"
|
|
||||||
let s:yellow = "e7c547"
|
|
||||||
let s:green = "b9ca4a"
|
|
||||||
let s:aqua = "70c0b1"
|
|
||||||
let s:blue = "7aa6da"
|
|
||||||
let s:purple = "c397d8"
|
|
||||||
let s:window = "4d5057"
|
|
||||||
|
|
||||||
hi clear
|
|
||||||
syntax reset
|
|
||||||
|
|
||||||
let g:colors_name = "Tomorrow-Night-Bright"
|
|
||||||
|
|
||||||
if has("gui_running") || &t_Co == 88 || &t_Co == 256
|
|
||||||
" Returns an approximate grey index for the given grey level
|
|
||||||
fun <SID>grey_number(x)
|
|
||||||
if &t_Co == 88
|
|
||||||
if a:x < 23
|
|
||||||
return 0
|
|
||||||
elseif a:x < 69
|
|
||||||
return 1
|
|
||||||
elseif a:x < 103
|
|
||||||
return 2
|
|
||||||
elseif a:x < 127
|
|
||||||
return 3
|
|
||||||
elseif a:x < 150
|
|
||||||
return 4
|
|
||||||
elseif a:x < 173
|
|
||||||
return 5
|
|
||||||
elseif a:x < 196
|
|
||||||
return 6
|
|
||||||
elseif a:x < 219
|
|
||||||
return 7
|
|
||||||
elseif a:x < 243
|
|
||||||
return 8
|
|
||||||
else
|
|
||||||
return 9
|
|
||||||
endif
|
|
||||||
else
|
|
||||||
if a:x < 14
|
|
||||||
return 0
|
|
||||||
else
|
|
||||||
let l:n = (a:x - 8) / 10
|
|
||||||
let l:m = (a:x - 8) % 10
|
|
||||||
if l:m < 5
|
|
||||||
return l:n
|
|
||||||
else
|
|
||||||
return l:n + 1
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
endfun
|
|
||||||
|
|
||||||
" Returns the actual grey level represented by the grey index
|
|
||||||
fun <SID>grey_level(n)
|
|
||||||
if &t_Co == 88
|
|
||||||
if a:n == 0
|
|
||||||
return 0
|
|
||||||
elseif a:n == 1
|
|
||||||
return 46
|
|
||||||
elseif a:n == 2
|
|
||||||
return 92
|
|
||||||
elseif a:n == 3
|
|
||||||
return 115
|
|
||||||
elseif a:n == 4
|
|
||||||
return 139
|
|
||||||
elseif a:n == 5
|
|
||||||
return 162
|
|
||||||
elseif a:n == 6
|
|
||||||
return 185
|
|
||||||
elseif a:n == 7
|
|
||||||
return 208
|
|
||||||
elseif a:n == 8
|
|
||||||
return 231
|
|
||||||
else
|
|
||||||
return 255
|
|
||||||
endif
|
|
||||||
else
|
|
||||||
if a:n == 0
|
|
||||||
return 0
|
|
||||||
else
|
|
||||||
return 8 + (a:n * 10)
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
endfun
|
|
||||||
|
|
||||||
" Returns the palette index for the given grey index
|
|
||||||
fun <SID>grey_colour(n)
|
|
||||||
if &t_Co == 88
|
|
||||||
if a:n == 0
|
|
||||||
return 16
|
|
||||||
elseif a:n == 9
|
|
||||||
return 79
|
|
||||||
else
|
|
||||||
return 79 + a:n
|
|
||||||
endif
|
|
||||||
else
|
|
||||||
if a:n == 0
|
|
||||||
return 16
|
|
||||||
elseif a:n == 25
|
|
||||||
return 231
|
|
||||||
else
|
|
||||||
return 231 + a:n
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
endfun
|
|
||||||
|
|
||||||
" Returns an approximate colour index for the given colour level
|
|
||||||
fun <SID>rgb_number(x)
|
|
||||||
if &t_Co == 88
|
|
||||||
if a:x < 69
|
|
||||||
return 0
|
|
||||||
elseif a:x < 172
|
|
||||||
return 1
|
|
||||||
elseif a:x < 230
|
|
||||||
return 2
|
|
||||||
else
|
|
||||||
return 3
|
|
||||||
endif
|
|
||||||
else
|
|
||||||
if a:x < 75
|
|
||||||
return 0
|
|
||||||
else
|
|
||||||
let l:n = (a:x - 55) / 40
|
|
||||||
let l:m = (a:x - 55) % 40
|
|
||||||
if l:m < 20
|
|
||||||
return l:n
|
|
||||||
else
|
|
||||||
return l:n + 1
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
endfun
|
|
||||||
|
|
||||||
" Returns the actual colour level for the given colour index
|
|
||||||
fun <SID>rgb_level(n)
|
|
||||||
if &t_Co == 88
|
|
||||||
if a:n == 0
|
|
||||||
return 0
|
|
||||||
elseif a:n == 1
|
|
||||||
return 139
|
|
||||||
elseif a:n == 2
|
|
||||||
return 205
|
|
||||||
else
|
|
||||||
return 255
|
|
||||||
endif
|
|
||||||
else
|
|
||||||
if a:n == 0
|
|
||||||
return 0
|
|
||||||
else
|
|
||||||
return 55 + (a:n * 40)
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
endfun
|
|
||||||
|
|
||||||
" Returns the palette index for the given R/G/B colour indices
|
|
||||||
fun <SID>rgb_colour(x, y, z)
|
|
||||||
if &t_Co == 88
|
|
||||||
return 16 + (a:x * 16) + (a:y * 4) + a:z
|
|
||||||
else
|
|
||||||
return 16 + (a:x * 36) + (a:y * 6) + a:z
|
|
||||||
endif
|
|
||||||
endfun
|
|
||||||
|
|
||||||
" Returns the palette index to approximate the given R/G/B colour levels
|
|
||||||
fun <SID>colour(r, g, b)
|
|
||||||
" Get the closest grey
|
|
||||||
let l:gx = <SID>grey_number(a:r)
|
|
||||||
let l:gy = <SID>grey_number(a:g)
|
|
||||||
let l:gz = <SID>grey_number(a:b)
|
|
||||||
|
|
||||||
" Get the closest colour
|
|
||||||
let l:x = <SID>rgb_number(a:r)
|
|
||||||
let l:y = <SID>rgb_number(a:g)
|
|
||||||
let l:z = <SID>rgb_number(a:b)
|
|
||||||
|
|
||||||
if l:gx == l:gy && l:gy == l:gz
|
|
||||||
" There are two possibilities
|
|
||||||
let l:dgr = <SID>grey_level(l:gx) - a:r
|
|
||||||
let l:dgg = <SID>grey_level(l:gy) - a:g
|
|
||||||
let l:dgb = <SID>grey_level(l:gz) - a:b
|
|
||||||
let l:dgrey = (l:dgr * l:dgr) + (l:dgg * l:dgg) + (l:dgb * l:dgb)
|
|
||||||
let l:dr = <SID>rgb_level(l:gx) - a:r
|
|
||||||
let l:dg = <SID>rgb_level(l:gy) - a:g
|
|
||||||
let l:db = <SID>rgb_level(l:gz) - a:b
|
|
||||||
let l:drgb = (l:dr * l:dr) + (l:dg * l:dg) + (l:db * l:db)
|
|
||||||
if l:dgrey < l:drgb
|
|
||||||
" Use the grey
|
|
||||||
return <SID>grey_colour(l:gx)
|
|
||||||
else
|
|
||||||
" Use the colour
|
|
||||||
return <SID>rgb_colour(l:x, l:y, l:z)
|
|
||||||
endif
|
|
||||||
else
|
|
||||||
" Only one possibility
|
|
||||||
return <SID>rgb_colour(l:x, l:y, l:z)
|
|
||||||
endif
|
|
||||||
endfun
|
|
||||||
|
|
||||||
" Returns the palette index to approximate the 'rrggbb' hex string
|
|
||||||
fun <SID>rgb(rgb)
|
|
||||||
let l:r = ("0x" . strpart(a:rgb, 0, 2)) + 0
|
|
||||||
let l:g = ("0x" . strpart(a:rgb, 2, 2)) + 0
|
|
||||||
let l:b = ("0x" . strpart(a:rgb, 4, 2)) + 0
|
|
||||||
|
|
||||||
return <SID>colour(l:r, l:g, l:b)
|
|
||||||
endfun
|
|
||||||
|
|
||||||
" Sets the highlighting for the given group
|
|
||||||
fun <SID>X(group, fg, bg, attr)
|
|
||||||
if a:fg != ""
|
|
||||||
exec "hi " . a:group . " guifg=#" . a:fg . " ctermfg=" . <SID>rgb(a:fg)
|
|
||||||
endif
|
|
||||||
if a:bg != ""
|
|
||||||
exec "hi " . a:group . " guibg=#" . a:bg . " ctermbg=" . <SID>rgb(a:bg)
|
|
||||||
endif
|
|
||||||
if a:attr != ""
|
|
||||||
exec "hi " . a:group . " gui=" . a:attr . " cterm=" . a:attr
|
|
||||||
endif
|
|
||||||
endfun
|
|
||||||
|
|
||||||
" Vim Highlighting
|
|
||||||
call <SID>X("Normal", s:foreground, s:background, "")
|
|
||||||
call <SID>X("LineNr", s:selection, "", "")
|
|
||||||
call <SID>X("NonText", s:selection, "", "")
|
|
||||||
call <SID>X("SpecialKey", s:selection, "", "")
|
|
||||||
call <SID>X("Search", s:background, s:yellow, "")
|
|
||||||
call <SID>X("TabLine", s:window, s:foreground, "reverse")
|
|
||||||
call <SID>X("TabLineFill", s:window, s:foreground, "reverse")
|
|
||||||
call <SID>X("StatusLine", s:window, s:yellow, "reverse")
|
|
||||||
call <SID>X("StatusLineNC", s:window, s:foreground, "reverse")
|
|
||||||
call <SID>X("VertSplit", s:window, s:window, "none")
|
|
||||||
call <SID>X("Visual", "", s:selection, "")
|
|
||||||
call <SID>X("Directory", s:blue, "", "")
|
|
||||||
call <SID>X("ModeMsg", s:green, "", "")
|
|
||||||
call <SID>X("MoreMsg", s:green, "", "")
|
|
||||||
call <SID>X("Question", s:green, "", "")
|
|
||||||
call <SID>X("WarningMsg", s:red, "", "")
|
|
||||||
call <SID>X("MatchParen", "", s:selection, "")
|
|
||||||
call <SID>X("Folded", s:comment, s:background, "")
|
|
||||||
call <SID>X("FoldColumn", "", s:background, "")
|
|
||||||
if version >= 700
|
|
||||||
call <SID>X("CursorLine", "", s:line, "none")
|
|
||||||
call <SID>X("CursorColumn", "", s:line, "none")
|
|
||||||
call <SID>X("PMenu", s:foreground, s:selection, "none")
|
|
||||||
call <SID>X("PMenuSel", s:foreground, s:selection, "reverse")
|
|
||||||
call <SID>X("SignColumn", "", s:background, "none")
|
|
||||||
end
|
|
||||||
if version >= 703
|
|
||||||
call <SID>X("ColorColumn", "", s:line, "none")
|
|
||||||
end
|
|
||||||
|
|
||||||
" Standard Highlighting
|
|
||||||
call <SID>X("Comment", s:comment, "", "")
|
|
||||||
call <SID>X("Todo", s:comment, s:background, "")
|
|
||||||
call <SID>X("Title", s:comment, "", "")
|
|
||||||
call <SID>X("Identifier", s:red, "", "none")
|
|
||||||
call <SID>X("Statement", s:foreground, "", "")
|
|
||||||
call <SID>X("Conditional", s:foreground, "", "")
|
|
||||||
call <SID>X("Repeat", s:foreground, "", "")
|
|
||||||
call <SID>X("Structure", s:purple, "", "")
|
|
||||||
call <SID>X("Function", s:blue, "", "")
|
|
||||||
call <SID>X("Constant", s:orange, "", "")
|
|
||||||
call <SID>X("Keyword", s:orange, "", "")
|
|
||||||
call <SID>X("String", s:green, "", "")
|
|
||||||
call <SID>X("Special", s:foreground, "", "")
|
|
||||||
call <SID>X("PreProc", s:purple, "", "")
|
|
||||||
call <SID>X("Operator", s:aqua, "", "none")
|
|
||||||
call <SID>X("Type", s:blue, "", "none")
|
|
||||||
call <SID>X("Define", s:purple, "", "none")
|
|
||||||
call <SID>X("Include", s:blue, "", "")
|
|
||||||
"call <SID>X("Ignore", "666666", "", "")
|
|
||||||
|
|
||||||
" Vim Highlighting
|
|
||||||
call <SID>X("vimCommand", s:red, "", "none")
|
|
||||||
|
|
||||||
" C Highlighting
|
|
||||||
call <SID>X("cType", s:yellow, "", "")
|
|
||||||
call <SID>X("cStorageClass", s:purple, "", "")
|
|
||||||
call <SID>X("cConditional", s:purple, "", "")
|
|
||||||
call <SID>X("cRepeat", s:purple, "", "")
|
|
||||||
|
|
||||||
" PHP Highlighting
|
|
||||||
call <SID>X("phpVarSelector", s:red, "", "")
|
|
||||||
call <SID>X("phpKeyword", s:purple, "", "")
|
|
||||||
call <SID>X("phpRepeat", s:purple, "", "")
|
|
||||||
call <SID>X("phpConditional", s:purple, "", "")
|
|
||||||
call <SID>X("phpStatement", s:purple, "", "")
|
|
||||||
call <SID>X("phpMemberSelector", s:foreground, "", "")
|
|
||||||
|
|
||||||
" Ruby Highlighting
|
|
||||||
call <SID>X("rubySymbol", s:green, "", "")
|
|
||||||
call <SID>X("rubyConstant", s:yellow, "", "")
|
|
||||||
call <SID>X("rubyAccess", s:yellow, "", "")
|
|
||||||
call <SID>X("rubyAttribute", s:blue, "", "")
|
|
||||||
call <SID>X("rubyInclude", s:blue, "", "")
|
|
||||||
call <SID>X("rubyLocalVariableOrMethod", s:orange, "", "")
|
|
||||||
call <SID>X("rubyCurlyBlock", s:orange, "", "")
|
|
||||||
call <SID>X("rubyStringDelimiter", s:green, "", "")
|
|
||||||
call <SID>X("rubyInterpolationDelimiter", s:orange, "", "")
|
|
||||||
call <SID>X("rubyConditional", s:purple, "", "")
|
|
||||||
call <SID>X("rubyRepeat", s:purple, "", "")
|
|
||||||
call <SID>X("rubyControl", s:purple, "", "")
|
|
||||||
call <SID>X("rubyException", s:purple, "", "")
|
|
||||||
|
|
||||||
" Crystal Highlighting
|
|
||||||
call <SID>X("crystalSymbol", s:green, "", "")
|
|
||||||
call <SID>X("crystalConstant", s:yellow, "", "")
|
|
||||||
call <SID>X("crystalAccess", s:yellow, "", "")
|
|
||||||
call <SID>X("crystalAttribute", s:blue, "", "")
|
|
||||||
call <SID>X("crystalInclude", s:blue, "", "")
|
|
||||||
call <SID>X("crystalLocalVariableOrMethod", s:orange, "", "")
|
|
||||||
call <SID>X("crystalCurlyBlock", s:orange, "", "")
|
|
||||||
call <SID>X("crystalStringDelimiter", s:green, "", "")
|
|
||||||
call <SID>X("crystalInterpolationDelimiter", s:orange, "", "")
|
|
||||||
call <SID>X("crystalConditional", s:purple, "", "")
|
|
||||||
call <SID>X("crystalRepeat", s:purple, "", "")
|
|
||||||
call <SID>X("crystalControl", s:purple, "", "")
|
|
||||||
call <SID>X("crystalException", s:purple, "", "")
|
|
||||||
|
|
||||||
" Python Highlighting
|
|
||||||
call <SID>X("pythonInclude", s:purple, "", "")
|
|
||||||
call <SID>X("pythonStatement", s:purple, "", "")
|
|
||||||
call <SID>X("pythonConditional", s:purple, "", "")
|
|
||||||
call <SID>X("pythonRepeat", s:purple, "", "")
|
|
||||||
call <SID>X("pythonException", s:purple, "", "")
|
|
||||||
call <SID>X("pythonFunction", s:blue, "", "")
|
|
||||||
call <SID>X("pythonPreCondit", s:purple, "", "")
|
|
||||||
call <SID>X("pythonRepeat", s:aqua, "", "")
|
|
||||||
call <SID>X("pythonExClass", s:orange, "", "")
|
|
||||||
|
|
||||||
" JavaScript Highlighting
|
|
||||||
call <SID>X("javaScriptBraces", s:foreground, "", "")
|
|
||||||
call <SID>X("javaScriptFunction", s:purple, "", "")
|
|
||||||
call <SID>X("javaScriptConditional", s:purple, "", "")
|
|
||||||
call <SID>X("javaScriptRepeat", s:purple, "", "")
|
|
||||||
call <SID>X("javaScriptNumber", s:orange, "", "")
|
|
||||||
call <SID>X("javaScriptMember", s:orange, "", "")
|
|
||||||
call <SID>X("javascriptNull", s:orange, "", "")
|
|
||||||
call <SID>X("javascriptGlobal", s:blue, "", "")
|
|
||||||
call <SID>X("javascriptStatement", s:red, "", "")
|
|
||||||
|
|
||||||
" CoffeeScript Highlighting
|
|
||||||
call <SID>X("coffeeRepeat", s:purple, "", "")
|
|
||||||
call <SID>X("coffeeConditional", s:purple, "", "")
|
|
||||||
call <SID>X("coffeeKeyword", s:purple, "", "")
|
|
||||||
call <SID>X("coffeeObject", s:yellow, "", "")
|
|
||||||
|
|
||||||
" HTML Highlighting
|
|
||||||
call <SID>X("htmlTag", s:red, "", "")
|
|
||||||
call <SID>X("htmlTagName", s:red, "", "")
|
|
||||||
call <SID>X("htmlArg", s:red, "", "")
|
|
||||||
call <SID>X("htmlScriptTag", s:red, "", "")
|
|
||||||
|
|
||||||
" Diff Highlighting
|
|
||||||
call <SID>X("diffAdd", "", "4c4e39", "")
|
|
||||||
call <SID>X("diffDelete", s:background, s:red, "")
|
|
||||||
call <SID>X("diffChange", "", "2B5B77", "")
|
|
||||||
call <SID>X("diffText", s:line, s:blue, "")
|
|
||||||
|
|
||||||
" ShowMarks Highlighting
|
|
||||||
call <SID>X("ShowMarksHLl", s:orange, s:background, "none")
|
|
||||||
call <SID>X("ShowMarksHLo", s:purple, s:background, "none")
|
|
||||||
call <SID>X("ShowMarksHLu", s:yellow, s:background, "none")
|
|
||||||
call <SID>X("ShowMarksHLm", s:aqua, s:background, "none")
|
|
||||||
|
|
||||||
" Lua Highlighting
|
|
||||||
call <SID>X("luaStatement", s:purple, "", "")
|
|
||||||
call <SID>X("luaRepeat", s:purple, "", "")
|
|
||||||
call <SID>X("luaCondStart", s:purple, "", "")
|
|
||||||
call <SID>X("luaCondElseif", s:purple, "", "")
|
|
||||||
call <SID>X("luaCond", s:purple, "", "")
|
|
||||||
call <SID>X("luaCondEnd", s:purple, "", "")
|
|
||||||
|
|
||||||
" Cucumber Highlighting
|
|
||||||
call <SID>X("cucumberGiven", s:blue, "", "")
|
|
||||||
call <SID>X("cucumberGivenAnd", s:blue, "", "")
|
|
||||||
|
|
||||||
" Go Highlighting
|
|
||||||
call <SID>X("goDirective", s:purple, "", "")
|
|
||||||
call <SID>X("goDeclaration", s:purple, "", "")
|
|
||||||
call <SID>X("goStatement", s:purple, "", "")
|
|
||||||
call <SID>X("goConditional", s:purple, "", "")
|
|
||||||
call <SID>X("goConstants", s:orange, "", "")
|
|
||||||
call <SID>X("goTodo", s:yellow, "", "")
|
|
||||||
call <SID>X("goDeclType", s:blue, "", "")
|
|
||||||
call <SID>X("goBuiltins", s:purple, "", "")
|
|
||||||
call <SID>X("goRepeat", s:purple, "", "")
|
|
||||||
call <SID>X("goLabel", s:purple, "", "")
|
|
||||||
|
|
||||||
" Clojure Highlighting
|
|
||||||
call <SID>X("clojureConstant", s:orange, "", "")
|
|
||||||
call <SID>X("clojureBoolean", s:orange, "", "")
|
|
||||||
call <SID>X("clojureCharacter", s:orange, "", "")
|
|
||||||
call <SID>X("clojureKeyword", s:green, "", "")
|
|
||||||
call <SID>X("clojureNumber", s:orange, "", "")
|
|
||||||
call <SID>X("clojureString", s:green, "", "")
|
|
||||||
call <SID>X("clojureRegexp", s:green, "", "")
|
|
||||||
call <SID>X("clojureParen", s:aqua, "", "")
|
|
||||||
call <SID>X("clojureVariable", s:yellow, "", "")
|
|
||||||
call <SID>X("clojureCond", s:blue, "", "")
|
|
||||||
call <SID>X("clojureDefine", s:purple, "", "")
|
|
||||||
call <SID>X("clojureException", s:red, "", "")
|
|
||||||
call <SID>X("clojureFunc", s:blue, "", "")
|
|
||||||
call <SID>X("clojureMacro", s:blue, "", "")
|
|
||||||
call <SID>X("clojureRepeat", s:blue, "", "")
|
|
||||||
call <SID>X("clojureSpecial", s:purple, "", "")
|
|
||||||
call <SID>X("clojureQuote", s:blue, "", "")
|
|
||||||
call <SID>X("clojureUnquote", s:blue, "", "")
|
|
||||||
call <SID>X("clojureMeta", s:blue, "", "")
|
|
||||||
call <SID>X("clojureDeref", s:blue, "", "")
|
|
||||||
call <SID>X("clojureAnonArg", s:blue, "", "")
|
|
||||||
call <SID>X("clojureRepeat", s:blue, "", "")
|
|
||||||
call <SID>X("clojureDispatch", s:blue, "", "")
|
|
||||||
|
|
||||||
" Scala Highlighting
|
|
||||||
call <SID>X("scalaKeyword", s:purple, "", "")
|
|
||||||
call <SID>X("scalaKeywordModifier", s:purple, "", "")
|
|
||||||
call <SID>X("scalaOperator", s:blue, "", "")
|
|
||||||
call <SID>X("scalaPackage", s:red, "", "")
|
|
||||||
call <SID>X("scalaFqn", s:foreground, "", "")
|
|
||||||
call <SID>X("scalaFqnSet", s:foreground, "", "")
|
|
||||||
call <SID>X("scalaImport", s:purple, "", "")
|
|
||||||
call <SID>X("scalaBoolean", s:orange, "", "")
|
|
||||||
call <SID>X("scalaDef", s:purple, "", "")
|
|
||||||
call <SID>X("scalaVal", s:purple, "", "")
|
|
||||||
call <SID>X("scalaVar", s:aqua, "", "")
|
|
||||||
call <SID>X("scalaClass", s:purple, "", "")
|
|
||||||
call <SID>X("scalaObject", s:purple, "", "")
|
|
||||||
call <SID>X("scalaTrait", s:purple, "", "")
|
|
||||||
call <SID>X("scalaDefName", s:blue, "", "")
|
|
||||||
call <SID>X("scalaValName", s:foreground, "", "")
|
|
||||||
call <SID>X("scalaVarName", s:foreground, "", "")
|
|
||||||
call <SID>X("scalaClassName", s:foreground, "", "")
|
|
||||||
call <SID>X("scalaType", s:yellow, "", "")
|
|
||||||
call <SID>X("scalaTypeSpecializer", s:yellow, "", "")
|
|
||||||
call <SID>X("scalaAnnotation", s:orange, "", "")
|
|
||||||
call <SID>X("scalaNumber", s:orange, "", "")
|
|
||||||
call <SID>X("scalaDefSpecializer", s:yellow, "", "")
|
|
||||||
call <SID>X("scalaClassSpecializer", s:yellow, "", "")
|
|
||||||
call <SID>X("scalaBackTick", s:green, "", "")
|
|
||||||
call <SID>X("scalaRoot", s:foreground, "", "")
|
|
||||||
call <SID>X("scalaMethodCall", s:blue, "", "")
|
|
||||||
call <SID>X("scalaCaseType", s:yellow, "", "")
|
|
||||||
call <SID>X("scalaLineComment", s:comment, "", "")
|
|
||||||
call <SID>X("scalaComment", s:comment, "", "")
|
|
||||||
call <SID>X("scalaDocComment", s:comment, "", "")
|
|
||||||
call <SID>X("scalaDocTags", s:comment, "", "")
|
|
||||||
call <SID>X("scalaEmptyString", s:green, "", "")
|
|
||||||
call <SID>X("scalaMultiLineString", s:green, "", "")
|
|
||||||
call <SID>X("scalaUnicode", s:orange, "", "")
|
|
||||||
call <SID>X("scalaString", s:green, "", "")
|
|
||||||
call <SID>X("scalaStringEscape", s:green, "", "")
|
|
||||||
call <SID>X("scalaSymbol", s:orange, "", "")
|
|
||||||
call <SID>X("scalaChar", s:orange, "", "")
|
|
||||||
call <SID>X("scalaXml", s:green, "", "")
|
|
||||||
call <SID>X("scalaConstructorSpecializer", s:yellow, "", "")
|
|
||||||
call <SID>X("scalaBackTick", s:blue, "", "")
|
|
||||||
|
|
||||||
" Git
|
|
||||||
call <SID>X("diffAdded", s:green, "", "")
|
|
||||||
call <SID>X("diffRemoved", s:red, "", "")
|
|
||||||
call <SID>X("gitcommitSummary", "", "", "bold")
|
|
||||||
|
|
||||||
" Delete Functions
|
|
||||||
delf <SID>X
|
|
||||||
delf <SID>rgb
|
|
||||||
delf <SID>colour
|
|
||||||
delf <SID>rgb_colour
|
|
||||||
delf <SID>rgb_level
|
|
||||||
delf <SID>rgb_number
|
|
||||||
delf <SID>grey_colour
|
|
||||||
delf <SID>grey_level
|
|
||||||
delf <SID>grey_number
|
|
||||||
endif
|
|
||||||
|
|
||||||
set background=dark
|
|
||||||
highlight NORMAL guibg=NONE
|
|
107
vim/.vimrc
107
vim/.vimrc
|
@ -1,107 +0,0 @@
|
||||||
set number
|
|
||||||
set modeline
|
|
||||||
set modelines=5
|
|
||||||
if &term =~ '^screen'
|
|
||||||
" tmux will send xterm-style keys when its xterm-keys option is on
|
|
||||||
execute "set <xUp>=\e[1;*A"
|
|
||||||
execute "set <xDown>=\e[1;*B"
|
|
||||||
execute "set <xRight>=\e[1;*C"
|
|
||||||
execute "set <xLeft>=\e[1;*D"
|
|
||||||
endif
|
|
||||||
|
|
||||||
set hlsearch
|
|
||||||
set noexpandtab
|
|
||||||
set tabstop=4
|
|
||||||
set shiftwidth=4
|
|
||||||
set softtabstop=0
|
|
||||||
set wildmode=full
|
|
||||||
set mouse=
|
|
||||||
set foldmethod=indent
|
|
||||||
set foldlevelstart=99
|
|
||||||
set cursorcolumn
|
|
||||||
set cursorline
|
|
||||||
imap kj <ESC><ESC>
|
|
||||||
|
|
||||||
set undodir=~/.vim/undodir
|
|
||||||
set undofile
|
|
||||||
|
|
||||||
" Vim Plug "
|
|
||||||
|
|
||||||
call plug#begin('~/.vim/plugged')
|
|
||||||
Plug 'valloric/MatchTagAlways'
|
|
||||||
Plug 'tyru/caw.vim'
|
|
||||||
Plug 'jiangmiao/auto-pairs'
|
|
||||||
" For func argument completion
|
|
||||||
Plug 'christoomey/vim-conflicted'
|
|
||||||
Plug 'yggdroot/indentline'
|
|
||||||
Plug 'vim-airline/vim-airline'
|
|
||||||
Plug 'vim-airline/vim-airline-themes'
|
|
||||||
Plug 'cespare/vim-toml'
|
|
||||||
Plug 'ctrlpvim/ctrlp.vim'
|
|
||||||
Plug 'pangloss/vim-javascript'
|
|
||||||
Plug 'mxw/vim-jsx'
|
|
||||||
Plug 'tpope/vim-surround'
|
|
||||||
Plug 'thanethomson/vim-jenkinsfile'
|
|
||||||
Plug 'vim-scripts/indentpython.vim'
|
|
||||||
Plug 'simnalamburt/vim-mundo'
|
|
||||||
Plug 'tpope/vim-unimpaired'
|
|
||||||
call plug#end()
|
|
||||||
|
|
||||||
autocmd BufWritePre * %s/\s\+$//e
|
|
||||||
autocmd FileType markdown setlocal formatoptions+=at
|
|
||||||
|
|
||||||
nnoremap <C-f> :noh<CR>
|
|
||||||
inoremap <C-f> <Esc>:noh<CR>i
|
|
||||||
|
|
||||||
nnoremap - :e.<CR>
|
|
||||||
nnoremap dA d$
|
|
||||||
nnoremap Y y$
|
|
||||||
|
|
||||||
map <C-k> gcc
|
|
||||||
imap <C-k> <Esc>gcci
|
|
||||||
|
|
||||||
nnoremap <C-w>' :vsp<CR><C-w>l:e.<CR>:CtrlP<CR>
|
|
||||||
inoremap <C-w>' <ESC>:vsp<CR><C-w>l:e.<CR>:CtrlP<CR>
|
|
||||||
nnoremap <C-w>" :sp<CR><C-w>j:e.<CR>:CtrlP<CR>
|
|
||||||
inoremap <C-w>" <ESC>:sp<CR><C-w>j:e.<CR>:CtrlP<CR>
|
|
||||||
|
|
||||||
nnoremap <C-w>g :vsp<CR>
|
|
||||||
inoremap <C-w>g <ESC>:vsp<CR>
|
|
||||||
nnoremap <C-w>G :sp<CR>
|
|
||||||
inoremap <C-w>G <ESC>:sp<CR>
|
|
||||||
nnoremap <C-,> :ll<CR>:lprevious<CR>
|
|
||||||
nnoremap <C-.> :ll<CR>:lnext<CR>
|
|
||||||
|
|
||||||
nnoremap <Tab> :tabnext<CR>
|
|
||||||
nnoremap <S-Tab> :tabprevious<CR>
|
|
||||||
nnoremap <C-t> :tabnew<CR>
|
|
||||||
nnoremap <C-T> :tabnew<CR>:e.<CR>
|
|
||||||
|
|
||||||
nnoremap ; :
|
|
||||||
|
|
||||||
|
|
||||||
iabbrev <// </<C-X><C-O>
|
|
||||||
let g:indentLine_char = '|'
|
|
||||||
|
|
||||||
set termguicolors
|
|
||||||
let &t_8f = "\<Esc>[38:2:%lu:%lu:%lum"
|
|
||||||
let &t_8b = "\<Esc>[48:2:%lu:%lu:%lum"
|
|
||||||
set colorcolumn=80
|
|
||||||
colorscheme Tomorrow-Night-Bright
|
|
||||||
let g:netrw_banner=0
|
|
||||||
let g:airline_theme='wombat'
|
|
||||||
let g:airline#extensions#tabline#enabled = 1
|
|
||||||
|
|
||||||
" Ignore files in .gitignore
|
|
||||||
let g:ctrlp_user_command = ['.git', 'cd %s && git ls-files -co --exclude-standard']
|
|
||||||
|
|
||||||
" Toggle spell checking on and off with `,s`
|
|
||||||
let mapleader = ","
|
|
||||||
nmap <silent> <leader>s :set spell!<CR>
|
|
||||||
nmap <leader>u :MundoToggle<CR>
|
|
||||||
|
|
||||||
" Restore cursor position
|
|
||||||
autocmd BufReadPost *
|
|
||||||
\ if line("'\"") > 1 && line("'\"") <= line("$") |
|
|
||||||
\ exe "normal! g`\"" |
|
|
||||||
\ endif
|
|
Loading…
Reference in New Issue