Apache/2.4.7 (Ubuntu) Linux sman1baleendah 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) safemode : OFF MySQL: ON | Perl: ON | cURL: OFF | WGet: ON > / usr / share / vim / vim74 / indent / | server ip : 104.21.89.46 your ip : 108.162.241.113 H O M E |
Filename | /usr/share/vim/vim74/indent/readline.vim |
Size | 681 |
Permission | rw-r--r-- |
Owner | root : root |
Create time | 27-Apr-2025 09:56 |
Last modified | 03-Jan-2014 03:40 |
Last accessed | 06-Jul-2025 01:19 |
Actions | edit | rename | delete | download (gzip) |
View | text | code | image |
" Vim indent file
" Language: readline configuration file
" Maintainer: Nikolai Weibull <[email protected]>
" Latest Revision: 2006-12-20
if exists("b:did_indent")
finish
endif
let b:did_indent = 1
setlocal indentexpr=GetReadlineIndent()
setlocal indentkeys=!^F,o,O,=$else,=$endif
setlocal nosmartindent
if exists("*GetReadlineIndent")
finish
endif
function GetReadlineIndent()
let lnum = prevnonblank(v:lnum - 1)
if lnum == 0
return 0
endif
let ind = indent(lnum)
if getline(lnum) =~ '^\s*$\(if\|else\)\>'
let ind = ind + &sw
endif
if getline(v:lnum) =~ '^\s*$\(else\|endif\)\>'
let ind = ind - &sw
endif
return ind
endfunction
" Language: readline configuration file
" Maintainer: Nikolai Weibull <[email protected]>
" Latest Revision: 2006-12-20
if exists("b:did_indent")
finish
endif
let b:did_indent = 1
setlocal indentexpr=GetReadlineIndent()
setlocal indentkeys=!^F,o,O,=$else,=$endif
setlocal nosmartindent
if exists("*GetReadlineIndent")
finish
endif
function GetReadlineIndent()
let lnum = prevnonblank(v:lnum - 1)
if lnum == 0
return 0
endif
let ind = indent(lnum)
if getline(lnum) =~ '^\s*$\(if\|else\)\>'
let ind = ind + &sw
endif
if getline(v:lnum) =~ '^\s*$\(else\|endif\)\>'
let ind = ind - &sw
endif
return ind
endfunction