• Stars
    star
    3,851
  • Rank 10,883 (Top 0.3 %)
  • Language
    Emacs Lisp
  • License
    GNU General Publi...
  • Created almost 13 years ago
  • Updated 8 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Project Interaction Library for Emacs

Projectile

Build Status MELPA MELPA Stable NonGNU ELPA License GPL 3 Discord

Synopsis

Projectile is a project interaction library for Emacs. Its goal is to provide a nice set of features operating on a project level without introducing external dependencies (when feasible). For instance - finding project files has a portable implementation written in pure Emacs Lisp without the use of GNU find (but for performance sake an indexing mechanism backed by external commands exists as well).

Projectile tries to be practical - portability is great, but if some external tools could speed up some task substantially and the tools are available, Projectile will leverage them.

This library provides easy project management and navigation. The concept of a project is pretty basic - just a folder containing some special file (e.g. a VCS marker or a project descriptor file like pom.xml or Gemfile). Projectile will auto-detect pretty much every popular project type out of the box and you can easily extend it with additional project types.

Here are some of Projectile's features:

  • jump to a file in project
  • jump to a project buffer
  • jump to a test in project
  • toggle between files with same names but different extensions (e.g. .h <-> .c/.cpp, Gemfile <-> Gemfile.lock)
  • toggle between code and its test (e.g. main.service.js <-> main.service.spec.js)
  • jump to recently visited files in the project
  • switch between projects you have worked on
  • kill (close) all project buffers
  • grep (search) in project
  • replace in project
  • find references in project (using xref internally)
  • run shell commands in a project (e.g. make, lein)
  • support for multiple minibuffer completion/selection libraries (ido, ivy, helm and the default completion system)
  • automatic project discovery (see projectile-project-search-path)
  • integration with the built-in project.el library

There's also a rich ecosystem of third-party Projectile extensions that add even more features.


Patreon Paypal

I've been developing Projectile for over a decade now (since 2011). While it's a fun project to work on, it still requires a lot of time and energy to maintain.

You can support my work on Projectile via PayPal, Patreon and GitHub Sponsors.

Projectile in Action

Here's a glimpse of Projectile in action (using ivy):

Projectile Demo

In this short demo you can see:

  • finding files in a project
  • switching between implementation and test
  • switching between projects

Quickstart

The instructions that follow are meant to get you from zero to a running Projectile setup in a minute. Visit the online documentation for (way) more details.

Installation

package.el is the built-in package manager in Emacs.

Projectile is available on all major package.el community maintained repos - NonGNU ELPA, MELPA Stable and MELPA.

You can install Projectile with the following command:

M-x package-install [RET] projectile [RET]

Alternatively, users of Debian 9 or later or Ubuntu 16.04 or later may simply apt-get install elpa-projectile.

Finally add this to your Emacs config:

(projectile-mode +1)
;; Recommended keymap prefix on macOS
(define-key projectile-mode-map (kbd "s-p") 'projectile-command-map)
;; Recommended keymap prefix on Windows/Linux
(define-key projectile-mode-map (kbd "C-c p") 'projectile-command-map)

Those keymap prefixes are just a suggestion. Feel free to put there whatever works best for you.

Basic Usage

Enable projectile-mode, open a file in one of your projects and type a command such as C-c p f.

See the online documentation for more details.

To get the most of Projectile you also need to enable (and potentially install) some minibuffer completion framework (e.g. ido, ivy or selectrum). See this section of the documentation for more details.

Note: Historically projectile-completion-system defaulted to ido, but this was changed in version 2.3. You may need to enable ido-mode in your Emacs configuration if updating from an older version of Projectile.

Caveats

  • Some operations like search (grep) depend (presently) on external utilities such as find or fd (version 8.3.0+).
    • for older fd version add (setq projectile-generic-command "fd . -0 --type f --color=never") to your init-file
  • Commands depending on external utilities might misbehave on the fish shell.
  • Using Projectile over TRAMP might be slow in certain cases.
  • Some commands might misbehave on complex project setups (e.g. a git project with submodules).
  • Projectile was mostly tested on Unix OS-es (e.g. GNU/Linux and macOS), so some functionality might not work well on Windows.
  • In Git repositories, deleted files are still shown in projectile-find-file until their deletions are staged, due to a limitation of git ls-files. If you install fd then it is automatically used instead, and does not have this problem. (You can inhibit the use of fd by setting projectile-git-use-fd to nil.)

Known issues

Check out the project's issue list a list of unresolved issues. By the way - feel free to fix any of them and send me a pull request. :-)

Contributors

Here's a list of all the people who have contributed to the development of Projectile (a.k.a. Projectile's Hall of Fame).

Joining this esteemed group of people is only a commit away!

Changelog

A fairly extensive changelog is available here.

License

Copyright Β© 2011-2023 Bozhidar Batsov and contributors.

Distributed under the GNU General Public License, version 3

More Repositories

1

prelude

Prelude is an enhanced Emacs 25.1+ distribution that should make your experience with Emacs both more pleasant and more powerful.
Emacs Lisp
5,014
star
2

clojure-style-guide

A community coding style guide for the Clojure programming language
3,974
star
3

emacs-lisp-style-guide

A community-driven Emacs Lisp style guide
1,053
star
4

zenburn-emacs

The Zenburn colour theme ported to Emacs
Emacs Lisp
951
star
5

crux

A Collection of Ridiculously Useful eXtensions for Emacs
Emacs Lisp
807
star
6

solarized-emacs

The Solarized colour theme, ported to Emacs.
Emacs Lisp
739
star
7

helm-projectile

Helm UI for Projectile
Emacs Lisp
322
star
8

super-save

Save Emacs buffers when they lose focus
Emacs Lisp
273
star
9

powerpack

Some useful extensions to the core Ruby classes
Ruby
270
star
10

emacs.d

My personal Emacs configuration
Emacs Lisp
204
star
11

persp-projectile

Projectile integration for perspective.el
Emacs Lisp
110
star
12

guru-mode

Learn to use Emacs the way it was meant to be used (the Emacs guru way)
Emacs Lisp
100
star
13

emacs-dev-kit

An advanced self-contained Emacs configuration suitable for many software developers (deprecated)
Emacs Lisp
95
star
14

beamer-torino-theme

Torino, a pretty theme for LaTex Beamer
Emacs Lisp
38
star
15

lein-annotations

Display comment annotations in your project
Clojure
12
star
16

emacsredux

Emacs Redux is a blog dedicated to the One True Editor
HTML
11
star
17

cv

My professional CV in LaTeX
TeX
10
star
18

cl-99-problems

Solutions to the 99 Lisp problems in Common Lisp
Common Lisp
10
star
19

activerecord-extra-validators

Some nice additional validators for ActiveRecord
Ruby
9
star
20

java-in-action-lectures

The lectures from the "Java in Action" programming course
9
star
21

advent-of-code2021

Advent of Code 2021, Clojure Edition
Clojure
8
star
22

legacy-octopress-blog

My personal blog
HTML
8
star
23

batsov.com

My personal blog
Ruby
7
star
24

metaredux

HTML
7
star
25

master-thesis

My Master university degree thesis
Emacs Lisp
5
star
26

zshrc

My personal zsh setup
5
star
27

docs.projectile.mx

Projectile's documentation site
Handlebars
4
star
28

hard-cider

A demo projecto to showcase CIDER
Clojure
3
star
29

presentations

Presentations I created for various occasions
2
star
30

blog

My personal blog
Ruby
2
star
31

emacsredux-legacy

Emacs Redux
HTML
1
star
32

praxis

Praxis makes perfect!
OCaml
1
star