Mercurial > vim
view runtime/indent/chatito.vim @ 31690:52232e3ff22f v9.0.1177
patch 9.0.1177: AppVeyor uses some older tools
Commit: https://github.com/vim/vim/commit/ad15a39fdbde5ef8d4af9e0fca7e7e53b4843270
Author: Christopher Plewright <chris@createng.com>
Date: Wed Jan 11 12:49:22 2023 +0000
patch 9.0.1177: AppVeyor uses some older tools
Problem: AppVeyor uses some older tools.
Solution: Switch to Visual Studio 2022 and Python 3.11. (Christopher
Plewright, closes #11793)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 11 Jan 2023 14:00:06 +0100 |
parents | 1e91e26ceebf |
children |
line wrap: on
line source
" Vim indent file " Language: Chatito " Maintainer: ObserverOfTime <chronobserver@disroot.org> " Last Change: 2022 Sep 20 if exists('b:did_indent') finish endif let b:did_indent = 1 setlocal indentexpr=GetChatitoIndent() setlocal indentkeys=o,O,*<Return>,0#,!^F let b:undo_indent = 'setl inde< indk<' if exists('*GetChatitoIndent') finish endif function GetChatitoIndent() let l:prev = v:lnum - 1 if getline(prevnonblank(l:prev)) =~# '^[~%@]\[' " shift indent after definitions return shiftwidth() elseif getline(l:prev) !~# '^\s*$' " maintain indent in sentences return indent(l:prev) else " reset indent after a blank line return 0 end endfunction