Giter VIP home page Giter VIP logo

sublimetext2railsrelatedfiles's Introduction

Sublime Text 2/3 - Rails Related Files

Note: I've never written any Python code before! So feel free to implement best practices and make a pull request.

This plugin allows you to easily navigate your Rails projects by making a few basic assumptions. I wrote this so I didnt have to constantly use the SideBar to lookup files!

Ok, so lets imagine you "right clicked" on the following file/s (Screenshot 2) or by using the "CMD+Shift+O" shortcut (Screenshot 1) it will search for files:

posts_controller.rb under app/controllers

If it was under the "admin" namespace e.g. app/controllers/admin/posts_controller.rb then it will look under views/admin/posts/** and vice versa.

views/posts/** - All files under this folder
models/post**  - Models starting with "post"

show.html.erb under app/views/posts

models/post**             - Models starting with "post"
views/posts/**            - All files in this folder
assets/javascript/post**  - Any javascript file starting with "post"
assets/stylesheets/post** - Any stylesheet file starting with "post"
controllers/post**        - Any controller file starting with "post"

post.rb model under app/models

models/post**         - Models starting with "post"
views/posts/**        - All files in this folder
views/**/posts/**     - All files in this folder (e.g. admin namespace)
controllers/post**    - Any controller starting with "post"
controllers/**/post** - Any controller starting with "post" (e.g. admin namespace)

If you want to disable the context menu, just edit the Rails.sublime-settings file changing "show_context_menu" to false.

Future

Maybe we can extract the possible partials being used in the current file e.g. render "post" or even render @posts, we know where to look > app/views/posts/_post

Screenshots

Here I've pressed the shortcut key when looking at the "page.rb" file under models.

Quick Panel

Quick Panel

Context Menu

Context Menu

Contributors

Credits

sublimetext2railsrelatedfiles's People

Contributors

luqman avatar bratsche avatar fredwu avatar nahaylo avatar deiga avatar bobthecow avatar yulk avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.