From 389615df1165c6f8b145ec8aee559b63643fb6ab Mon Sep 17 00:00:00 2001 From: Fred Klassen Date: Tue, 21 Feb 2023 12:23:45 -0800 Subject: [PATCH] zsh-sytnax-highlighting --- .gitmodules | 3 +++ README-MY-SETUP.md | 13 +++++-------- plugins/zsh-syntax-highlighting | 1 + templates/zshrc.zsh-template | 9 +++++++++ 4 files changed, 18 insertions(+), 8 deletions(-) create mode 160000 plugins/zsh-syntax-highlighting diff --git a/.gitmodules b/.gitmodules index 219a03761..ed38e46d6 100644 --- a/.gitmodules +++ b/.gitmodules @@ -7,3 +7,6 @@ [submodule "plugins/zsh-autosuggestions"] path = plugins/zsh-autosuggestions url = https://github.com/zsh-users/zsh-autosuggestions.git +[submodule "plugins/zsh-syntax-highlighting"] + path = plugins/zsh-syntax-highlighting + url = https://github.com/zsh-users/zsh-syntax-highlighting.git diff --git a/README-MY-SETUP.md b/README-MY-SETUP.md index 9787b1870..eea9fc1f5 100644 --- a/README-MY-SETUP.md +++ b/README-MY-SETUP.md @@ -46,7 +46,7 @@ Linux * install some terminal tools ```(shell) - sudo apt install curl exa fasd fzf thefuck tmux vim-nox + sudo apt install curl exa fasd fzf ruby-full thefuck tmux vim-nox ``` * install [Tilex](https://gnunn1.github.io/tilix-web/) @@ -177,7 +177,7 @@ Post install There are a few things that can make things even better * set up GIT configuration - * `cd && ln -s ~/.oh-my-zsh/plugins/gitconfig .gitconfig` + * `cd && ln -s ~/.oh-my-zsh/template/gitconfig .gitconfig` * create a `~/.gitconfig.user` for user-specific GIT settings ```(shell) @@ -189,15 +189,12 @@ There are a few things that can make things even better ``` * create ~/.inputrc - - ```(shell) - set editing-mode vi - set bell-style none - ``` - + * `cd && ln -s ~/.oh-my-zsh/template/inputrc .inputrc` * if tmux is installed install tmux config [Oh My Tmux](https://github.com/gpakosz/.tmux) * install vim config [SpaceVim](https://spacevim.org/) * install Mosh replacement [Eternal Terminal](https://eternalterminal.dev/) +* install colorls + * `sudo gem install colorls` * on macOS * install macVIM via `brew install macvim` * if you don't like Gruv Box, you may want to install some colour themes for iTerm2 diff --git a/plugins/zsh-syntax-highlighting b/plugins/zsh-syntax-highlighting new file mode 160000 index 000000000..754cefe01 --- /dev/null +++ b/plugins/zsh-syntax-highlighting @@ -0,0 +1 @@ +Subproject commit 754cefe0181a7acd42fdcb357a67d0217291ac47 diff --git a/templates/zshrc.zsh-template b/templates/zshrc.zsh-template index d8627098d..fa5f11e25 100644 --- a/templates/zshrc.zsh-template +++ b/templates/zshrc.zsh-template @@ -121,6 +121,7 @@ plugins=( web-search zsh-autosuggestions zsh-interactive-cd + zsh-syntax-highlighting ) # Linux only optional plugins @@ -193,6 +194,14 @@ export MANPATH="/usr/local/man:/usr/local/ssl/share/man:$MANPATH" # alias ohmyzsh="mate ~/.oh-my-zsh" alias gnb='git nb' # new branch aka checkout -b alias gdtl='git difftool --no-prompt' +if [ -x "$(command -v colorls)" ]; then + alias ls="colorls" + alias la="colorls -al" +fi +if [ -x "$(command -v colorls)" ]; then + alias ls="colorls" + alias la="colorls -al" +fi # Other custom config [ -f /usr/local/etc/profile.d/autojump.sh ] && . /usr/local/etc/profile.d/autojump.sh