Search notes:

nvim

Lua script

An arbitrary vim command can be executed with
vim.cmd('echo 17+25')
vim.fn can be used to call vim functions:
vim.print( vim.fn.printf('x = %d', 42) )
I believe the following Lua expression performs the same as the vim :inoremap jj <esc>:w<cr> (but comare with vim.keymap.set(…)).
vim.api.nvim_set_keymap('i', 'jj', '<esc>:w<cr>', {noremap=true})

Variables

Variables can be accessed like so:
vim.g Global variables
vim.b Current buffer
vim.w Current window
vim.t Current tab-page
vim.v Predefined vim variable
vim.env Environment variable

Options

Like
vim.opt :set
vim.opt_global :setglobal
vim.opt_local :setlocal
Multiple («map like») values can be assigned like so
vim.opt.wildignore    = { '*.o', '*.a', '__pycache__' }
vim.opt.listchars     = { space = '_', tab = '>~' }
vim.opt.formatoptions = { n = true, j = true, t = true }
TODO: Compare vim.print(vim.o.smarttab) and vim.print(vim.opt.smarttab).

TODO

ctrl-q starts visual block selection. Thus ctrl-v can still be used for pasting text.
vim.api.nvim_create_autocmd()
nvim_create_autocmd

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...', 1759612253, '216.73.216.149', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/editors/nvim/index(89): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78