Hi Carl,
I won't claim to know more than you do about VIM and its extended func-
tionality, but the simplest solution is to add the following two lines
to your ncl.vim:
setlocal smartindent
setlocal expandtab shiftwidth=4 softtabstop=4
If you'd like more control over the indentation, may I suggest consult-
ing the VIM Wiki.
http://vim.wikia.com/wiki/Indenting_source_code
I hope this helps.
Daran
Daran Rife
Head of Mesoscale Modeling
GL Garrad Hassan
9665 Chesapeake Drive, Suite 435, San Diego, CA 92123, USA
Tel: +1 303 271 1450 / Fax: +1 303 271 1450 / Mobile: +1 303 968 6821 www.gl-garradhassan.com
This email is issued on behalf of Garrad Hassan America, Inc. (trading as GL Garrad Hassan) and is subject to the GL Garrad Hassan email disclaimer (http://www.gl-garradhassan.com/emaildisclaimer). Garrad Hassan America, Inc. is registered in America No. 94-3402236 Registered Office: 45 Main Street, Suite 302, Peterborough, NH 03458, USA
-----Original Message-----
From: cjschrec@gmail.com on behalf of Carl Schreck
Sent: Wed 8/29/2012 07:05
To: Daran Rife
Cc: ncl-talk@ucar.edu
Subject: Re: VIM Enhancement
Hi Daran,
Thanks for your comments. Maybe you know more about vim syntax files than I do--this is the first time I've worked with one. Do you know how to get vim to automatically indent within blocks (e.g., ifs, do loops, etc)?
Right now, it automatically indents as in the previous line, and it does some special indentation for lines extend by "\", but that's it.
What I want:
if (x.eq.0) then
print(x)
end if
What I have:
if (x.eq.0) then
print(x)
end if
Thanks!
Carl
On Tue, Aug 28, 2012 at 3:52 PM, Daran Rife <Daran.Rife@gl-garradhassan.com> wrote:
Hi Carl,
I appreciate your effort to put this together. I had noticed the
existing
ncl.vim was a bit dated, and was planning to make my own update this
week,
but I was very pleased to see that you've already done so and have
shared
with the group. I've plugged in your new version and it works great with
NCL 6.0.0.
Thanks again and best regards,
Daran
Daran Rife
Head of Mesoscale Modeling
GL Garrad Hassan
9665 Chesapeake Drive, Suite 435, San Diego, CA 92123, USA
Tel: +1 303 271 1450 <tel:%2B1%20303%20271%201450> / Fax: +1 303 271 1450 <tel:%2B1%20303%20271%201450> / Mobile: +1 303 968 6821 <tel:%2B1%20303%20968%206821>
www.gl-garradhassan.com
This email is issued on behalf of Garrad Hassan America, Inc. (trading
as GL Garrad Hassan) and is subject to the GL Garrad Hassan email
disclaimer (http://www.gl-garradhassan.com/emaildisclaimer). Garrad
Hassan America, Inc. is registered in America No. 94-3402236 Registered
Office: 45 Main Street, Suite 302, Peterborough, NH 03458, USA
--
Message: 9
Date: Tue, 28 Aug 2012 11:34:20 -0400
From: Carl Schreck <carl@cicsnc.org>
Subject: Re: VIM Enhancement
To: Mary Haley <haley@ucar.edu>
Cc: ncl-talk <ncl-talk@ucar.edu>
Message-ID:
<CANGuUDEQEYNnNGaZKyhwvgw31eG9Scq3S7KFqNEet7EbxRdiQQ@mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"
Sounds good. Thanks!
Carl
On Tue, Aug 28, 2012 at 11:08 AM, Mary Haley <haley@ucar.edu> wrote:
> Thanks Carl. I've added your new files to our editor enhancement page.
>
> When 6.1.0 officially comes out, I'll try to remember to update the
> various files to reflect any new functions, resources, etc.
>
> --Mary
>
> On Aug 24, 2012, at 10:43 AM, Carl Schreck wrote:
>
> I've recently converted from Emacs to VIM. The vim syntax files that
are
> currently available for NCL are great, but they didn't have all the
new
> functions. Plus resources weren't highlighting for me.
>
> So I used Mary's gen_editor_utils script to make a new ncl3.vim file
based
> on the old ones. The new file, along with everything that went into
it, can
> be found at:
> ftp://filsrv.cicsnc.org/carl/ncl-vim/
>
> Cheers,
> Carl
>
> --
> Carl J. Schreck III, PhD
> Postdoctoral Research Associate
> Cooperative Institute for Climate and Satellites (CICS-NC)
> North Carolina State University and NOAA's National Climatic Data
Center
> 151 Patton Avenue
> Asheville, NC 28801
> Tel: 828-257-3140
> carl@cicsnc.org
> http://monitor.cicsnc.org/mjo/
> http://www.atmos.albany.edu/student/carl/
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
-- Carl J. Schreck III, PhD Postdoctoral Research Associate Cooperative Institute for Climate and Satellites (CICS-NC) North Carolina State University and NOAA's National Climatic Data Center 151 Patton Avenue Asheville, NC 28801 Tel: 828-257-3140 carl@cicsnc.org http://monitor.cicsnc.org/mjo/ http://www.atmos.albany.edu/student/carl/
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Aug 29 13:06:52 2012
This archive was generated by hypermail 2.1.8 : Mon Jan 14 2013 - 14:31:38 MST