Skip to content

Commit

Permalink
feat(zsh) config purge
Browse files Browse the repository at this point in the history
  • Loading branch information
yannvr committed Apr 19, 2022
1 parent 197bd26 commit d7d7790
Show file tree
Hide file tree
Showing 9 changed files with 9,470 additions and 88 deletions.
7 changes: 5 additions & 2 deletions .vimrc.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
set nocompatible " Must be first line
set list listchars=tab:→\ ,trail:·

" Formatting
" set nowrap " Do not wrap long lines
Expand All @@ -25,8 +26,10 @@ set nojoinspaces " Prevents inserting two spaces after punctuatio
set splitright " Puts new vsplit windows to the right of the current
set splitbelow " Puts new split windows to the bottom of the current
set ff=unix " Automatically converts to unix

" colorscheme solarized8
set dictionary=/usr/share/dict/words
set complete+=k
set hls
" colorscheme solarized8:
" colorscheme clearance
" colorscheme material
colorscheme desert
Expand Down
130 changes: 65 additions & 65 deletions .vimrc.conf.base
Original file line number Diff line number Diff line change
Expand Up @@ -182,70 +182,70 @@ endif

" GUI Settings

" GVIM- (here instead of .gvimrc)
if has('gui_running')
set guioptions-=T " Remove the toolbar
set lines=40 " 40 lines of text instead of 24
"if !exists("g:spf13_no_big_font")
"if LINUX() && has("gui_running")
"set guifont=Andale\ Mono\ Regular\ 12,Menlo\ Regular\ 11,Consolas\ Regular\ 12,Courier\ New\ Regular\ 14
"elseif OSX() && has("gui_running")
"set guifont=Andale\ Mono\ Regular:h12,Menlo\ Regular:h11,Consolas\ Regular:h12,Courier\ New\ Regular:h14
"elseif WINDOWS() && has("gui_running")
"set guifont=Andale_Mono:h10,Menlo:h10,Consolas:h10,Courier_New:h10
"endif
"endif
else
if &term == 'xterm' || &term == 'screen'
set t_Co=256 " Enable 256 colors to stop the CSApprox warning and make xterm vim shine
endif
"set term=builtin_ansi " Make arrow and other keys work
endif

"

" Functions

" Initialize directories

" Strip whitespace
function! StripTrailingWhitespace()
" Preparation: save last search, and cursor position.
let _s=@/
let l = line(".")
let c = col(".")
" do the business:
%s/\s\+$//e
" clean up: restore previous search history, and cursor position
let @/=_s
call cursor(l, c)
endfunction
"

" Shell command
function! s:RunShellCommand(cmdline)
botright new

setlocal buftype=nofile
setlocal bufhidden=delete
setlocal nobuflisted
setlocal noswapfile
setlocal nowrap
setlocal filetype=shell
setlocal syntax=shell

call setline(1, a:cmdline)
call setline(2, substitute(a:cmdline, '.', '=', 'g'))
execute 'silent $read !' . escape(a:cmdline, '%#')
setlocal nomodifiable
1
endfunction

command! -complete=file -nargs=+ Shell call s:RunShellCommand(<q-args>)
" e.g. Grep current file for <search_term>: Shell grep -Hn <search_term> %
"
"" GVIM- (here instead of .gvimrc)
"if has('gui_running')
" set guioptions-=T " Remove the toolbar
" set lines=40 " 40 lines of text instead of 24
" "if !exists("g:spf13_no_big_font")
" "if LINUX() && has("gui_running")
" "set guifont=Andale\ Mono\ Regular\ 12,Menlo\ Regular\ 11,Consolas\ Regular\ 12,Courier\ New\ Regular\ 14
" "elseif OSX() && has("gui_running")
" "set guifont=Andale\ Mono\ Regular:h12,Menlo\ Regular:h11,Consolas\ Regular:h12,Courier\ New\ Regular:h14
" "elseif WINDOWS() && has("gui_running")
" "set guifont=Andale_Mono:h10,Menlo:h10,Consolas:h10,Courier_New:h10
" "endif
" "endif
"else
" if &term == 'xterm' || &term == 'screen'
" set t_Co=256 " Enable 256 colors to stop the CSApprox warning and make xterm vim shine
" endif
" "set term=builtin_ansi " Make arrow and other keys work
"endif

function! s:ExpandFilenameAndExecute(command, file)
execute a:command . " " . expand(a:file, ":p")
endfunction
""

"" Functions

"" Initialize directories

"" Strip whitespace
"function! StripTrailingWhitespace()
" " Preparation: save last search, and cursor position.
" let _s=@/
" let l = line(".")
" let c = col(".")
" " do the business:
" %s/\s\+$//e
" " clean up: restore previous search history, and cursor position
" let @/=_s
" call cursor(l, c)
"endfunction
""

