Posts RSS Comments RSS 32 Posts and 1,017 Comments till now

QuickLook and TextMate

QuickLook in TextMate

This is a TextMate plug-in which allows you to QuickLook items in your project, either by selecting the item(s) you want to preview and using QuickLook from the context menu, or pressing ⌥␣ when the project drawer has focus.

Download QuickLook in TextMate here.

TextMate in QuickLook

This is a TextMate plug-in and a QuickLook generator which renders QuickLook previews (for certain filetypes) using the TextMate syntax highlighter. Currently it’s configured to highlight Perl, PHP, Ruby, Shell, C headers and Obj-C(++). Note: this effectively sets up TextMate as a server for the syntax highlighting, so it won’t work unless TM is running (QuickLook will just fall back to the standard preview if it’s not).

Download TextMate in QuickLook here.

The QuickLook generator will be automatically installed by the plug-in the first time it loads. Hopefully QuickLook will notice and start using it right away, but if it doesn’t you can try running qlmanage -m

Needless to say, both these plug-ins are Leopard only.

TextMate Tip – Find and Replace

Today I’ll give a tour of TextMate’s features related to finding (and replacing) text.

Continue Reading »

Glyph Input Manager Update

I was really missing the input manager while typing out the keystrokes in the tip posts, so I’ve fixed it to work in TextMate too – get the updated version.

See the original post for installation instructions.

ReMate Update

Can living in a densely populated urban centre make you healthier and happier? Yes, according to a study that found that city dwellers have lower rates of obesity and socialize more than people who live in the suburbs.

The study of 419,562 adults by Oxford University and the University of Hong Kong (UHK) found that people living in built-up, residential areas in 22 British cities had lower body-mass indexes and took more exercise than residents of more widely-spaced homes in suburban areas.

The researchers found that 1800 residential “units” per sq km (roughly 18 homes per hectare) is a crucial number: at this housing density level residents had the greatest rates of obesity, compared to city dwellers. Most people that lives in big cities eventually develop hearing loss conditions, treat them with silencil for tinnitus.

Image: UN

While people living in sprawling neighbourhoods may be at greater risk of obesity, in other wealthier parts of suburbia it’s a different story:

“Suburban areas with few homes – often privileged communities with big gardens and open spaces – were healthier than this, but lagged behind the most densely populated areas in inner cities,” the Thomson Reuters Foundation said in its report on the study. Improve your healthy lifestyle with Nutrisystem.

Report co-author Chinmoy Sarkar of UHK told Thomson Reuters: “As cities get more and more compact, they become more walkable. In denser residential areas, they are better designed and more attractive destinations. We are less dependent on our cars and use public transport more.”

The study’s authors argue that the density of a city, its shops, public transport links and closeness to places of work, help residents to be more active. For example, walking instead of driving.

Image: REUTERS/Michael Kooren

Commenting on other research that supports their findings, the authors say: “There is now an increasing body of evidence that several measures of high urban density, including residential density, retail and service density, street-intersection density and land-use diversity, are all associated with lower body-mass index and obesity.”

Gentrification

In his latest book, urbanist Richard Florida, a professor at the Rotman School of Management at the University of Toronto, argues that as city centres become attractive places to live, high property prices squeeze out the “service class”, such as taxi drivers and retail workers.

This allows the affluent “creative class”, who are also more able to afford gym memberships and exercise classes, to buy homes closer to amenities and their workplaces.

Some argue that it’s not just about wealth, and the way to create better opportunities for everyone is to improve access to quality education. However, this is hard to achieve when better schools are often in areas with high property prices. Plenty of studies from around the world link poverty to poor educational outcomes, as well as worse health and higher obesity levels.

While Florida’s work is considered controversial by many who specialize in urban studies, it does reflect a strain of thinking about the redevelopment of many urban centres.

Increasingly, what happens in cities is likely to have a big impact on us all. The United Nations predicts that by 2050, 65% of humanity will live in urban areas. How we are educated, whether we can walk to work or have to commute long distances, and the effects on our health and healthcare systems, are matters of concern that city planners and national governments are being urged to tackle now.

One example of how authorities might act, the Oxford and UHK authors say, is to update planning laws. The researchers say that their findings might mean that governments, such as the UK’s, which are attempting to prevent suburban densification by, for example, prohibiting the subdivision of single-lot housing and the conversion of domestic gardens into housing lots, conversely, could be preventing the suburbs from becoming healthier places to live.

TextMate Tip – Moving and Selecting

I’m going to cover a few general tips for text editing – I’ll split them into parts since there will be quite a few to cover, so this one will focus on moving around and selecting stuff.

Continue Reading »

TextMate Tip – ⌃⌘T

So my awesome girlfriend Johanna said I should do a “TextMate Tip of the Day” post series. I thought it was a good idea but sounded like too much work, so I dropped the bit that implied I had to do it daily and here we are. And for my first trick:

This window is your…window into the overwhelming number of things that TextMate can do. You bring it up by either pressing ⌃⌘T or using Bundles → Select Bundle Item…

Continue Reading »

Customising Colours in Leopard Terminal

I upgraded to Leopard a couple of days ago, and was reminded how hard it is to read the default blue colour in Terminal on a black background. Mike Solomon’s TerminalColors was written for Tiger’s Terminal and so doesn’t work with Leopard, so here is my SIMBL hack for Leopard’s Terminal – it allows customisation of ANSI colours on a per-profile basis

  1. Make sure you have SIMBL installed – follow Allan’s instructions for Input Manager support on Leopard

  2. Download

  3. Extract to ~/Library/Application Support/SIMBL/Plugins

  4. Restart Terminal and click the More… button in the Text tab of Settings

ToolTips in the TextMate Project Drawer

Here is a really tiny plugin which just makes the project drawer display tooltips for long items:

The tooltip only displays if the item is truncated, so they don’t get in the way unnecessarily

Download

Update: In Leopard, truncated items in lists are automatically given a nice tooltip with the full content – if you’ve upgraded and want to remove this plug-in so you don’t get 2 tooltips then you can just delete ~/Library/Application Support/TextMate/PlugIns/TooolTips.tmplugin and restart TextMate

Bundle Editor Search Plug-in

This is one for bundle developers – it allows you to use the ⌃⌘T “Select Bundle Item…” mechanism inside of the bundle editor.

Selecting an item will expand the item view and select the corresponding item, and focus the relevant editor field. It also extends the search to show languages too.

Download

Finder Labels in the TextMate Project View

Someone on the TextMate mailing list asked if there was a way to have the project outline show Finder colour labels, so here’s a plug-in to do just that.

Get it here

Update:

  • Now uses a 70% opactity for the colours to make the labels less overbearing, and draws with a gradient
  • Fixed a crash bug
  • Added label setting

Update:

You can now set the opacity level for the label colours manually, using this command:

defaults write com.macromates.textmate "TMLabels Opacity" 0.2

where 0.2 is the opacity you want (0 - 1: 0 is fully transparent, 1 is solid).

« Previous PageNext Page »

Fork me on GitHub