Search notes:

Vim: variables

Data types

A variable has a data type which is one of
See also type()

TODO

A special (environment) variable is VIMINIT (and EXINIT?): it/they(?) influences which vimrc / initialization file is read at startup (source_startup_scripts()).

Global (g:) variables

Global variables might be stored in the viminfo file.

g:filetype_*

It seems that the g:filetype_* variables are used in runtime/autoload/dist/ft.vim.
For example, g:filetype_sql can be set define a filetype to be used for *.sql files. This variable is used in the mentioned ft.vim file like so:
func dist#ft#SQL()
  if exists("g:filetype_sql")
    exe "setf " . g:filetype_sql
  else
    setf sql
  endif
endfunc
dist#ft#SQL is called by an autocommand that is defined in $VIMRUNTIME/filetype.vim:
au BufNewFile,BufRead *.sql                   call dist#ft#SQL()

v: variables

set_vim_var_string (eval.c)
v: variables are identified with the VV_ macros (vim.h).
v:lang and v:lc_time are set according to the current locale settings (set_lang_var in ex_cmds2.c).

Three special $ variables

$HOME, $VIM and $VIMRUNTIME are treated specially, see vim_getenv() in src/misc1.c.
Apparently, the $VIMRUNTIME must not end in a backslash (on Windows).

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...', 1758190711, '216.73.216.150', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/vim/script/vimscript/variables/index(95): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78