Skip to content

Commit

Permalink
add new settings
Browse files Browse the repository at this point in the history
  • Loading branch information
Matsui Masashi committed Feb 26, 2021
1 parent 0d6fb45 commit 66fd7c8
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 15 deletions.
15 changes: 11 additions & 4 deletions .bash_aliases → .aliases
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
alias ls='exa'
alias cat='bat'
alias grep='rg'
alias find='fd'

alias ll='ls -al'
alias ls='ls -G'
alias vi='vim'


case ${OSTYPE} in
darwin*)
Expand All @@ -11,6 +15,7 @@ case ${OSTYPE} in
;;
esac


function cd-fzf() {
moveto=./$(ls -d */ | fzf --reverse)
cd $moveto
Expand All @@ -22,23 +27,25 @@ function ghq-fzf() {
}

function vi-fzf() {
moveto=./$(find . -maxdepth 1 -type f | fzf --reverse)
moveto=./$(find . -d 1 --type f | fzf --reverse)
vim $moveto
}

function nodenv-fzf() {
nodenv versions | fzf --reverse | sed -e 's/* //g' | xargs nodenv local && nodenv version
}

function rbenv-fzf() {
rbenv versions | fzf --reverse | sed -e 's/* //g' | xargs rbenv local && rbenv version
}

function pyenv-fzf() {
pyenv versions | fzf --reverse | sed -e 's/* //g' | xargs pyenv local && pyenv version
}

alias fcd=cd-fzf
alias cr=ghq-fzf
alias fvi=vi-fzf
alias fvim=vi-fzf
alias fjs=nodenv-fzf
alias frb=rbenv-fzf
alias fpy=pyenv-fzf
9 changes: 5 additions & 4 deletions .bashrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
if [ -f ~/.aliases ]; then
. ~/.aliases
fi

export PATH="$HOME/.anyenv/bin:$PATH"
eval "$(anyenv init -)"
export PATH="$HOME/.anyenv/bin:$HOME/.cargo/bin:$HOME/go/1.16beta1/bin:$PATH"
eval "$(starship init bash)"
eval "$(anyenv init -)"

36 changes: 36 additions & 0 deletions .vimrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
set fenc=utf-8
set ambiwidth=double
set nobackup
set noswapfile
set autoread

set showcmd
set laststatus=2
set visualbell
set display=lastline
set pumheight=10

syntax enable
set number
" set cursorline
" set cursorcolumn
set showmatch
set matchtime=1

set smartindent
set expandtab
set shiftwidth=4
set tabstop=4

set ignorecase
set smartcase
set incsearch
set wrapscan
set hlsearch
set showmatch

nmap <Esc><Esc> :nohlsearch<CR><Esc>
nnoremap Y y$
nnoremap + <C-a>
nnoremap - <C-x>
12 changes: 5 additions & 7 deletions .zshrc
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
if [ -f ~/.aliases ]; then
. ~/.aliases
fi

export PATH="/usr/local/opt/curl/bin:$PATH"
export LDFLAGS="-L/usr/local/opt/curl/lib"
export CPPFLAGS="-I/usr/local/opt/curl/include"

export PATH="$HOME/.anyenv/bin:$PATH"
eval "$(anyenv init -)"
export PATH="$HOME/.anyenv/bin:$HOME/.cargo/bin:$HOME/go/1.16beta1/bin:$PATH"
eval "$(starship init zsh)"
eval "$(anyenv init -)"

0 comments on commit 66fd7c8

Please sign in to comment.