Showing posts with label emacs. Show all posts
Showing posts with label emacs. Show all posts

Saturday, October 27, 2012

How to install vim plugins

I have long been an Emacs user, but find myself using Vim more frequently when editing from the command line. One day I went to edit a Clojure source file and found that indentation rules and syntax highlighting were not installed. Using the VimClojure plugin I am now able to edit Clojure files properly, but it was a pain for me (a noob when it comes to vim) to get it working. Here is how it is done:

Command Line

Download the file
wget http://www.whatever.com/plugin.zip

Move the file to /usr/share/vim/vimfiles/
sudo mv plugin.zip /usr/share/vim/vimfiles/
PASSWORD

Extract the file

For ZIPS:
sudo unzip plugin.zip

For tar.gz:
sudo tar -xvwzf plugin.tar.gz

If this ends up creating a directory instead of extracting the files, do the following steps.

cd into the folder
cd created-folder

Move its contents
sudo mv ./ ..

You can now start using the plugin. But beware, for many plugins you are also required to edit the vim configuration file at /etc/vim/vimconfig

My Clojure plugin needed syntax highlighting and and filetype plugin indent on. Your README file (if there is one) should tell you what to do.

Graphically

 Download the plugin
  Run a file manager as root.

 Copy the zip file from wherever you downloaded it.
Plop it into /usr/share/vim/vimfiles/ and extract it.
If the README file specifies it, edit the vimrc file found in /etc/vim/vimrc/

This is usually just a matter of uncommenting a few lines. I had to uncomment syntax highlighting and file auto indent.

Saturday, September 1, 2012

Common Lisp Tutorial preamble

Welcome to my Lisp tutorial. Just a while ago Lisp was a foreign language to me, and through study and determination (and a boatload of help from IRC users) I am finally started to get a grasp on the language. As a return to the Lisp community I will be writing the most extensive guide on this blog yet in a hope to teach Common Lisp to a complete newcomer to the language.

On IRC, many were in favor of using Common Lisp as a first programming language. I am in strong support of teaching FUNCTIONAL  programming as the first paradigm, but I am not in support of using Lisp for this purpose. For this reason the tutorial assumes a background in another programming language, but what that language is does not matter. If you know what the terms global variable, function (method), and structure mean then you are ready to learn Lisp.