Fixed vim and zsh
This commit is contained in:
20
zsh/modules/environment/README.md
Normal file
20
zsh/modules/environment/README.md
Normal file
@ -0,0 +1,20 @@
|
||||
Environment
|
||||
===========
|
||||
|
||||
Sets generic Zsh built-in environment options.
|
||||
|
||||
Also enables smart URL-pasting. This prevents the user from having to manually escape URLs.
|
||||
|
||||
Uses `.zimrc` defined `${ztermtitle}` variable to set the terminal title, if defined.
|
||||
|
||||
ZSH Options
|
||||
-----------
|
||||
|
||||
| Option | Effect |
|
||||
| ------ | ------ |
|
||||
| AUTO_RESUME | Resume existing jobs before creating a new job |
|
||||
| LONG_LIST_JOBS | Use the verbose list format by default |
|
||||
| NOTIFY | Report job status immediately instead of waiting for new prompt |
|
||||
| BG_NICE | Disabled to prevent jobs being given a lower priority |
|
||||
| HUP | Disabed to prevent SIGHUP to jobs on shell close |
|
||||
| CHECK_JOBS | Disabled to prevent job report on shell close |
|
59
zsh/modules/environment/init.zsh
Normal file
59
zsh/modules/environment/init.zsh
Normal file
@ -0,0 +1,59 @@
|
||||
#
|
||||
# generic options and environment settings
|
||||
#
|
||||
|
||||
# use smart URL pasting and escaping
|
||||
autoload -Uz is-at-least
|
||||
if [[ ${ZSH_VERSION} != 5.1.1 ]]; then
|
||||
if is-at-least 5.2; then
|
||||
autoload -Uz bracketed-paste-url-magic
|
||||
zle -N bracketed-paste bracketed-paste-url-magic
|
||||
else
|
||||
if is-at-least 5.1; then
|
||||
autoload -Uz bracketed-paste-magic
|
||||
zle -N bracketed-paste bracketed-paste-magic
|
||||
fi
|
||||
autoload -Uz url-quote-magic
|
||||
zle -N self-insert url-quote-magic
|
||||
fi
|
||||
fi
|
||||
|
||||
# Treat single word simple commands without redirection as candidates for resumption of an existing job.
|
||||
setopt AUTO_RESUME
|
||||
|
||||
# List jobs in the long format by default.
|
||||
setopt LONG_LIST_JOBS
|
||||
|
||||
# Report the status of background jobs immediately, rather than waiting until just before printing a prompt.
|
||||
setopt NOTIFY
|
||||
|
||||
# Run all background jobs at a lower priority. This option is set by default.
|
||||
unsetopt BG_NICE
|
||||
|
||||
# Send the HUP signal to running jobs when the shell exits.
|
||||
unsetopt HUP
|
||||
|
||||
# Report the status of background and suspended jobs before exiting a shell with job control;
|
||||
# a second attempt to exit the shell will succeed.
|
||||
# NO_CHECK_JOBS is best used only in combination with NO_HUP, else such jobs will be killed automatically.
|
||||
unsetopt CHECK_JOBS
|
||||
|
||||
# Set less or more as the default pager.
|
||||
if [[ -z ${PAGER} ]]; then
|
||||
if (( ${+commands[less]} )); then
|
||||
export PAGER=less
|
||||
else
|
||||
export PAGER=more
|
||||
fi
|
||||
fi
|
||||
|
||||
# sets the window title and updates upon directory change
|
||||
# more work probably needs to be done here to support multiplexers
|
||||
if (($+ztermtitle)); then
|
||||
case ${TERM} in
|
||||
xterm*)
|
||||
precmd() { print -Pn "\e]0;${ztermtitle}\a" }
|
||||
precmd # we execute it once to initialize the window title
|
||||
;;
|
||||
esac
|
||||
fi
|
Reference in New Issue
Block a user