vim-abinitio
A VIM syntax plugin for Ab Initio Data Manipulation Language.
Installation
Copy the included directories into your .vim or vimfiles directory. The tabular and the neosnippet plugin is also recommended, but not necessary.
Dein
Or better to use a plugin manager, like dein. Put this lines in your plugin list:
call dein#add('Shougo/neosnippet') " Recommended
call dein#add('godlygeek/tabular',
\{ 'on_cmd' : 'Tabularize' }) " Recommended
call dein#add('mattia72/vim-abinitio' ,
\{ 'on_ft': ['abinitio' ] })
So the plugin will loaded only if you open a *.dml file or call set filetype=abinitio
.
Neobundle
Another, but depricated aproach to use neobundle simply put this line after your neobundle list in your .vimrc:
NeoBundleLazy 'mattia72/vim-abinitio'
then add this line in your auto commands section:
autocmd FileType abinitio NeoBundleSource vim-abinitio
So the plugin will loaded only if you open a *.dml file or call set filetype=abinitio
.
Syntax highlight
Matchit support
b:match_words
contains matching words to jump between "begin" and "end" or
"record" and "end" with %
Indent
Indentation works well (in most cases :))
- Select the lines you wan't to indent. (eg. with
V%
on a "begin" keyword) - Push
=
Tabular
To format lines, that assigns values (contains =
or ::
), we can use the
famous tabular plugin.
[vim-abinitio] (http://github.com/mattia72/vim-abinitio) maps the appropriate
commands for you.
<leader>t=
helps you line up assignments by aligning the=
on each line.<leader>t:
helps you line up assignments by aligning the::
on each line.
Neosnippet support
For this feature you need to install neosnippet.
The snippet file should loaded automatically, if not, you can load it by:
:NeoSnippetSource <path_to_the_vim-abinitio_plugin>\snippets\abinitio.snip
Then you can start type a snippet alias eg. func
.
C-k
selects and expands a snippet from the neocomplcache/ neocomplete popup (UseC-n
andC-p
to select it).C-k
can be used to jump to the next field in the snippet.Tab
to select the next field to fill in the snippet.
Available snippets are in the snippets directory. Feel free to extend them.
How to use it from AbInitio GDE?
- Download the exe file from here: AbInitioPlus
- Start it!
- Open an editor in GDE.
- Push the corresponding hotkey
Thanks
- for the first inspiration: https://sites.google.com/site/abinitiobyte/
- for this indent script howto: http://psy.swansea.ac.uk/staff/Carter/Vim/vim_indent.htm