Wednesday, July 11, 2012

Vim Configuration Tutorial

    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 every time 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:


iPiccy: Loading picture

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

Saturday, June 23, 2012

YSP summer 2012

Super Smash Brothers...sister chromatin cohesion...poker...Four Squares...biochemistry of the gene...computer science...ping pong and microwavable Mac n Cheese...


This about sums up what my first week at the Young Scholars Program consisted of. YSP is 6 week residential summer program at FSU in Tallahassee. Although the weekdays seem to me almost unbearably long, there's a lot of down time after 5pm and many things to do to stay entertained. (for example: Super Smash Bros., poker, and this morning we headed out to Wakulla Springs). Right now I'm taking three classes and working at a lab with Dr. Yu researching topics related DNA and chromosomes in live yeast cells. I find all my classes really interesting so far; especially my math class. The math course I'm taking is called "Mathematical Modeling and Problem Solving" and I just find it so much fun. It's not like the high school math I've done; the problems make you think and they're very open to discussion.


Back home, my parents have been on edge everyday since they dropped me off here at FSU; if I forget about my phone for just a day I'll have about 15 missed calls and 9 texts from them. Literally. This is as much as an adjustment to my parents as it is to me. I think YSP is a great introduction and preparation to what it will be like when I move away from home to go to college out-of-state. Overall it's so far, so good. :)


And on a side note, CONGRATULATIONS to the Miami Heat, 2012 NBA Champions!