Wednesday, January 09, 2008

Another Stupid Ubuntu Trick

I could write a post that mentioned that at least three teams in the Big 12 could have played as well as Ohio State did in Monday's game.

But that would be whining. It's not whining to note that KU has the best record among all the BCS football schools.

But I digress. Following the last post, here's another oddity in Ubuntu's implementation of vim. In most modern versions, when you open a file your editor immediately transports you to the last line you edited — great if you're doing a series of computer runs where only a few lines of input change. By default this trick doesn't work in Ubuntu. To change this behavior, go to /usr/share/vim/vimrc and uncomment the lines that read

if has("autocmd")
  au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$")
    \| exe "normal g'\"" | endif
endif

If you don't want to do this globally, or don't have administrative access, add the lines to your ~/.vimrc file.

0 comments: