Skip to content
June 19, 2011 / Chris Merck

My .vimrc

I love vim. But I need to have my features set just right.

The following setup works well for me. You put this in your ~/.vimrc file.

set nocompatible
set autoindent
set smartindent
set tabstop=4
set shiftwidth=4
set showmatch
set vb t_vb=
set ruler
set nohls
set incsearch
"set virtualedit=all
syntax enable

" Tell vim to remember certain things when we exit
"  '10  :  marks will be remembered for up to 10 previously edited files
"  "100 :  will save up to 100 lines for each register
"  :20  :  up to 20 lines of command-line history will be remembered
"  %    :  saves and restores the buffer list
"  n... :  where to save the viminfo files
set viminfo='10,\"100,:20,%,n~/.viminfo
function! ResCur()
  if line("'\"") <= line("$")
    normal! g`"
    return 1
augroup resCur
  autocmd BufWinEnter * call ResCur()
augroup END
June 19, 2011 / Chris Merck

A Simple but Powerful Makefile Template

Want to build several executables in the same directory, each of which uses several .c files, and may have common dependancies linked in? Then this makefile is for you:

# Makefile for swdsp project

CC= gcc
SWDSP_LIBS = -lm -lpthread -ljack

EXES= swdsp-example #vsynth

all: $(EXES)

swdsp.o: swdsp.h swdsp.c
	$(CC) $(CFLAGS) -c swdsp.c

swdsp-example: swdsp-example.c swdsp.o
	$(CC) $(CFLAGS) $(SWDSP_LIBS) -o swdsp-example swdsp-example.c swdsp.o

#vsynth: vsynth.c swdsp.o
#	$(CC) $(CFLAGS) $(SWDSP_LIBS) -o vsynth vsynth.c swdsp.o

	rm -f $(EXES) *.o

This builds a program called “swdsp-example”, which depends on the file “swdsp.c”. There is also a project called “vsynth”, but it is commented-out here.

You will need to change it to fit your needs, but the basic philosophy is helpful, imo.

Warning: The indenting is done with tabs. Failure to do so will result in great pain.

June 17, 2011 / Chris Merck

Tips Post-Install for an ArchLinux Desktop

This week I got my new ArchLinux desktop up and running. I basically RTFMed (i.e., followed the Beginner’s Guide (, and then added a few finishing touches.

So, if you’re installing Arch, I highly recommend you do the following after setting up using the Beginner’s Guide (and/or the official install guide). [Note that these are more notes to myself than a well thought-out guide. If I ever get around to cleaning up the tips, they will go on the ArchWiki where they belong.]

Use UUIDs instead of device names (like /dev/sda1) in /etc/fstab and in grub. This will save headaches when your disks decide to start up in a different order! I made the mistake of using the /dev/… names directly, and had to switch to UUIDs manually. More on that in a comming post.

For some reason, I had to set interface=eth0 in /etc/rc.conf to get my wired networking to work.

Before being able to use pacman, I had to run pacman-db-upgrade.

In Gnome3, to get empathy (instant messaging) to work, I had to install telepathy: pacman -S telepathy . I just installed the whole group.

To get my Brother HL-1440 laser printer working I had to:

  1. Install cups.
  2. Add the lineย blacklist usblp in /etc/modprobe.d/modprobe.conf
  3. Rmmod usblp
  4. Now, and only now, can you see the printer in the cups webiface.

Instead of ifconfig use ip addr. That’s the new way ๐Ÿ™‚

When I upgraded recently my startx stopped working. It complained of not being able to find the hostname command. It seems that it should be in the coreutils package, but it isn’t included for some reason. So, you need net-tools (this brings back old friends like ifconfig too!).

I installed both Gnome3 and KDE4. Gnome3 has some nice features, but very little configurability. KDE4 is not crashing like every other KDE I’ve used. But still, those desktop environments frustrate me. I tried installing XFCE, and then my machine starting going really slow. (Opening a new terminal took ~5sec). I tried installing LXDE (Openbox-based) but startx and applications were super slow. I tried the venerable responsiveness tips from ( but it helped little or not at all. The fix was to uninstall xfce and reboot. Ditching xfce wasn’t so straight forward. You have to first uninstall xfce4-goodies, then xfce4, stopping to uninstall other xfce-dependent packages if needed. Then I reinstalled thunar, which is my prefered file manager, but is also an xfce package. Now, my system is super-fast… opening a new terminal or even a firefox window occurs before my finger has released the mouse button. Impressive. (This is even with swappiness and such at the defaults.)



August 16, 2010 / Chris Merck

Sharing a Folder to a vBox Linux Guest

I’m just setting up some VirtualBox sandboxes for testing a software release, and I’ve had a hell of a time getting a folder shared from my ArchLinux host to my Ubuntu 10.4 guest.

Everyone will tell you to share the folder either with the vBox gui or with the VBoxManage command. Then they give you the proper mount command for the guest:

sudo mount -t vboxsf -o uid=1000,gid=1000 share mountpoint/

But for me this failed with error:

/sbin/mount.vboxsf: mounting failed with the error: No such device

Reboot was no help.

Conclusion? Reinstall the Guest Additions.

Runs like a charm. ๐Ÿ˜‰