Search notes:

$VIMRUNTIME/indent

indent/ contains Vim scripts that assist the editor of a given file type with indenting the file.

Rules for an indent file

" Only load this indent file when no other was loaded yet.

if exists("b:did_indent")
   finish
endif

let b:did_indent = 1
To trigger the indenting after typing a key word like endif, add the word to the cinkeys option with +=.
You normally set indentexpr to evaluate a function and then define that function.
That function only needs to be defined once for as long as Vim is running. Add a test if the function exists and use ":finish", like this:
if exists("*GetMyIndent")
   finish
endif
To test the indent file, see testdir/README.txt.

See also

Indenting text
$VIMRUNTIME/indent.vim
$VIMRUNTIME/indent/sqlanywhere.vim

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1759414580, '216.73.216.42', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/vim/runtime/indent/index(67): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78