2009-12-03

FORTRAN valid line length plugin for Vim

I have written a Vim plugin to help my FORTRAN coding in Vim.

According to the file extension of a FORTRAN source file, this plugin sets a valid line length. Any characters occurring after this column are considered as error, and are matched so by highlighting.

This plugin is run automatically. But, if you want to use any other valid size for some reason, the commands are available.

You can download the plugin from the following link.
http://www.vim.org/scripts/script.php?script_id=2868

The following commands are available after installing this plugin.

:FORTRANLengthAccordingToExtension
Sets the valid line length according to the file extension.
This command is applied by default.
:FORTRANStandardLength72
The columns occurring after the 72nd character are marked.
:FORTRANCardImageLength80
The columns occurring after the 80th character are marked.
:FORTRANExtendedLength132
The columns occurring after the 132nd character are marked.
:FORTRANRemoveMatching
Removes the matching set by this plugin.

Here is the screenshot of the plugin. (Colorscheme is Molokai).




2009-06-29

Vim compiler plugin for FreeBASIC

I have uploaded a Vim compiler plugin for FreeBASIC.
You can download the fbc.vim at
http://www.vim.org/scripts/script.php?script_id=2691

For the following code:


the
:make
command produces an output as follows:


Traditonally, you can see the all error messages with
:cl

you can jump to next error with
:cn

and you can jump to the previous error message with
:cp


To install it, copy the script into your compiler folder. Assuming standart installations, it should be
C:\Program Files\Vim\vimfiles\compiler\
in Microsoft Windows, and
$HOME/.vim/compiler
in Linux operating systems.

In Vim, the compiler plugins are not automatically triggered unlike file type plugins. To set it whenever you need, use the command
1 :compiler fbc


To set it once and for all if a .bas file is edited, type the following into your VIMRC file:
1 autocmd BufNewFile,BufRead *.bas compiler fbc


If you need a syntax file for the upcoming FreeBASIC 0.21, you can download a syntax file at http://cubaxd.net/?en&p=syntaxfile.