I'm not sure if it's working for me or not... When I insert a new line
under an if, it does indent
if( True ) then
indented
but thanks to the suggestion from Daran Rife on this list, smartindent did
that anyway. But if I press ==, then it removes the indent:
if( True ) then
not indented anymore
Am I doing something wrong? I'd also recommend replacing the ncl.vim in
syntax with the one I recently shared:
http://www.ncl.ucar.edu/Applications/Files/ncl3.vim
As it has all the latest functions, and it highlights the resources
(something that never worked for me in the previous versions).
Below is my vimrc file in case there's something in there that's breaking
your script.
Thanks!
Carl
--- "ncl highlighting "au BufRead,BufNewFile *.ncl set filetype=ncl "au! Syntax newlang source $VIM/ncl.vim "auto-indent settings "set cindent set smartindent "set autoindent set expandtab set shiftwidth=2 "set tabstop=2 set softtabstop=2 noremap <Tab> == set ignorecase set smartcase set modeline "set ls=2 "colorscheme darkblue set laststatus=2 set pastetoggle=<C-p> set whichwrap+=h,l set wildmode=longest:full set wildmenu set backupdir=~/vimtmp,. set directory=~/vimtmp,. set backup " Press j or k to turn off highlighting of last search nnoremap <silent> j :nohlsearch<CR>j nnoremap <silent> k :nohlsearch<CR>k "change the behavior of enter inoremap <Return> <Esc> noremap <Return> i<CR><Esc>==k$ -- On Mon, Sep 24, 2012 at 2:11 AM, Xin Xie <xiexinyls@gmail.com> wrote: > Hey, > > To facilitate the coding in NCL, I made a VIM indent file for NCL language > which indents the do/if block. > I have put it on github combined with all the other VIM enhancement files > downloaded from NCL web site. > > To use all these features, just go to https://github.com/xiexinyls/vim and > download the whole directory structure and put them in your .vim directory. > > If you have git, you can also go to your home directory and type > > git clone https://github.com/xiexinyls/vim ./.vim > > Hope this script helps. > > Xin Xie > School of Marine and Atmospheric Sciencs > Stony Brook University > > > > -- > > Best, > > Xin Xie (Jason) > PhD Student > School of Marine and Atmospheric Sciences > Stony Brook University > > > _______________________________________________ > 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 Mon Sep 24 07:18:01 2012
This archive was generated by hypermail 2.1.8 : Wed Oct 31 2012 - 09:14:12 MDT