Skip to content
This repository has been archived by the owner on Feb 1, 2021. It is now read-only.

Commit

Permalink
Minor updates
Browse files Browse the repository at this point in the history
  • Loading branch information
ziwon committed Jan 27, 2019
1 parent 355ef61 commit ab43b6a
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 10 deletions.
1 change: 1 addition & 0 deletions Brewfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ brew 'htop'
brew 'httpie'
brew 'hugo'
brew 'kafkacat'
brew 'kubectx'
brew 'kubeval'
brew 'iftop'
brew 'jq'
Expand Down
1 change: 1 addition & 0 deletions bash/.aliases
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ alias ~="cd ~" # `cd` is probably faster to type though
alias d="cd ~/Downloads"
alias w="cd ~/Workspace"
alias z="cd ~/Workspace/GitHub/ziwon"
alias k8s="cd ~/Workspace/Golang/src/k8s.io"
alias g="git"
alias dk="docker"
alias dkc="docker-compose"
Expand Down
2 changes: 1 addition & 1 deletion bash/.exports
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
export SHELL='/usr/local/bin/bash'

# Make vim the default editor.
export EDITOR='vim';
export EDITOR='nvim';

# Enable persistent REPL history for `node`.
export NODE_REPL_HISTORY=~/.node_history;
Expand Down
9 changes: 6 additions & 3 deletions nvim/init.vim
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Plug 'tpope/vim-rhubarb' " Depenency for tpope/fugitive
" General plugins
Plug 'Shougo/deoplete.nvim', { 'do': ':updateremoteplugins' }
Plug 'Shougo/denite.nvim'
Plug 'Shougo/vimshell.vim'
Plug 'Shougo/neosnippet'
Plug 'Shougo/neosnippet-snippets' " Default snippets for many languages
Plug 'bling/vim-airline'
Expand Down Expand Up @@ -461,13 +462,13 @@ nnoremap <leader>d :NERDTreeToggle<cr>
nnoremap <F2> :NERDTreeToggle<cr>
" Directly open NerdTree on the file
nnoremap <silent> <Leader>nd :NERDTreeFind<CR>
nnoremap <silent> <Leader>df :NERDTreeFind<CR>
" Opens a NERDTree that closes on file selection,
nnoremap <Leader>d :let NERDTreeQuitOnOpen = 1<bar>NERDTreeToggle<CR>
nnoremap <Leader>dq :let NERDTreeQuitOnOpen = 1<bar>NERDTreeToggle<CR>
" Opens a persistent/pinned NERDTree.
nnoremap <Leader>D :let NERDTreeQuitOnOpen = 0<bar>NERDTreeToggle<CR>
nnoremap <Leader>do :let NERDTreeQuitOnOpen = 0<bar>NERDTreeToggle<CR>
" Files to ignore
let NERDTreeIgnore = [
Expand Down Expand Up @@ -584,6 +585,8 @@ au FileType go nmap <F8> :GoMetaLinter<cr>
au FileType go nmap <F9> :GoCoverageToggle -short<cr>
au FileType go nmap <F10> :GoTest -short<cr>
au FileType go nmap <F12> <Plug>(go-def)
au FileType go nmap <leader>gcr :GoCallers<cr>
au FileType go nmap <leader>gcl :GoCallees<cr>
au Filetype go nmap <leader>ga <Plug>(go-alternate-edit)
au Filetype go nmap <leader>gah <Plug>(go-alternate-split)
au Filetype go nmap <leader>gav <Plug>(go-alternate-vertical)
Expand Down
1 change: 1 addition & 0 deletions zsh/.aliases.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ alias ~="cd ~" # `cd` is probably faster to type though
alias d="cd ~/Downloads"
alias w="cd ~/Workspace"
alias z="cd ~/Workspace/GitHub/ziwon"
alias k8s="cd ~/Workspace/Golang/src/k8s.io"
alias g="git"
alias dk="docker"
alias dkc="docker-compose"
Expand Down
4 changes: 2 additions & 2 deletions zsh/.exports.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin"
export PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH"

# Make vim the default editor.
export EDITOR='vim';
export EDITOR='nvim';

# Make Python use UTF-8 encoding for output to stdin, stdout, and stderr.
export PYTHONIOENCODING='UTF-8';
Expand Down Expand Up @@ -69,4 +69,4 @@ export GOBIN="$GOPATH/bin"
export PATH="$GOBIN:$PATH"

# k8s dind cluster
export PATH="$HOME/.kubeadm-dind-cluster:$PATH"
export PATH="$HOME/.kubeadm-dind-cluster:$PATH"
4 changes: 2 additions & 2 deletions zsh/.zplugin.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ zplugin light chrissicool/zsh-256color

# Zplugin
zplugin light zdharma/history-search-multi-word
zplugin light b4b4r07/enhancd
zplugin light bric3/nice-exit-code
zplugin light zsh-users/zsh-completions
zplugin light zsh-users/zsh-autosuggestions
zplugin light djui/alias-tips
zplugin light dbz/kube-aliases
zplugin snippet OMZ::plugins/common-aliases/common-aliases.plugin.zsh
zplugin snippet OMZ::plugins/colored-man-pages/colored-man-pages.plugin.zsh
zplugin snippet OMZ::plugins/golang/golang.plugin.zsh
zplugin ice as"completion"; zplugin snippet https://github.com/docker/cli/blob/master/contrib/completion/zsh/_docker
zplugin ice as"completion"; zplugin snippet https://github.com/robbyrussell/oh-my-zsh/blob/master/plugins/docker-compose/_docker-compose
Expand Down
21 changes: 19 additions & 2 deletions zsh/.zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,32 @@ for file in ~/.{exports,aliases,functions,extra,prompt}.zsh; do
done;
unset file;

setopt inc_append_history # write to history immediately
setopt share_history # share history among terminals
setopt extended_history # save extended info in history
setopt hist_ignoredups # ignore duplicates

bindkey -v

bindkey "^R" history-search-multi-word # ctrl-r
bindkey "^A" beginning-of-line # ctrl-a
bindkey "^E" end-of-line # ctrl-e
bindkey "^F" forward-word # ctrl-f
bindkey "^B" backward-word # ctrl-b
bindkey "^K" vi-change-whole-line # ctrl-k

# Fix conflicts with ctrl-{h,j,k,l} in tmux
bindkey "^[" vi-change-whole-line # ctrl-l -> ctrl-[
bindkey "^]" clear-screen # ctrl-k -> ctrl-]
bindkey "^G" vi-backward-delete-char # ctrl-h -> ctrl-g
bindkey "^O" accept-line # ctrl-j -> ctrl-o

zstyle ":history-search-multi-word" page-size "5" # number of entries to show (default is $LINES/3)
zstyle ":history-search-multi-word" highlight-color "fg=yellow,bold" # color in which to highlight matched, searched text (default bg=17 on 256-color terminals)
zstyle ":plugin:history-search-multi-word" synhl "yes" # whether to perform syntax highlighting (default true)
zstyle ":plugin:history-search-multi-word" active "underline" # effect on active history entry. Try: standout, bold, bg=blue (default underline)
zstyle ":plugin:history-search-multi-word" check-paths "yes" # whether to check paths for existence and mark with magenta (default true)
zstyle ":plugin:history-search-multi-word" clear-on-cancel "no" # whether pressing

[ $commands[minikube] ] && source <(minikube completion zsh);
[ $commands[kubectl] ] && source <(kubectl completion zsh);
[ $commands[helm] ] && source <(helm completion zsh);
[ $commands[helm] ] && source <(helm completion zsh);

0 comments on commit ab43b6a

Please sign in to comment.