Linuxious

Migrating from Prezto to Zim (Zsh IMproved)

Prezto is an excellent framework for Zsh. I’ve used it for years, but while it still works great it isn’t really actively maintained these days.

Today I discovered that Eriner, the maintainer of a Prezto fork created due to the lack of upstream updates, has recently announced a new framework called Zim (Zsh IMproved).

Zim was inspired by Prezto and oh-my-zsh, but is written from the ground up with a focus on blazing speed without sacrificing the features and overall functionality which users expect.

The speed increases over other popular frameworks is something it takes pride in and even has a load-time comparison showing how it fares against them.

After playing around with Zim for a bit I have to say that it does at least seem to be faster and I like it enough that I plan on using it from now on.

If you are looking for a fast and actively developed Zsh framework you should check it out.

Installation

It is important to note that if you are currently using another framework (e.g., Prezto, oh-my-zsh, etc.) you need to uninstall it before proceeding in order to prevent any conflicts from occurring.

1. In a Zsh shell, clone the repository:

git clone --recursive https://github.com/Eriner/zim.git ${ZDOTDIR:-${HOME}}/.zim

2. Copy the template configuration files (or append to existing configs) by pasting the following into your terminal:

setopt EXTENDED_GLOB
  for template_file ( ${ZDOTDIR:-${HOME}}/.zim/templates/* ); do
    cat ${template_file} | tee -a ${ZDOTDIR:-${HOME}}/.$(basename ${template_file}) > /dev/null
  done

3. Set Zsh as the default shell (if you haven’t already):

  chsh -s $(which zsh)

4. Open a new terminal and finish optimization (this is only needed once, hereafter it will happen upon desktop/tty login):

  source ${ZDOTDIR:-${HOME}}/.zlogin

Please feel free to leave your comments and suggestions below. If you liked this article, please also consider sharing it with your friends.

2 Comments

From: Sergio Araujo
2017-07-24 09:49

I have tryied to change zim folder, actualy I have defined ZDOTDIR=~/.dotfiles/zsh/zim it is an attempt to use more than one zsh framework. I would not like to have hidden files in a folder that is already hidden.

My attempt was something like:
ZDOTDIR=~/.dotfiles/zsh/zim

And I changed the script to not hide the internal files but it doesn't work. Could you tell me how solve this?

From: Sergio Araujo
2017-08-04 03:19

How about:
for template_file ( ${ZDOTDIR:-${HOME}}/.zim/templates/* ); do
ln -sfvn ${template_file} ${ZDOTDIR:-${HOME}}/.${template_file:t}
done

Leave a comment

Your email address will not be published. Required fields are marked *
Please note that all comments are held for moderation.

The following HTML tags are permitted: <a> <abbr> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>