diff options
author | Bram Moolenaar <Bram@vim.org> | 2012-01-20 21:08:56 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2012-01-20 21:08:56 +0100 |
commit | 6be7f8733f34333ed75f6e39425d73a6b2644379 (patch) | |
tree | 59ae0f289e6bfaaf3ed2e8ac5dcedb69e5656c01 /runtime/indent/java.vim | |
parent | 90b280059fd51790105ff2e433303be58d58c430 (diff) | |
download | vim-6be7f8733f34333ed75f6e39425d73a6b2644379.zip |
Update runtime files.
Diffstat (limited to 'runtime/indent/java.vim')
-rw-r--r-- | runtime/indent/java.vim | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/runtime/indent/java.vim b/runtime/indent/java.vim index facbdbf57..3c48d3e35 100644 --- a/runtime/indent/java.vim +++ b/runtime/indent/java.vim @@ -1,7 +1,12 @@ " Vim indent file " Language: Java -" Maintainer: Toby Allsopp <toby.allsopp@peace.com> (resigned) -" Last Change: 2005 Mar 28 +" Previous Maintainer: Toby Allsopp <toby.allsopp@peace.com> +" Current Maintainer: Hong Xu <xuhdev@gmail.com> +" Last Change: 2012 Jan 20 +" Version: 1.0 +" License: Same as Vim. +" Copyright (c) 2012 Hong Xu +" Before 2012, this file is maintained by Toby Allsopp. " Only load this indent file when no other was loaded. if exists("b:did_indent") @@ -60,6 +65,13 @@ function GetJavaIndent() " find start of previous line, in case it was a continuation line let lnum = SkipJavaBlanksAndComments(v:lnum - 1) + + " If the previous line starts with '@', we should have the same indent as + " the previous one + if getline(lnum) =~ '^\s*@\S\+\s*$' + return indent(lnum) + endif + let prev = lnum while prev > 1 let next_prev = SkipJavaBlanksAndComments(prev - 1) |