Fixed vim and zsh
This commit is contained in:
92
zsh/templates/zimrc
Normal file
92
zsh/templates/zimrc
Normal file
@ -0,0 +1,92 @@
|
||||
|
||||
|
||||
#################
|
||||
# CORE SETTINGS #
|
||||
#################
|
||||
|
||||
#
|
||||
# Zim settings
|
||||
#
|
||||
|
||||
# Select what modules you would like enabled.
|
||||
# The second line of modules may depend on options set by modules in the first line.
|
||||
# These dependencies are noted on the respective module's README.md.
|
||||
zmodules=(directory environment git history input utility meta custom \
|
||||
syntax-highlighting history-substring-search prompt completion)
|
||||
|
||||
|
||||
###################
|
||||
# MODULE SETTINGS #
|
||||
###################
|
||||
|
||||
#
|
||||
# Prompt
|
||||
#
|
||||
|
||||
# Set your desired prompt here
|
||||
zprompt_theme='steeef'
|
||||
|
||||
#
|
||||
# Completion
|
||||
#
|
||||
|
||||
# set an optional host-specific filename for the completion cache file
|
||||
# if none is provided, the default '.zcompdump' is used.
|
||||
#zcompdump_file=".zcompdump-${HOST}-${ZSH_VERSION}"
|
||||
|
||||
#
|
||||
# Utility
|
||||
#
|
||||
|
||||
# Uncomment to enable command correction prompts
|
||||
# See: http://zsh.sourceforge.net/Doc/Release/Options.html#Input_002fOutput
|
||||
#setopt CORRECT
|
||||
|
||||
#
|
||||
# Environment
|
||||
#
|
||||
|
||||
# Set the string below to the desired terminal title format string.
|
||||
# The terminal title is redrawn upon directory change, however, variables like
|
||||
# ${PWD} are only evaluated once. Use prompt expansion strings for dynamic data:
|
||||
# http://zsh.sourceforge.net/Doc/Release/Prompt-Expansion.html#Simple-Prompt-Escapes
|
||||
# The example below uses the following format: 'username@host:/current/directory'
|
||||
ztermtitle='%n@%m:%~'
|
||||
|
||||
#
|
||||
# Input
|
||||
#
|
||||
|
||||
# Uncomment to enable double-dot expansion.
|
||||
# This appends '../' to your input for each '.' you type after an initial '..'
|
||||
#zdouble_dot_expand='true'
|
||||
|
||||
#
|
||||
# Syntax-Highlighting
|
||||
#
|
||||
|
||||
# This determines what highlighters will be used with the syntax-highlighting module.
|
||||
# Documentation of the highlighters can be found here:
|
||||
# https://github.com/zsh-users/zsh-syntax-highlighting/blob/master/docs/highlighters.md
|
||||
# For (u)rxvt, termite and gnome-terminal users,
|
||||
# removing the 'cursor' highlighter will fix the disappearing cursor problem
|
||||
zhighlighters=(main brackets cursor)
|
||||
|
||||
|
||||
#
|
||||
# SSH
|
||||
#
|
||||
|
||||
# Load these ssh identities with the ssh module
|
||||
#zssh_ids=(id_rsa)
|
||||
|
||||
|
||||
#
|
||||
# Pacman
|
||||
#
|
||||
|
||||
# Set (optional) pacman front-end.
|
||||
#zpacman_frontend='powerpill'
|
||||
|
||||
# Load any helper scripts as defined here
|
||||
#zpacman_helper=(aur)
|
59
zsh/templates/zlogin
Normal file
59
zsh/templates/zlogin
Normal file
@ -0,0 +1,59 @@
|
||||
|
||||
|
||||
#
|
||||
# startup file read in interactive login shells
|
||||
#
|
||||
# The following code helps us by optimizing the existing framework.
|
||||
# This includes zcompile, zcompdump, etc.
|
||||
#
|
||||
|
||||
(
|
||||
# Function to determine the need of a zcompile. If the .zwc file
|
||||
# does not exist, or the base file is newer, we need to compile.
|
||||
# These jobs are asynchronous, and will not impact the interactive shell
|
||||
zcompare() {
|
||||
if [[ -s ${1} && ( ! -s ${1}.zwc || ${1} -nt ${1}.zwc) ]]; then
|
||||
zcompile ${1}
|
||||
fi
|
||||
}
|
||||
|
||||
zim_mods=${ZDOTDIR:-${HOME}}/.zim/modules
|
||||
setopt EXTENDED_GLOB
|
||||
|
||||
# zcompile the completion cache; siginificant speedup.
|
||||
for file in ${ZDOTDIR:-${HOME}}/.zcomp^(*.zwc)(.); do
|
||||
zcompare ${file}
|
||||
done
|
||||
|
||||
# zcompile .zshrc
|
||||
zcompare ${ZDOTDIR:-${HOME}}/.zshrc
|
||||
|
||||
# zcompile some light module init scripts
|
||||
zcompare ${zim_mods}/git/init.zsh
|
||||
zcompare ${zim_mods}/utility/init.zsh
|
||||
zcompare ${zim_mods}/pacman/init.zsh
|
||||
zcompare ${zim_mods}/spectrum/init.zsh
|
||||
zcompare ${zim_mods}/completion/init.zsh
|
||||
zcompare ${zim_mods}/fasd/init.zsh
|
||||
|
||||
# zcompile all .zsh files in the custom module
|
||||
for file in ${zim_mods}/custom/**/^(README.md|*.zwc)(.); do
|
||||
zcompare ${file}
|
||||
done
|
||||
|
||||
# zcompile all autoloaded functions
|
||||
for file in ${zim_mods}/**/functions/^(*.zwc)(.); do
|
||||
zcompare ${file}
|
||||
done
|
||||
|
||||
# syntax-highlighting
|
||||
for file in ${zim_mods}/syntax-highlighting/external/highlighters/**/*.zsh; do
|
||||
zcompare ${file}
|
||||
done
|
||||
zcompare ${zim_mods}/syntax-highlighting/external/zsh-syntax-highlighting.zsh
|
||||
|
||||
# zsh-histery-substring-search
|
||||
zcompare ${zim_mods}/history-substring-search/external/zsh-history-substring-search.zsh
|
||||
|
||||
|
||||
) &!
|
11
zsh/templates/zshrc
Normal file
11
zsh/templates/zshrc
Normal file
@ -0,0 +1,11 @@
|
||||
|
||||
|
||||
#
|
||||
# User configuration sourced by interactive shells
|
||||
#
|
||||
|
||||
# Source zim
|
||||
if [[ -s ${ZDOTDIR:-${HOME}}/.zim/init.zsh ]]; then
|
||||
source ${ZDOTDIR:-${HOME}}/.zim/init.zsh
|
||||
fi
|
||||
|
Reference in New Issue
Block a user