added erc
This commit is contained in:
5
Makefile
5
Makefile
@@ -1,4 +1,4 @@
|
||||
all: bash cardinal ghc git input python sbcli scripts tmux valgrind vim zepto zsh
|
||||
all: bash cardinal e ghc git input python sbcli scripts tmux valgrind vim zepto zsh
|
||||
|
||||
bash:
|
||||
cp bash_profile ~/.bash_profile
|
||||
@@ -6,6 +6,9 @@ bash:
|
||||
cardinal:
|
||||
cp cardinalrc ~/.cardinalrc
|
||||
|
||||
e:
|
||||
cp erc ~/.erc
|
||||
|
||||
ghc:
|
||||
cp -r cabal/config ~/.cabal/config
|
||||
cp ghci ~/.ghci
|
||||
|
56
erc
Normal file
56
erc
Normal file
@@ -0,0 +1,56 @@
|
||||
set_tab(2)
|
||||
|
||||
function starts(String,Start)
|
||||
return string.sub(String,1,string.len(Start))==Start
|
||||
end
|
||||
|
||||
meta_commands["blame"] = function()
|
||||
_, y = get_coords()
|
||||
handle = io.popen("git blame --porcelain -L"..tostring(math.floor(y)+1)..","..tostring(math.floor(y)+1).." "..get_filename())
|
||||
lines = handle:read("*a")
|
||||
handle:close()
|
||||
|
||||
author = string.match(lines, "author (%a+)")
|
||||
|
||||
message(author)
|
||||
end
|
||||
|
||||
keys["%"] = function()
|
||||
s = get_text()
|
||||
count = 0
|
||||
|
||||
for word in s:gmatch("%w+") do count = count + 1 end
|
||||
|
||||
message(count .. " words")
|
||||
end
|
||||
|
||||
keys["!"] = function()
|
||||
command = prompt("shell command: %s")
|
||||
command = string.gsub(command, "%$", get_filename())
|
||||
handle = io.popen(command)
|
||||
result = handle:read("*a")
|
||||
handle:close()
|
||||
|
||||
result = string.gsub(result, "\n", " ")
|
||||
message(result)
|
||||
end
|
||||
|
||||
function get_meta_commands()
|
||||
res = ""
|
||||
|
||||
for k, _ in pairs(meta_commands) do
|
||||
res = res .. k .. ", "
|
||||
end
|
||||
|
||||
return res
|
||||
end
|
||||
|
||||
function get_keys()
|
||||
res = ""
|
||||
|
||||
for k, _ in pairs(keys) do
|
||||
res = res .. k .. ", "
|
||||
end
|
||||
|
||||
return res
|
||||
end
|
1
vimrc
1
vimrc
@@ -89,6 +89,7 @@ Bundle 'Twinside/vim-hoogle'
|
||||
Bundle 'digitaltoad/vim-jade'
|
||||
Bundle 'zepto-lang/zepto-vim'
|
||||
Bundle 'hellerve/luna-vim'
|
||||
Bundle 'tikhomirov/vim-glsl'
|
||||
Plugin 'rust-lang/rust.vim'
|
||||
|
||||
" Custom bundles
|
||||
|
9
zshrc
9
zshrc
@@ -36,9 +36,9 @@ export JAVA_HOME=`/usr/libexec/java_home -v 1.8`
|
||||
export GH_HOME=~/Documents/Code/Github
|
||||
export EDITOR=vim
|
||||
alias dob="git branch --merged | grep -vE '(\*)|(master)|(dev)' | xargs -n 1 git branch -d"
|
||||
alias vi="stty stop '' -ixoff ; vim"
|
||||
alias gcc="gcc-6"
|
||||
alias g++="g++-6"
|
||||
alias vi="stty stop '' -ixoff ; stty erase '^?'; vim"
|
||||
alias gcc="gcc-7"
|
||||
alias g++="g++-7"
|
||||
alias increment_version="zepto ~/.scripts/vincr.zp"
|
||||
alias mk="make"
|
||||
alias psh="perl ~/.scripts/psh"
|
||||
@@ -210,6 +210,7 @@ save_dotfiles(){
|
||||
cp -r ~/.scripts ${DOTPATH}
|
||||
cp ~/.bash_profile ${DOTPATH}bash_profile
|
||||
cp ~/.cardinalrc ${DOTPATH}cardinalrc
|
||||
cp ~/.erc ${DOTPATH}erc
|
||||
cp ~/.ghci ${DOTPATH}ghci
|
||||
cp ~/.gitconfig ${DOTPATH}gitconfig
|
||||
cp ~/.gitignore ${DOTPATH}gitignore
|
||||
@@ -322,4 +323,6 @@ function zeptosay () {
|
||||
|
||||
fortune | zeptosay
|
||||
|
||||
eval `opam config env`
|
||||
|
||||
source ~/.zshrc.priv
|
||||
|
Reference in New Issue
Block a user