Archive for category: [English Posts]

Use the Last Search Term for a Substitution in Vim

5 April, 2011 (17:38) | Vim, [English Posts] | By: Wolfgang

It is quite usual to first search for something in vim just to use it in a substitution afterwards. To do so just leave the substitution pattern of the substitution command empty. This way it is possible to build complex regular expressions interactively with the help of the search function and later use it ...

Using the Most Recent Input Again in LaunchBar

25 March, 2011 (02:29) | Mac OS X, [English Posts] | By: Wolfgang

To reuse your most recent LaunchBar input activate LaunchBar again, select the desired action and press Shift + Return.

Taking a Screenshot of a Virtual Machine in VMware Fusion

24 March, 2011 (02:19) | Mac OS X, Miscellaneous, [English Posts] | By: Wolfgang

To take a screenshot of a running virtual machine in VMware Fusion (tested with version 3.1.2) drag the preview picture of the client in the Virtual Machine Library window and drop it somewhere on the Desktop or a Finder window.

Taking a screenshot of a virtual machine in VMware Fusion 3

GIMP Default Keyboard Shortcuts

6 August, 2010 (06:30) | GIMP, [English Posts] | By: Wolfgang

Here you can get my list of predefined keyboard shortcuts in GIMP 2.6: http://wolke23.at/files/gimp-keyboard-shortcuts.pdf

In case you want to customize or improve the list, I also put the LaTeX-source online: http://wolke23.at/files/gimp-keyboard-shortcuts.tex. Please consider sharing the result too.

Tracking File Opens With opensnoop

5 August, 2010 (06:30) | Mac OS X, [English Posts] | By: Wolfgang

Opensnoop is a great DTrace-based command-line program to track file opens.

If you want to know what files are accessed by a certain Process use sudo opensnoop -p PID.

To get information about the processes a file is opened by, use the -f option: sudo opensnoop -f ~/myfile.tmp.

Adding Leading Zeros to Filenames

4 August, 2010 (06:30) | zsh, [English Posts] | By: Wolfgang

Back in May I did a blog post about how to batch rename files with Zshell's zmv function. Today I will use zmv to add leading zeros to filenames, so that 1.pdf, 2.pdf, 23.pdf and 102.pdf will become 001.pdf, 002.pdf, 023.pdf and 102.pdf.

zmv '().pdf' '${(l:3::0:)1}.pdf'

This command was found on the Zsh-Lovers page: http://grml.org/zsh/zsh-lovers.html.

Mac OS X Software Update via Command-Line

3 August, 2010 (06:30) | Mac OS X, [English Posts] | By: Wolfgang

The command-line equivalent to the Software Update… entry in the Apple menu is softwareupdate.

To install all appropriate updates use sudo softwareupdate -ai. Note that there is no GUI Dialog suggesting a reboot after system-critical updates were installed. So don't forget to read the commands exit message and reboot manually if necessary.

Sharing the History in Zsh

1 August, 2010 (06:30) | zsh, [English Posts] | By: Wolfgang

A great feature of the Zshell is its possibility to share the history between multiple shell (screen) sessions or even multiple physical hosts.

To do so, make sure the following options are set in your zsh configuration (usually ~/.zshrc):

setopt append_history
setopt share_history

From now on, the history is shared amongst all zsh sessions on your computer. If ...

Convert Photoshop Files with ImageMagick

31 July, 2010 (06:30) | zsh, [English Posts] | By: Wolfgang

If you want to create a flattened version from multi-layer Photoshop files with the help of ImageMagick use the following command:
convert image.psd image.png

Or for batch converting multiple images:
for i (*.psd) convert $i'' ${i%.*}.png

To refer to the other layers use the numbers greater than 0.

Note that the for loop above was tested with zsh, if ...

LaTeX tabular Environment with Both Defined Column Width and Alignment

29 July, 2010 (06:30) | LaTeX, [English Posts] | By: Wolfgang

Probably the easiest way to set a specific column width and a certain type of alignment is to use the package ragged2e:

\documentclass{article}
\usepackage{inputenc}
\usepackage{array}
\usepackage{ragged2e}

\begin{document}
\begin{tabular}{p{20mm} >{\RaggedLeft}p{20mm} }
foo & bar \\
\end{tabular}
\end{document}

If you don't want to use the ragged2e package the following works too. Note that now \tabularnewline instead of \\ is necessary in order to typeset the ...