"" Shell command
"function! s:RunShellCommand(cmdline)
" botright new

" setlocal buftype=nofile
" setlocal bufhidden=delete
" setlocal nobuflisted
" setlocal noswapfile
" setlocal nowrap
" setlocal filetype=shell
" setlocal syntax=shell

" call setline(1, a:cmdline)
" call setline(2, substitute(a:cmdline, '.', '=', 'g'))
" execute 'silent $read !' . escape(a:cmdline, '%#')
" setlocal nomodifiable
" 1
"endfunction

"command! -complete=file -nargs=+ Shell call s:RunShellCommand(<q-args>)
"" e.g. Grep current file for <search_term>: Shell grep -Hn <search_term> %
""

"function! s:ExpandFilenameAndExecute(command, file)
" execute a:command . " " . expand(a:file, ":p")
"endfunction

16 changes: 4 additions & 12 deletions .vimrc.maps
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ if has('nvim')
nnoremap <leader>o :below 10sp term://$SHELL<cr>
endif

" imap jj <Esc>
imap jj <Esc>

imap <leader><leader> <C-y>,<CR>
" multiple cursors to remap
Expand Down Expand Up @@ -31,8 +31,7 @@ vnoremap <leader>d "_d
vnoremap <leader>p "_dP

" Buffers
imap … <Esc>:w<CR>
map … <Esc>:w<CR>
nnoremap … :w<CR>
nnoremap ¡ :buf1<CR>
nnoremap € :buf2<CR>
nnoremap # :buf3<CR>
Expand Down Expand Up @@ -60,17 +59,10 @@ nnoremap <Space> i_<Esc>r
nnoremap <leader>R :source ~/.vimrc<CR>
nnoremap <Leader>e :Lexplore<CR>c

"lll map :convertLineEnding<<CR>%s/\r/\r/g<CR>
" map :convertLineEnding<<CR>%s/\r/\r/g<CR>

"Sessions
"S-L
"ll map :convertLineEnding<<CR>%s/\r/\r/g<CR>
"S-L
"
"
"
command ReplaceCR %s/\\n/\r/g
command ConvertLineEnding %s/\\n/\r/g

nnoremap ¬ :OpenSession<CR>
nnoremap <leader>sl :OpenSession<CR>
nnoremap <leader>sd :DeleteSession<CR>
Expand Down
2 changes: 1 addition & 1 deletion .vimrc.plugin
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ NeoBundleLazy 'simnalamburt/vim-mundo'
" Nav
" NeoBundle 'easymotion/vim-easymotion'
NeoBundle 'jlanzarotta/bufexplorer'
NeoBundle 'numkil/ag.nvim'
" NeoBundle 'numkil/ag.nvim'

" Themes
NeoBundle 'vim-airline/vim-airline'
Expand Down
31 changes: 27 additions & 4 deletions .zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ ZSH_THEME="wezm"
ENABLE_CORRECTION="false"
DISABLE_UNTRACKED_FILES_DIRTY="true"
# plugins=(fzf colored-man-pages yarn brew cp git gitfast history node npm nvm themes web-search zsh-navigation-tools z zsh_reload pip themes)
plugins=(fzf colored-man-pages yarn brew cp git gitfast history node npm nvm themes web-search zsh-navigation-tools z zsh_reload pip)
# plugins=(fzf colored-man-pages yarn brew cp git gitfast history node npm nvm themes web-search zsh-navigation-tools z pip)
plugins=(fzf yarn brew cp git gitfast history zsh-navigation-tools z pip)
source $ZSH/oh-my-zsh.sh

# User configuration
Expand Down Expand Up @@ -105,7 +106,29 @@ then
eval "$(pyenv init -)"
fi

