diff options
| author | Adam Stankiewicz <sheerun@sher.pl> | 2017-09-28 22:18:09 +0200 | 
|---|---|---|
| committer | Adam Stankiewicz <sheerun@sher.pl> | 2017-09-28 22:18:09 +0200 | 
| commit | 27903c5b8656c796564ef073c1ebe77a2f0154e1 (patch) | |
| tree | 2b0a3a14494d7976fb79a7517706e25d2a95d080 /indent/idlang.vim | |
| parent | d5e38fa97bc50a93a66473d6cd7072fbcbadda57 (diff) | |
| download | vim-polyglot-27903c5b8656c796564ef073c1ebe77a2f0154e1.tar.gz vim-polyglot-27903c5b8656c796564ef073c1ebe77a2f0154e1.zip | |
Revert inlining basic language packv3.0.0
Diffstat (limited to 'indent/idlang.vim')
| -rw-r--r-- | indent/idlang.vim | 66 | 
1 files changed, 0 insertions, 66 deletions
| diff --git a/indent/idlang.vim b/indent/idlang.vim deleted file mode 100644 index 845ad347..00000000 --- a/indent/idlang.vim +++ /dev/null @@ -1,66 +0,0 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'vim') == -1 -   -" IDL (Interactive Data Language) indent file. -" Language: IDL (ft=idlang) -" Last change:	2017 Jun 13 -" Maintainer: Aleksandar Jelenak <ajelenak AT yahoo.com> - -" Only load this indent file when no other was loaded. -if exists("b:did_indent") -   finish -endif -let b:did_indent = 1 - -setlocal indentkeys=o,O,0=endif,0=ENDIF,0=endelse,0=ENDELSE,0=endwhile,0=ENDWHILE,0=endfor,0=ENDFOR,0=endrep,0=ENDREP - -setlocal indentexpr=GetIdlangIndent(v:lnum) - -" Only define the function once. -if exists("*GetIdlangIndent") -   finish -endif - -function GetIdlangIndent(lnum) -   " First non-empty line above the current line. -   let pnum = prevnonblank(v:lnum-1) -   " v:lnum is the first non-empty line -- zero indent. -   if pnum == 0 -      return 0 -   endif -   " Second non-empty line above the current line. -   let pnum2 = prevnonblank(pnum-1) - -   " Current indent. -   let curind = indent(pnum) - -   " Indenting of continued lines. -   if getline(pnum) =~ '\$\s*\(;.*\)\=$' -      if getline(pnum2) !~ '\$\s*\(;.*\)\=$' -	 let curind = curind+shiftwidth() -      endif -   else -      if getline(pnum2) =~ '\$\s*\(;.*\)\=$' -	 let curind = curind-shiftwidth() -      endif -   endif - -   " Indenting blocks of statements. -   if getline(v:lnum) =~? '^\s*\(endif\|endelse\|endwhile\|endfor\|endrep\)\>' -      if getline(pnum) =~? 'begin\>' -      elseif indent(v:lnum) > curind-shiftwidth() -	 let curind = curind-shiftwidth() -      else -	 return -1 -      endif -   elseif getline(pnum) =~? 'begin\>' -      if indent(v:lnum) < curind+shiftwidth() -	 let curind = curind+shiftwidth() -      else -	 return -1 -      endif -   endif -   return curind -endfunction - - -endif | 
