Answers for "lua run vimscript"

Lua
1

lua run vimscript

-- Basic syntax:
-- Evaluate a Vimscript expression string and returns its value:
vim.api.nvim_eval()
-- Evaluate a chunk of Vimscript code:
vim.api.nvim_exec() -- use the vim.cmd() alias for this function
-- Execute an ex command:
vim.api.nvim_command()

-- Example usage:
vim.cmd([[
set relativenumber
set tabstop=4
vnoremap <leader>p "_dP
nnoremap <leader>y "+y
vnoremap <leader>y "+y
nnoremap <leader>Y gg"+yG
]])
Posted by: Guest on July-21-2021

Browse Popular Code Answers by Language