Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

https://github.com/git-girl/pseudo-projectile-plugin

Pseudo Projectile Plugin for ZSH - Quickly access your projects
https://github.com/git-girl/pseudo-projectile-plugin

Last synced: about 2 months ago
JSON representation

Pseudo Projectile Plugin for ZSH - Quickly access your projects

Lists

README

        

# ARCHIVED

I archived this project as jumping is a solved issue.
I extracted the git check into the project ![git-check](https://github.com/git-girl/git-check).
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.

# Pseudo Projectile Plugin for zsh

**Quickly jump between paths you regularly use**
![Video showing general usage](/assets/ppp1.gif)

**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.
![Video showing notification when origin has changes not present in local](/assets/ppp2.gif)

**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.

# Why?

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](https://github.com/nvim-telescope/telescope-project.nvim) first

# Getting Started

## Installing

### manual

1. 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`

2. Add the following to your .zshrc:

`source ~/.zsh/pseudo-projectile/pseudo-projectile.plugin.zsh`

3. Start a new terminal session.

### oh-my-zsh

1. 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`

2. Add the plugin to the list of plugins for Oh My Zsh to load (inside ~/.zshrc):

```
plugins=(
# other plugins...
pseudo-projectile
)
```

3. Start a new terminal session.

## Setting Up

### Creating and Setting project path

1. Create a directory for the symlinks to your projects to go to, f.e.:
```
mkdir ~/projects
```
2. In your `.zshrc` add your path as `PATHTOPROJECTS`
```
PATHTOPROJECTS="$HOME/projects"
```

### Ideas for Aliasing
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.

### Customization

- `-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

### Usage

- you can pass an argument to the `project_open` command which will pre input that string into fzf and execute the `cd` and possible editor command if there is only one match.

# State

This Plugin is currently set up very much for my own workflow.
Maybe I will spend some more time on it and generalize it.