Friday, August 27, 2010

Communication fail

I had an interesting fail combination today. First of all the d-link dir 655 i just bought decided to reboot roughly once a minute on average. This was somewhat unsatisfactory since the WLAN reconnect of my macbook takes over 20 seconds :).

So I started phoning the hotline, the number of which i already had from the day before. Now the fun begins: My phone doesn't support tone dial but the hotline insists on being directed by those which the nice lady explains to me as slowly as she can so it costs me 50 cents just to listen to her telling me to do something I can't.

I figured I could just turn tone dialling on on my phone but it doesn't have that feature either (Why is this so hard?). My next try was googling for a tone dial sound generator applet on the internet (this one works btw: and holding the telephone microphone close to the pc speaker but then my ISP screwed the routing and internet was down as well. :(

Great Internet down -> phone down -> internet down. Don't you love modern times.

Friday, August 20, 2010

What is forward/backward searching?

Forward searching (in this context) is the process of editing a latex file and by a keypress and some magic you are catapulted into your pdfviewer to the exact same point that your cursor was pointing to in your editor.
Backward searching is the reverse process, where you click on some place in the pdf viewer and you are then referred to the source of this text within your favourite latex viewer.

Vim/MacVim and latex-suite; some pdfviewer (skim here) with pdfsync support and one of the two latex/tex packages pdfsync/synctex.

To make it work in Skim you need to open the preferences, goto the sync tab and enter:
Preset: Custom

Command: mvim

Arguments: --remote-silent +":%line;foldo!" "%file"
Drop this code into a file in your path and make it executable

/Applications/ -r "$2" "$1" "$3"
Then put this into your vimrc file:
let g:Tex_ViewRule_pdf = 'pathtofile'

let g:Tex_ViewRule_ps = 'pathtofile'

let g:Tex_TreatMacViewerAsUNIX = 1
This was the only way i could get it to work under vim and macvim simultaneously. Then you just need one last line in every tex file you want it to work to set everything up:
It's really that easy. Now in order to jump from vim to skim you need to type \ls and to get from skim to vim you would Shift+Command-Click
Try it; its grand. Enjoy!

Monday, August 16, 2010

Shortcut nuisance

I started wondering what the bash (or rather libreadline with emacs key bindings) command was for deleting the next word (already making extensive use of ^u, ^w and the like).
bind -P| less is a big helper here, is also.

My revelation now was finally realising that few of the keystrokes work on mac the same way as usual because the option key is not meta; meta is provided escape. So instead of Alt+b i actually want Esc+b.

I now have several options all of which suck:

  • I can turn option into meta in the terminal app which will cause me to loose my Umlauts (I use a selfbuilt kind of US-Alt-Intl keyboard layout)
  • I can let it as it is but then i have to remember the press escape along every time (escape seems the only special key that does not autorepeat). Btw i use to make caps lock escape which really helps here and in vim.
  • I could switch to iTerm which is as pretty as terminal when choosing the same fonts and then adapting to get all alt combinations to work but this only worked for half of those 
  • There is also something that looked like the answer to my prayers: a hacked iTerm that has a (mac) normal right option key and a (linux/unix-like) normal left option key (aka alt) (or v.v.). Unfortunately my Umlauts then only work in vim and not in bash. I don't know where this is coming from and i don't know how to go about debugging this. 

BTW Terminator doesn't do any of this right so forget it. (UPDATE: MacWise as well)
I think I will go with 1.

What annoys me most is that in all Cocoa apps these shortcuts have identical meaning to term/bash but only the ones using the control work. Why?

If someone has a workaround please tell me.
My Requirements:
I like my umlauts on right alt + Key, I'd love emacs binding to work with the left alt and if possible i'd love them to work in every Cocoa app.

usability fail

This is me trying to log in to the apple forums to comment on Safari not being able to set its language accept field in the http headers to anything other than the language set in system preferences (epic in itself i dare say).

So what's wrong here? This is actually an error page! I already hit the Create Account Button and this is the page telling me that the nick is already taken.  At least that is what i figured out after trying two other browsers that failed as well and finally succeeding by choosing a different nick.

<Apple Fan Boy Attitude> This is Apples way of making my user experience better by preventing discomfort caused by error messages.</Apple Fan Boy Attitude>

Commands that save your Sanity No 1

:w !sudo tee %
overwrites a file that you don't have permission to write to but edited with vim nonetheless.

Thursday, August 5, 2010

Replacing parts of your Macbook Air

I had a need for replacing my Macbook Air's top case and heard it was insanely difficult beforehand. This was definitely not the case (despite some 80 odd screws of over ten different sizes) thanks to this guide. So if you need to do it yourself don't fret, trust ifixit!

On a side note: I was thoroughly surprised to see how thought out and beautiful the inside of the Macbook Air was. I'm still unsure what to think of it but they even introduced blinds in black varnish look that have no other purpose but optical ones. Overall it is really an impressive piece of craftsmenship though not necessarily all by apple (e.g. i was most impressed with size of the mainboard)