n4js

https://github.com/tmtxt/n4js.el.git

git clone 'git://github.com/tmtxt/n4js.el.git'
5

Neo4j shell for emacs

1. Dependencies

2. Installation

Melpa

Coming soon

Manual install

(add-to-list 'load-path "~/.emacs.d/n4js.el/")
(require 'n4js)

3. Variables

Change these variables based on your demand

(setq n4js-cli-program "/path/to/neo4j-shell")

4. Commands

5. Tips

Connect to a Neo4j shell with option

If the neo4j shell instance is running on a different port other than the default 1337, add this to your .emacs

(setq n4js-cli-arguments '("-port" "7475"))

Connect to a remote Neo4j shell instance

Usually, passing the argument -port and -host is not enough if you want to connect to a neo4j shell that is not running on your computer because neo4j shell requires some other port for running over RMI. In that case, you can use the ssh tunnel for connecting

ssh user@host -p 2222 /path/to/neo4j-shell -port 12345

To achieve that, add this to your .emacs

(setq n4js-cli-program "ssh")
(setq n4js-cli-arguments '("user@host" "-p" "2222" "/path/to/neo4j-shell -port 12345"))

Connect to a Neo4j shell instance inside Vagrant

To connect to a neo4j shell instance running inside Vagrant, use the vagrant ssh command like this

vagrant ssh -c '/path/to/neo4j-shell -port 12345'

To achieve that, add this to your .emacs

(setq n4js-cli-program "vagrant")
(setq n4js-cli-arguments '("ssh" "-c" "/path/to/neo4j-shell -port 12345"))

Note: in this case, you need to change to a dired buffer or a file inside that project folder (or any buffer with default-directory inside the project folder) so that when running the start command, it will run with the cwd is the default-directory. You only need to do this once when you call the command n4js-start.

6. Demo

Neo4j shell inside Emacs