mirror of
https://github.com/chenasraf/dotfiles.git
synced 2026-05-17 17:28:07 +00:00
feat: updates
This commit is contained in:
@@ -116,3 +116,6 @@ vim.keymap.set("n", "<leader>Srv", function()
|
||||
vim.cmd(":silent !open http://localhost:5500")
|
||||
vim.cmd("belowright split | terminal " .. cmd)
|
||||
end, { desc = "Serve working directory" })
|
||||
|
||||
vim.cmd("command! Pwd :echo expand('%:p:h')<CR>")
|
||||
vim.cmd("command! Pwf :echo expand('%:p')<CR>")
|
||||
|
||||
17
.zshrc
17
.zshrc
@@ -18,20 +18,21 @@ export fpath=("$DOTFILES/completions" $fpath)
|
||||
zstyle ':completion:*:*:*:*:*' menu select
|
||||
|
||||
# Use ESC to edit the current command line:
|
||||
autoload -U edit-command-line
|
||||
zle -N edit-command-line
|
||||
# bindkey '\033\033' edit-command-line
|
||||
bindkey -M vicmd V edit-command-line
|
||||
bindkey "^[[1;3C" forward-word
|
||||
bindkey "^[[1;3D" backward-word
|
||||
# check if edit-command-line not already loaded
|
||||
if [[ ! -n "$(bindkey -L | grep edit-command-line)" ]]; then
|
||||
autoload -U edit-command-line
|
||||
zle -N edit-command-line
|
||||
bindkey -M vicmd V edit-command-line
|
||||
# back/forward word
|
||||
bindkey "^[[1;3C" forward-word
|
||||
bindkey "^[[1;3D" backward-word
|
||||
fi
|
||||
|
||||
|
||||
# echo 'Loading '$DOTFILES/exports.sh
|
||||
source $DOTFILES/exports.sh # must run before zsh_init
|
||||
# echo 'Loading '$DOTFILES/aliases.sh
|
||||
source $DOTFILES/aliases.sh
|
||||
# echo 'Loading '$DOTFILES/sources.sh
|
||||
source $DOTFILES/sources.sh
|
||||
# echo 'Loading '$DOTFILES/scripts/home/home.sh
|
||||
source $DOTFILES/scripts/home/home.sh
|
||||
# echo 'Loading '$DOTFILES/zsh_init.sh
|
||||
|
||||
@@ -8,8 +8,8 @@ if is_mac; then
|
||||
# export PATH="/opt/homebrew/opt/ruby/bin:$PATH"
|
||||
export PATH="/opt/homebrew/opt/flex/bin:$PATH"
|
||||
export PATH="/opt/homebrew/opt/make/libexec/gnubin:$PATH"
|
||||
export PATH="$HOME/Library/Python/3.10/bin:$PATH"
|
||||
export PATH="$HOME/Library/Python/3.8/bin:$PATH"
|
||||
# export PATH="$HOME/Library/Python/3.10/bin:$PATH"
|
||||
# export PATH="$HOME/Library/Python/3.8/bin:$PATH"
|
||||
export PATH="/Applications/Postgres.app/Contents/Versions/latest/bin:$PATH"
|
||||
export PATH="/Applications/Visual Studio Code.app/Contents/Resources/app/bin:$PATH"
|
||||
export PATH="$HOME/.surrealdb:$PATH"
|
||||
@@ -80,3 +80,8 @@ fi
|
||||
if [[ -f "$HOME/.cargo/env" ]]; then
|
||||
. "$HOME/.cargo/env"
|
||||
fi
|
||||
|
||||
if [[ -f ~/.fzf.zsh ]]; then source ~/.fzf.zsh; fi
|
||||
if [[ -f /opt/homebrew/opt/chruby/share/chruby/chruby.sh ]]; then source /opt/homebrew/opt/chruby/share/chruby/chruby.sh; fi
|
||||
if [[ -f $(which rbenv) ]]; then eval "$(rbenv init - zsh)"; fi
|
||||
if [[ -f "$HOME/.dotfiles/_local.sh" ]]; then source "$HOME/.dotfiles/_local.sh"; fi
|
||||
|
||||
24
functions.sh
24
functions.sh
@@ -349,25 +349,29 @@ tn-custom () {
|
||||
tabname="$winname"
|
||||
fi
|
||||
|
||||
# sleep 0.1
|
||||
# echo new-window -n $tabname -c $dir
|
||||
# create new window
|
||||
tmux new-window -n $tabname -c $dir
|
||||
# echo
|
||||
|
||||
# sleep 0.1
|
||||
# echo send-keys -t $winname:$tabname v . Enter
|
||||
# open vim on main pane
|
||||
tmux send-keys -t $winname:$tabname v Enter
|
||||
# echo
|
||||
|
||||
# sleep 0.1
|
||||
# echo split-window -h -t $winname:$tabname -c $dir
|
||||
# split window horizontally
|
||||
tmux split-window -h -t $winname:$tabname -c $dir
|
||||
|
||||
# resize pane
|
||||
tmux resize-pane -t 0 -x 90
|
||||
|
||||
# auto-select main pane
|
||||
tmux select-pane -t 0
|
||||
# echo
|
||||
|
||||
# zoom into main pane
|
||||
tmux resize-pane -Z
|
||||
done
|
||||
|
||||
tmux select-window -t $winname:0
|
||||
# select first non-general window
|
||||
tmux select-window -t $winname:1
|
||||
|
||||
# attach to session
|
||||
tmux attach -t $winname
|
||||
}
|
||||
|
||||
|
||||
10
sources.sh
10
sources.sh
@@ -1,10 +0,0 @@
|
||||
#!/usr/bin/env zsh
|
||||
|
||||
if [[ -f "$HOME/.dotfiles/_local.sh" ]]; then source "$HOME/.dotfiles/_local.sh"; fi
|
||||
if [[ -f "$HOME/.iterm2_shell_integration.zsh" ]]; then source "$HOME/.iterm2_shell_integration.zsh"; fi
|
||||
if [[ -f ~/.fzf.zsh ]]; then source ~/.fzf.zsh; fi
|
||||
if [[ -f /opt/homebrew/opt/chruby/share/chruby/chruby.sh ]]; then source /opt/homebrew/opt/chruby/share/chruby/chruby.sh; fi
|
||||
|
||||
if [[ -f $(which rbenv) ]]; then
|
||||
eval "$(rbenv init - zsh)"
|
||||
fi
|
||||
@@ -1,6 +1,5 @@
|
||||
#!/usr/bin/env zsh
|
||||
|
||||
|
||||
# Uncomment the following line if you want to change the command execution time
|
||||
# stamp shown in the history command output.
|
||||
# You can set one of the optional three formats:
|
||||
|
||||
Reference in New Issue
Block a user