background preloader

Learning Vim in 2014 - benmccormick.org

Learning Vim in 2014 - benmccormick.org

FileBot - The ultimate TV and Movie Renamer / Subtitle Downloader 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

Beyond grep: ack 2.14, a source code search tool for programmers 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. Here are the results for your learning enjoyment (or your colleagues'). 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 With the single exception of the external filter feature ("!") 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. Results have been announced!Thank you kindly for your support and for helping to make these competitions a success! 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.

Using a controller to change content in a marionette.layout · marionettejs/backbone.marionette Wiki A question was asked on IRC: The trick is to use an object that coordinates between all of the views and the layout. This is often referred to as a "mediator" - from the mediator pattern. Use of the controller is simple enough, then: ggreer/the_silver_searcher A Visual Guide to Marionette.js Views | Art & Logic Blog When I first began working on the front-end to this one interactive application, I decided to just write a few lines of JavaScript to handle some miscellaneous things behaviors on the front-end. However, that soon turned into a completely interactive front-end with thousands of lines of JavaScript trying to hack together the entire DOM. Luckily, Backbone.js came to the rescue which was later accompanied with Marionette.js. One of the difficulties I had with the documentation that existed was trying to visualize the handful of useful views Marionette.js provides. To help visualize the difference (and similarity) of layouts, regions, composites, collections, and item views, I’ve created helpful diagrams to visually demonstrate how the pieces of the puzzle fit together. Layouts Useful when you need to nest multiple views inside of a container and occasionally need to swap them out with other views or show/hide them. Layouts are the top-level component in your application. Regions Item Views

mileszs/ack.vim Part 2: Marionette Application, Modules and Controllers | blog.davebouwman.com “Marionette Maps” is an on-going series on building a loosely coupled, configuration driven map viewer using Marionette.js. Read Part 1 TL;DR; Version This covers Marionette Application, Module, Controller, ItemView, CollectionView and a little on Events. Code: github tagged v0.0.2 Demo: The Long Version… Working from the rough layout I created in the last post, the next thing to do is dive into the javascript. First, grab Marionette and it’s dependencies from MarionetteJs.com. Creating the Application The next thing we need is a Marionette Application. At this point the application is super simple as shown in this gist… As we develop the application we will setup more Regions – right now we just have the one region for the tools – and this is the container that will hold our tool items in the upper right. The Navbar: Module + Controller The top bar of our app has a few things to manage. Ok, now we need to write some code to manage the Navbar. Events Code

rking/ag.vim 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. I blame this on the fact that it lives in a separate repository and is only mentioned in the Marionette documentation in passing (shameless plug: brand new Marionette docs are on the way!). 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? We think that the risk of fragmentation with this rewrite is low. The benefits of Radio Ordering the Command later:

Ack and Vim integration - ant0ine's blog I'm a fan of Andy Lester's App::Ack module. This a is a perl program that you can use as a replacement of grep. Today I wrote a little Vim plugin that integrate ack with Vim. This is a quick hack, it works for me with vim7/ubuntu and vim6.3/fedora. Just copy/paste the following lines in ~/.vim/plugin/ack.vim " usage: " (the same as ack, except that the path is required) " examples: " :Ack TODO . " :Ack sub Util.pm function! ack-1.60 is out, and the documentation mentions another way to integrate ack and vim by using the :grep function of vim: set grepprg=ack I think this is a better solution, and to make it nicely integrated withvim, I wrote this new little function: function! Just replace the old code by the new one in ~/.vim/plugin/ack.vim This time it works even if you don't specify the path, and you can still use the :grep function as before, grepprg is saved and restored. And as Yann says, "then :cnext is your friend"

Related: