Skip to content

Commit

Permalink
adding ealiases, changing some colours
Browse files Browse the repository at this point in the history
  • Loading branch information
finbarrocallaghan committed Mar 13, 2015
1 parent 2576f8f commit 1db5c2c
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 5 deletions.
2 changes: 1 addition & 1 deletion tmux.conf
Expand Up @@ -43,7 +43,7 @@ set -g status-interval 10

set -g status-fg white
set -g status-bg default
set -g status-left "#[fg=colour14]#(whoami)@#H #[fg=colour11]#S#[default]"
set -g status-left "#[fg=colour8]#(whoami)@#H #[fg=colour11] #S #[default]"
set -g status-right "#[fg=white] #(date "+%-d/%-m/%y") #[fg=colour14]%H:%M:%S #[default]"

set -g status-left-length 100
Expand Down
3 changes: 3 additions & 0 deletions vimrc
Expand Up @@ -141,6 +141,7 @@ endfunction
nnoremap <leader>dw :call TrimWhiteSpace()<CR>


" Space to toggle folds.
nmap <leader><Space> za
vmap <leader><Space> za
Expand All @@ -153,11 +154,13 @@ nmap <silent> <leader>v :so ~/.vimrc<CR>
nmap <silent> <leader>p :set invpaste<CR>:set paste?<CR>
nmap <silent> <leader>nu :set nu!<CR>
nmap <silent> <leader>ul :t.\|s/./=/g\|set nohls<cr>
nmap <silent> <leader>n :set invnumber<CR>
nmap <silent> <leader>bd :bd<CR>:bn<CR>
noremap <leader>c a<C-X><C-S>

"}}}

""bundles/plugins etc.. -----------------------------------------------------{{{
Expand Down
33 changes: 29 additions & 4 deletions zshrc
@@ -1,7 +1,7 @@
#.zshrc

pri_color='yellow'
sec_color='blue'
pri_color='black'
sec_color='yellow'

#LANG="en_IE.utf8"
#LC_ALL="en_IE.utf8"
Expand Down Expand Up @@ -166,14 +166,39 @@ compdef _git gco=git-checkout

return_code="%(?..%B%F{$pri_color}[%F{red}%?%F{$pri_color}]%f)"

if [ -f ~/.zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh ]; then
source ~/.zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
ealiases=()

function ealias()
{
alias $1
ealiases+=(${1%%\=*})
}

function expand-ealias()
{
if [[ $LBUFFER =~ "(^|[;|&])\s*(${(j:|:)ealiases})\$" ]]; then
zle _expand_alias
zle expand-word
fi
zle magic-space
}

zle -N expand-ealias

bindkey -M viins ' ' expand-ealias
bindkey -M viins '^ ' magic-space # control-space to bypass completion
bindkey -M isearch " " magic-space # normal space during searches


if [ -f ~/.zshrc.local ]; then
source ~/.zshrc.local
fi

if [ -f ~/.zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh ]; then
source ~/.zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
fi


if [ -f ~/.zsh/zsh_functions ]; then
source ~/.zsh/zsh_functions
fi

0 comments on commit 1db5c2c

Please sign in to comment.