Skip navigation

Monthly Archives: July 2011

Summer here at U of I tends to consist of large monotonous chunks of free time punctuated by a few hours everyday of work/classes and related stuff.

Now, there are a lot of different ways to break the monotony – though the method of choice for the friends I have here is to drink. Now, as almost every college kid across the world knows, when you’re hanging around, slightly inebriated, some rather strange topics of conversation tend to come up. This is one of them.

 

So, imagine you’re walking down the street, any given day and all of a sudden (and for no apparent reason) that last shred of sanity that keeps you going suddenly snaps and you decide to go on a murderous rampage (because, let’s face it – we’re all partially psychotic) What song will be playing in your head while you’re committing said homicides?

The friend who’s idea it was chose

Personally I can’t decide between and

 

Think about it. Take your time though, it’s a rather important question.

Advertisements

Update – it occurred to me that an unfortunately large number of people will have no idea what this post is talking about.

Here’s some background: all programmers use text editors to write their programs in – though this can also be accomplished through something like notepad, people tend not to use it for very large projects because it’s not exactly friendly towards large projects.
[There are also plenty of other options available – including things called IDE’s – though you don’t need to pay much attention to them]

So generally, programmers tend to use one of two age old text editors : EMACS or Vi (or it’s more recent, non propriety clone- Vim). EMACS is inarguably more comprehensive; it’s been called an Operating System emulating a text editor. Vi/Vim on the other hand uses less system resources (something that was very relevant back in day). Even today, it’s not hard to find plenty of people furiously arguing the case for either of the two, though the choice usually boils down to personal preference.

I prefer Vim. Though, personally I(and most people) find the standard Vim interface lacking in certain features. Vim does however, provide a workaround, using it’s own markup language, you can create and save a configuration file to make it behave exactly the way you want.

if you’re using vim on most standard linux distributions – you can find the vimrc file at home/uname

to edit it, type the following command
vim ~/.vimrc

In all probability, you’ll see a blank file, especially if you’ve never run the command before.

Also, Im not sure how many of these will work with Gvim – though logically they all should. Anyway – the following is the configuration I like to use. As and when I discover new things, I’ll keep it updated.

 
set nu                               " enables line numbering
set tabstop=4                        " makes tab = 4 spaces
set expandtab                        " not really sure what this does, but tabstop doesn't always work without it
set ttyfast                          " Sets fast terminal
set nocompatible                     " disables Vi compatabiliy
set nobackup                         " removes backup files
set history=100                      " sets history to remember 100 commands
set undolevels=200                   " remembers 200 undo's.
set showcmd                          " partially shows the command in the status bar
set showmode                         " displays the current mode
set showmatch                        " matches brackets
set ruler                            " shows the ruler
set ignorecase                       " removes case sensitivity, for searches and finds
set incsearch                        " sets incremental search
set autoindent                       " indents code
set cindent                          " indents code, particularly for c
set noerrorbells                     " stops that irritating beeping
set esckeys                          " allows you to use cursor keys in insert mode (maybe even replace, haven't tried)
set hlsearch                         " highlights search finds
" set encoding=utf-8                  " Enables highlighting as utf-8 as default
set autowrite                        "automatically writes before next command

" To enable syntax highlighting
if has("syntax")
   syntax on
endif

" brighter colours, useful if xterm has a dark background
if &term =~ "xterm"
    set background=dark
endif

map q :wq<CR> "Maps the letter q to write and quit, skips needing to use :wq

map V :!ispell -x %<CR>:e!<CR><CR> "Enables spellcheck, use V to activate - never bothered to use, so not sure if it works

" To enable autocorrect options -
" use the format -
"i ab incorrect_word correct_word

I hurt myself today,

to see if I still feel.

I focused on the pain,

The only thing that’s real.

Trent Reznor