Tuesday, July 10, 2012

VIM CONFIG FILE

 Alot of the more useful features on vim are not initially turned on. Using the  vim config file, you can turn on these features, and you can shape/configure vim to your preferences. A configuration file or a config file arranges the settings for a computer program. These types of files can modify settings, and be set to run specific commands during the startup of the program. The configuration file for VIM is written in ASCI.

Where to find the vim configuration file:
The vim configuration file can be found in your home directory with the following command:
             ls -la

The vim config file will be labeled ".vimrc", and it can be edited by using the command:
             vim .vimrc


From this editing screen you can add as many features/commands as one may please to vim. Every command/feature gets its own separate line. For example you shouldn't put a command like spell check on the same line as a command for indentation.

The vim config file is sourced/applied everytime you open vim. The vim source file is sourced by default. Any other file used would have to be manually sourced from vim using the command ":so <filename>.vim" while vim is in command mode.

Some cool features:


Are you horrible at spell checking?:
set spell

Are your indents not automatic?:
set autoindent

To set indentation to a certain # of characters:
set shiftwidth=<#>

Aren't line numbers helpful when trying to find the right line?:
set number

Do you hate those annoying backup files clogging up your directory?
set backupdir=~/.vim/backup,/tmp

Want to set the tab stop to certain amount x spaces?
set ts=x

Have you ever searched for something in vim and wanted to see pattern matches as you typed?:
set incsearch

Want to make searching even easier?
set ignorecase
set smartcase
(
These two options, when set together, will make /-style searches case-sensitive only if there is a capital letter in the search expression. *-style searches continue to be consistently case-sensitive.)

want vim to remember a longer history? (say X number of commands?)
set history=X  by default, vim only remembers the last 20 commands

Is your background dark and you can't see your text? (Lighten your text with)
set background=dark

Is your background light and you can't see your text? (Darken your text with)
set backgorund=light

And we ALL want to use our mouse in vim:
set mouse=a

your entries should look something like this:
 When you are satisfied with your configurations, Exit inset mode, go to command mode, and then type in:
:wq

If you later wish to change some settings, or add new settings, simply go back into the .vimrc file again.
If you want to delete a setting simply delete the line it is located in from vimrc

Wednesday, June 27, 2012

Random Bus Ride

One thing you should never do when bored..... ride a random bus for "fun". First off, it is anything but "fun." There might even be a moment of pure unadulterated terror when you notice the bus is exiting the college campus and is continuing to pass by an industrial yard.

My roommate and I didn't have class this evening. So, as we began to run out of things to do; unfortunately, thoughts went where thoughts should never EVER go. We ended up taking a joy ride on a bus to "see  where it takes us." FAIL. Once we passed the industrial yard, hyperventilation began and the number of sane people on that bus decreased by one. We lucked out, the bus driver was making one last loop back to the campus.

Lesson learned: no jumping on random campus buses because your bored, and your happy you just wrote c++ code on your laptop. Next time, I will be keeping it locked at my desk, and will write more code to keep me busy. Peer pressure is bad children, DO NOT SUCCUMB. You will never be the same. Life Guru up and out


Friday, June 22, 2012

A Means To A Beginning

So.. this blog is starting out as an assignment for my Comp Sci class... But, who knows where it will go from here. So far, the class has been pretty interesting;the teacher has, to my amazement, perfected the balance of fun and meaningful work. I'm taking this class as a part of a program at FSU (YSP), and so far it's been really great. I've had the chance to work in a professional lab, and I've been able to participate in some great experiments. Also, the teachers all have something valuable to offer, so it kind of balances out the fact that I have to wake up at ungodly hours. Another great part of the program are the weekend trips. This week we went to Wakulla Springs, just in case you didn't know the water temperature there is about... 69 DEGREES! 

On a more brutal note, the food here is questionable. There are somethings that just don't need to be deep fried in my opinion. And there's definitely a problem when the bus is more comfortable than your bed. Just some food for thought....But that's it for now.. check back for more posts and Comp Sci tutorials!!