Thursday, September 27, 2012

Re: vim cannot indent awk correctly

On Thursday, September 27, 2012 10:59:50 AM UTC-5, Peng Yu wrote:
> The following is the indented results of an awk file.
>
>
>
> ~/linux/test/awk/lang/operator/[$ cat main.awk
>
> BEGIN {
>
> }
>
>
>
> {
>
> }
>
>
>
> END {
>
> }
>
>
>
> I have the following vim installed (from MacVim). Is there a problem
>
> with vim? Or there is some problem with my installation?
>
>
>
> ~/linux/test/awk/lang/operator/[$ gvim --version
>
> VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Sep 1 2012 18:08:47)
>
> MacOS X (unix) version
>
> Included patches: 1-646
>
> Compiled by Bjorn Winckler <bjorn.winckler@gmail.com>
>
> Huge version with MacVim GUI. Features included (+) or not (-):
>

Your Vim version looks pretty recent. I'm going to assume the standard runtime plugins are also recent.

Do you have any awk filetype plugins which you've manually installed?

How did you achieve the indent you show (i.e. what commands did you execute to achieve that indent)? What are your indent options set to? These are:

'autoindent'
'smartindent'
'cindent'
'indentexpr'

Do you have filetype-based indent turned on? I.e., do you have something like:

filetype plugin indent on

in your .vimrc?

--
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:

Post a Comment