On 20 May 2014, Rudra Banerjee <[email protected]> wrote:
> Hi,
> I am vim user for long time, but have not done much development
> (except a colour-scheme). But, for fortran (my principle language), I
> dearly miss some plugins.
> There is only one (fortran_code_complete(fcc), but guess, is not
> maintained. Also, has some odd format). So, I want to dig deep, and
> start developing a full fortran plugin (including code-complete and
> indent).
>
> But, given that I have not done anything as such before, I am bit
> puzzled on where to start. Can anyone kindly provide me a sample for
> ftplugin/code_complete?
>
> I guess, for the blocks like:
> sample: do i=1,10<F-7>
>
> should yeild:
>
> sample do i=1,10
> <cursor here>
> end do sample
The buzzword you're looking for is "snippets". There are a number
of snippet plugins around, f.i.:
https://github.com/SirVer/ultisnips
https://github.com/Shougo/neosnippet.vim
https://github.com/garbas/vim-snipmate
You should probably avoid the original snipmate, which is no longer
maintained:
https://github.com/msanders/snipmate.vim
Snippets for various languages are maintained separately:
https://github.com/honza/vim-snippets
At the time of this writing, the archive doesn't seem to have any
snippet for Fortran, so this is your chance to achieve eternal glory as
a snippet creator. :)
"Code completion" is a very different animal. Still useful, but
quite different from what you're asking for. See for example:
https://github.com/Shougo/neocomplete.vim
> fcc does same thing, but, I am not sure if the approach is efficient
> one. That code is http://www.vim.org/scripts/script.php?script_id=2487
You can safely forget about this one, it hasn't been updated since
December 2008. Use neocomplete instead if you want code completion, or
ultisnips (or another snippet plugin) if you want snippets.
/lcd
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.