Open modes make application development more faster.
Three most used actions in development are opening a file, searching a text in the project, and building (or restart the server in web apps).
A programming language (or framework) specific open mode provides easy way to do them.
- elscreen (for open a file)
- bundler (for rackup)
This needs elscreen to open a file (always create a new screen). If you are not using elscreen, change om-anything-c-open-candidate to match your needs.
How to Use
rack-open-mode, for example, add this to your
(add-to-list 'load-path "/path/to/this/directory") (require 'rack-open-mode) (rack-open-activate) ; automatically enable rack-open-mode in a project
rack-open-mode provides three key binds.
- C-c C-r (rack-open-anything) Recursively search the project directory to make anything candidates.
- C-c C-b (rack-open-grep-project) Search the project directory with
- C-c C-d (rack-open-rackup) (re)Rackup the project's config.ru. You can see the log in
How to customize
open-mode.el provides basic functions to implement an open mode for your language and framework.
rack-open-mode will be a good example.
Basically, what you have to do is
rootp(which receive current path and return whether it is root).
ignored(directories excluded from
rgrepand anything candidates).
- define a function to build, start server, or upload, like
If you got a good open-mode, please let me know by sending pull request!