diff options
| author | Raymaekers Luca <raymaekers.luca@gmail.com> | 2024-06-25 01:10:02 +0200 | 
|---|---|---|
| committer | Raymaekers Luca <raymaekers.luca@gmail.com> | 2024-06-25 01:10:02 +0200 | 
| commit | 44c011c5988077b515204159b6930c69c0475571 (patch) | |
| tree | 8e441b3c7b8de05f7a92e0bcf61959713bf1edf8 /config | |
| parent | 58ba99570d0bdbb41b5c7c8f2a0c53ea9299ea4c (diff) | |
checkpoint
Diffstat (limited to 'config')
| -rw-r--r-- | config/essentials/vis/visrc.lua | 10 | ||||
| -rw-r--r-- | config/essentials/zsh/.zshrc | 7 | ||||
| -rw-r--r-- | config/essentials/zsh/widgets.zsh | 11 | 
3 files changed, 17 insertions, 11 deletions
diff --git a/config/essentials/vis/visrc.lua b/config/essentials/vis/visrc.lua index 78f7cfe..f9242c8 100644 --- a/config/essentials/vis/visrc.lua +++ b/config/essentials/vis/visrc.lua @@ -119,10 +119,12 @@ end)  vis.events.subscribe(vis.events.WIN_OPEN, function(win) -- luacheck: no unused args  	-- automatically cd in parent dir of file -	if win.file and win.file.path then -		local dir = win.file.path:match(".*/") -		vis:command("cd " .. dir) -	end +	vis:command_register("cdp", function() +		if win.file and win.file.path then +			local dir = win.file.path:match(".*/") +			vis:command("cd " .. dir) +		end +	end, "Cd to parent dir of file")  	win.options.relativenumbers = true diff --git a/config/essentials/zsh/.zshrc b/config/essentials/zsh/.zshrc index 5981fd9..63e3d62 100644 --- a/config/essentials/zsh/.zshrc +++ b/config/essentials/zsh/.zshrc @@ -113,6 +113,13 @@ add-zsh-hook -Uz precmd set_wt (){ print -Pn "\e]0;%n@%m on %~\a"; }  ## automatic ls after cd  add-zsh-hook -Uz chpwd (){ [ "$PWD" = "$HOME" ] || ls -A; } +bottom_margin() { +	TBUFFER="$BUFFER" +	BUFFER="\n\n\n" +	BUFFER="\n\n\n $TBUFFER" +} +add-zsh-hook -Uz precmd bottom_margin +  ### Variables  ## Run menuscripts with fzf  export MENUCMD='fzf' diff --git a/config/essentials/zsh/widgets.zsh b/config/essentials/zsh/widgets.zsh index 233ea65..cce9fbc 100644 --- a/config/essentials/zsh/widgets.zsh +++ b/config/essentials/zsh/widgets.zsh @@ -1,8 +1,7 @@  # Surround line in variable -surround_in_var() -{ -    BUFFER=" \"\$($BUFFER)\"" -    zle beginning-of-line +surround_in_var() { +	BUFFER=" \"\$($BUFFER)\"" +	zle beginning-of-line  }  zle -N surround_in_var  bindkey '\ev' surround_in_var @@ -10,9 +9,7 @@ bindkey '\ev' surround_in_var  # Insert output from the previous command  zmodload -i zsh/parameter  insert-last-command-output() { -  LBUFFER+="$(eval $history[$((HISTCMD-1))])" +	LBUFFER+="$(eval $history[$((HISTCMD - 1))])"  }  zle -N insert-last-command-output  bindkey "^Xl" insert-last-command-output - -#   | 
