Effective Rails Development with Vim If you are new to Vim, be sure to read my introduction as it will help prepare you for this article. Here, I am focusing on using Vim for effective Rails development. Rails Plugin Tim Pope wrote a very useful Vim plugin called [Rails.vim] that provides a lot of great functionality, including enhanced syntax highlighting, partial extraction, and easier navigation in a Rails project. Installation Using Vundle As we saw in the previous tutorial, it’s very easy to install any plugin using Vundle. After that, type :PluginInstall, hit enter, and Vundle will do the rest. All of the commands in Rails.vim are namespaced under the letter R. Jumps Using gf There is an exception to the rule that every Rails.vim command begins with the letter :R, which is gf (short for Go to File). Also, if you try this on any method, Vim will also take you to the file where the method is defined, even if it is a Rails built-in method. Navigation in project files Open Files in Split Windows Open Files in New Tabs CTags
FileBot - The ultimate TV and Movie Renamer / Subtitle Downloader Nested Views in Backbone.Marionette A couple of weeks ago we published an article about Functional Programming that used a bagel as an example. It was very well-received, so why not try again? This week @samccone is back with the delicious carbohydrate to talk about Nesting Views in Marionette.js. Nesting views can be a difficult task at first glance. Marionette makes your life easy with an elegant view layer that simplifies complexity and hides the implementation details. This allows you to focus on getting things done instead of reinventing the wheel. Suppose that we are tasked with creating an interface that covered the process of making a bagel sandwich. Making a sandwich is pretty darn complex though. Let's assume that the output we need to generate looks looks like this. It might look like this (click through to see code example): Programmatically rendering this bagel according to our data seems like it will be a pain. The three pieces we will use are Let start out with a foil Region that will hold our bagel.
Using Marionette to Display Modal Views For a while, I’ve been thinking about how best to handle showing modal dialog boxes for my applications while utilizing Backbone views. A lot of interesting ideas passed through my head, but none of them seemed exactly right. Then I saw a post by Derick Bailey where he described how he uses Marionette’s Regions to handle the work. His post is a bit on the old side and Regions have changed a bit since, so I decided to look into how to do it myself. The Issues There are several issues surrounding creating modal dialogs just with a view. Along with that, we lose reusability. The Solution Now that we know we need to pull the modal functionality out of the views, it’s just a matter or figuring out where to put it. All we need to do is augment a Region to call the plugin’s method for showing the modal when the view is shown, make sure to hide the modal when the view is closed, and close the view when the modal is hidden. There are a few things worth noting here: Now it’s simple to use: Conclusion
Graphical vi-vim Cheat Sheet and Tutorial Learning vi or vim is not easy. But it doesn't have to be that difficult, either. It is, in any case, faster, more powerful, and more productive than editing with any other editor, so you would do very well in investing the time and effort to learn it. Being a vi lover myself, I came up with the idea of providing a graphical cheat sheet for those learning vi or vim, and I also found out it was a very good way to structure a tutorial. By the way, I recently published the definitive article explaining why vi/vim editing is so much better than regular editing. Graphical cheat sheet This is a single page describing the full vi/vim input model, the function of all keys, and all major features. Graphical cheat sheet based tutorial The tutorial above is structured in 7 lessons that cover the major commands in vi/vim. Notes vim is an incredible editor by Bram Moolenaar, based on the original vi by Bill Joy, adding a ton of improvements over it. Relevant links Why, oh why, do those #?
Casual Gameplay Design Competition #6 — "Explore" Welcome to the 6th Casual Gameplay Design Competition! All entries are available to play immediately.Each entry is represented by an icon on the left.Clicking on an icon will reveal more information about the entry. Click the "Play" button that appears to play the game.A section for comments will also appear, so please provide supportive feedback and constructive criticism to the game designers.The competition judging period is over. All entries and their icons have been randomized here and their order stored in a cookie so that you see the same order each time you visit.
Tmux and Vim, get married. | Garrett Dawson | thedrearlight Vim and Tmux are an excellent choice for a modern develpment environment on Mountain Lion. I describe how to combine create such an environment using homebrew. Using a rad, aesthetically pleasing, and efficient development environment is so crucial to having a good day. I’m going to describe mine, and give you the set of links from which I’ve assembled this confection. We’ll be using: Vim & MacVim First, one must install MacVim. $ brew install macvim Now we’ve got MacVim, which is a gui flavored Vim. The Vim that comes stock with OSX sucks all sorts of members. Installing Vim from hombrew/dupes can be sort of tricky, though. I manually changed what version of Vim is fetched from Google’s code repo. $ brew tap homebrew/dupes $ vim /usr/local/Library/Taps/homebrew-dupes/vim.rb url ' :tag => 'v7-3-617' $ brew install homebrew/dupes/vim Boom-Bapper! I still bounce back and forth from MacVim to Vim, though I’m getting more in the habit of sticking to Vim. Janus Tmux
Introducing Backbone.Radio | Marionette.js Blog Marionette comes bundled with a library called Backbone.Wreqr, and in the coming months we will replace it with a new library by the name of Backbone.Radio. Radio is heavily inspired by Wreqr, but it was rewritten from the ground up. I wouldn’t be surprised if you’re unacquainted with Wreqr. In fact, I would wager it’s one of the lesser-used pieces of Marionette. This post will outline our decision to rewrite and replace Wreqr. What is Backbone.Wreqr? Backbone.Wreqr is a collection of three messaging patterns. There’s much interesting discussion about the pros and cons of event-driven architecture, but it’s beyond the scope of this post to get into those things. Why rewrite Wreqr? The decision to rewrite a library is a risky one, and it’s not an option I would normally consider for a library as popular as Marionette. We think that the risk of fragmentation with this rewrite is low. * One bit of undocumented, inconsistent functionality from Commands has been removed. The benefits of Radio