# export NVM_DIR="$HOME/.nvm"
# [ -s "/usr/local/opt/nvm/nvm.sh" ] && . "/usr/local/opt/nvm/nvm.sh" # This loads nvm
# [ -s "/usr/local/opt/nvm/etc/bash_completion" ] && . "/usr/local/opt/nvm/etc/bash_completion" # This loads nvm bash_completion
# zprof
export PATH="/usr/local/opt/python@3.7/bin:$PATH"
export PATH="/usr/local/opt/python@3.7/bin:$PATH"
export PATH="/usr/local/opt/python@3.7/bin:$PATH"
export PATH="/usr/local/opt/python@3.7/bin:$PATH"
export PATH="/usr/local/opt/python@3.7/bin:$PATH"
export PATH="/usr/local/opt/python@3.7/bin:$PATH"
export PATH="/usr/local/opt/python@3.7/bin:$PATH"
export PATH="/usr/local/opt/python@3.7/bin:$PATH"
export PATH="/usr/local/opt/python@3.7/bin:$PATH"
export PATH="/usr/local/opt/python@3.7/bin:$PATH"
export PATH="/usr/local/opt/python@3.7/bin:$PATH"
export PATH="/usr/local/opt/python@3.7/bin:$PATH"
export PATH="/usr/local/opt/python@3.7/bin:$PATH"
export PATH="/usr/local/opt/python@3.7/bin:$PATH"
export PATH="/usr/local/opt/python@3.7/bin:$PATH"
export PATH="/usr/local/opt/python@3.7/bin:$PATH"
export PATH="/usr/local/opt/python@3.7/bin:$PATH"
export PATH="/usr/local/opt/python@3.7/bin:$PATH"
export PATH="/usr/local/opt/python@3.7/bin:$PATH"
export PATH="/usr/local/opt/python@3.7/bin:$PATH"
export PATH="/usr/local/opt/python@3.7/bin:$PATH"
export PATH="/usr/local/opt/python@3.7/bin:$PATH"
export PATH="/usr/local/opt/python@3.7/bin:$PATH"
export PATH="/usr/local/opt/python@3.7/bin:$PATH"
export PATH="/usr/local/opt/python@3.7/bin:$PATH"
8 changes: 5 additions & 3 deletions .zshrc-e
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ export EDTIOR=/usr/local/bin/vim
# source "/usr/local/share/chtf/chtf.sh"
# fi

# export NVM_DIR="$HOME/.nvm"
# [ -s "/usr/local/opt/nvm/nvm.sh" ] && . "/usr/local/opt/nvm/nvm.sh" # This loads nvm
# [ -s "/usr/local/opt/nvm/etc/bash_completion" ] && . "/usr/local/opt/nvm/etc/bash_completion"
export NVM_DIR="$HOME/.nvm"
[ -s "/usr/local/opt/nvm/nvm.sh" ] && . "/usr/local/opt/nvm/nvm.sh" # This loads nvm
[ -s "/usr/local/opt/nvm/etc/bash_completion" ] && . "/usr/local/opt/nvm/etc/bash_completion"

# eval $(thefuck --alias)

Expand All @@ -40,3 +40,5 @@ export PATH=$PATH:$ANDROID_HOME/tools
export PATH=$PATH:$ANDROID_HOME/tools/bin
export PATH=$PATH:$ANDROID_HOME/platform-tools
export PATH=$YARN_GLOBAL_BIN:/usr/local/opt/python/libexec/bin/:$PATH
# export PATH=$YARN_GLOBAL_BIN:/usr/local/opt/python/libexec/bin/:$PATH
export PATH=$YARN_GLOBAL_BIN:$PATH
5 changes: 4 additions & 1 deletion .zshrc.alias
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@ a large-files="du -ah . | sort -nr | head"
a tf='tail -f '
a ag='ag -a'
a jtags="ctags -R src && sed -i '' -E '/^(if|switch|function|module\.exports|it|describe).+language:js$/d' tags"
a fu='fuck'
a f='fuck'
a sl='screen -list'
a sr'screen -r'
a sd'screen -d'

a myip="curl http://ipecho.net/plain; echo"
a whatsmyip=myip
a fix-gitignore='git rm -r --cached . && git add . && git commit -m "fixed untracked files"'
Expand All @@ -43,6 +44,8 @@ else
a v='vim -c "set noautochdir" --cmd "set noautochdir"'
fi

# Yarn
a ytu='yarn test -u'

# Git
a gp='git push'
Expand Down
7 changes: 7 additions & 0 deletions .zshrc.local
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
a onboard-commerzbank='python dbsetup/scripts/glide_createuser.py --endpoint https://commerzbank.alphakinetic.com:34000/json --username jacky_zhang --password akrcm2017 --environment commerzbank csv --filename ~/Documents/glide-onboarding-accounts.csv'
a onboard-hayfin-test='python dbsetup/scripts/glide_createuser.py --endpoint https://hayfin-test.alphakinetic.com:34000/json --username jacky_zhang --password akrcm2017 --environment hayfin-test csv --filename ~/Documents/glide-onboarding-accounts.csv'
a onboard-rcm-test='python dbsetup/scripts/glide_createuser.py --endpoint https://rcm-test.alphakinetic.com:34000/json --username jacky_zhang --password akrcm2017 --environment rcm-test csv --filename ~/Documents/glide-onboarding-accounts.csv'


export NVM_DIR="$HOME/.nvm"
[ -s "/usr/local/opt/nvm/nvm.sh" ] && . "/usr/local/opt/nvm/nvm.sh" # This loads nvm
[ -s "/usr/local/opt/nvm/etc/bash_completion" ] && . "/usr/local/opt/nvm/etc/bash_completion" # This loads nvm bash_completion

echo 'export PATH="/usr/local/opt/python@3.7/bin:$PATH"' >> ~/.zshrc
Loading

0 comments on commit d7d7790

Please sign in to comment.