Saturday, January 5, 2013

Re: fortran indentation

On Sat, Jan 5, 2013 at 12:55 PM, Joe Gain <joe.gain@gmail.com> wrote:
> Hi Peng, if you google "vim fortran codecomplete" you should find a few
> links, such as:
>
> http://www.vim.org/scripts/script.php?script_id=2487
>
> "This script allows you to complete Fortran 90 structures by pressing <F7>.
>
> The plugin in written in python, so you need to have your vim compiled with
> python support in order to use it.
>
> The intention is to complete "program", "type", "interface", "module",
> "subroutine", "function", "do", and "select" constructs. You write the first
> line of such a construct (e.g. "subroutine foo(a, b)", then press <F7>, and
> the script will add the closing line "end subroutine foo" and put the cursor
> between the two lines, _indented_ by one level.
> ..."


<F7> is already taken on my vim. I use the following for indentation.
Is there a way to change the shortcut from <F7> to --.

Also, I disabled my <F7> definition in ~/.vimrc, but I don't see <F7>
can indent the code block. Does <F7> work for you? Thanks!

187 "full file indent
188 fun BenIndent()
189 let oldLine=line('.')
190 normal gg=G
191 execute ':' . oldLine
192 endfun
193 "map -- :call BenIndent()<Bar>normal zz<CR>
194 map -- :call BenIndent()<CR>

--
Regards,
Peng

--
You received this message from the "vim_use" 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

No comments: