Back to Cheatsheets

Projectionist

Vim

Basic usage

/* .projectionist.vim */
{
  "app/assets/react/components/*.jsx": {
    "type": "component",
    "template": [
      "import React from 'react'",
      "export default {} = React.createClass({ ... })"
    ]
  }

Available options

{
  "lib/*.rb": {
    "type": "lib", /* enables :Elib */
    "alternate": "test/{}_spec.rb", /* for :A */
    "template": [ ... ],

    "path": "include", /* for `gf` i think */

    "console": "node", /* for :Console */
    "dispatch": "node", /* for :Dispatch (dispatch.vim) */
    "start": "rails server", /* for :Start (dispatch.vim) */
    "make": "node", /* for makeprg */
  }
}

Commands

CommandDescription
:AEdit alternate
:A {file}Edit file
----------------------
:ASEdit in split
:AVEdit in vsplit
:ATEdit in tab
----------------------
:ADReplace with template
----------------------
:Cdcd to root
:Cd {path}cd to path in root
:Lcdcd to root using :lcd
----------------------
:ProjectDo {cmd}run command in root

Reference

See vim-projectionist.