I archived this project as jumping is a solved issue. I extracted the git check into the project . That part was better suited as a zsh hook. I will look into the other plans like running a dev server on cd in the future in another project.
Quickly jump between paths you regularly use
Git Functionality:
Check in the background whether origin has changes that you should probably pull in. Depends on notify-send
to report back on the git fetch status.
This is still very experimental and a lot of stuff will move around in the next month
This very simple plugin opens project paths with nvim using fzf.
The command open_project opens a projects path in nvim with calling find piped into fzf in a project directory.
The project directory contains symlinks to projects, that can be added to it through the add_project command, adding the pwd
.
After installing you can of course create aliases for the functions, as typing out open_project is a bother.
I like projectile in emacs and couldn't find something like it for the terminal.
I don't like typing out paths, even with recursive FZF search.
In the end this is practically just FZF customization though :S
Why not?: If you're looking for project management in nvim i would recommend checking out telescope-project first
-
Clone this repository somewhere on your machine. This guide will assume ~/.zsh/pseudo-projectile.
git clone https://github.com/git-girl/pseudo-projectile-plugin ~/.zsh/pseudo-projectile
-
Add the following to your .zshrc:
source ~/.zsh/pseudo-projectile/pseudo-projectile.plugin.zsh
-
Start a new terminal session.
-
Clone this repository into $ZSH_CUSTOM/plugins (by default ~/.oh-my-zsh/custom/plugins)
git clone https://github.com/git-girl/pseudo-projectile-plugin ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/pseudo-projectile
-
Add the plugin to the list of plugins for Oh My Zsh to load (inside ~/.zshrc):
plugins=( # other plugins... pseudo-projectile )
-
Start a new terminal session.
- Create a directory for the symlinks to your projects to go to, f.e.:
mkdir ~/projects
- In your
.zshrc
add your path asPATHTOPROJECTS
PATHTOPROJECTS="$HOME/projects"
The commands have names that are supposed to be very descriptive. To have a nicer workflow, I have them aliased.
f.e. in your ~/.zshrc:
alias po="project_open"
alias pe="project_open -e nvim"
alias pa="project_add"
Note: I will refactor the open edit stuff to be the same command using flags.
-
-s
Sets the size of FZF window by percentage -
-e
Sets the editor -
you can customize the colors for fzf via the FZF globals, i removed the specific color support
- you can pass an argument to the
project_open
command which will pre input that string into fzf and execute thecd
and possible editor command if there is only one match.
This Plugin is currently set up very much for my own workflow. Maybe I will spend some more time on it and generalize it.