vis

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit a068aa455a751855d1f7e77a42d6d5dcf29c3e1b
parent efb759d350c77888cb8e529b1474a2a377fec6a7
Author: mrgrouse <bdmfegys@duck.com>
Date:   Sun, 12 Jul 2026 22:47:16 -0400

change quoting and simplify code

Diffstat:
Mvisrc.lua | 33++++++++++++++-------------------
1 file changed, 14 insertions(+), 19 deletions(-)

diff --git a/visrc.lua b/visrc.lua @@ -1,34 +1,29 @@ -- initializing vis' lua runtime -require('vis') +require("vis") --- functions to be ran on INIT event vis.events.subscribe(vis.events.INIT, function() + -- functions to be ran on INIT event end) --- functions to be ran in every window +-- functions ran on window opening vis.events.subscribe(vis.events.WIN_OPEN, function(win) - vis:command('set number') - vis:command('set autoindent on') - vis:command('set tabwidth 2') + vis:command("set number") + vis:command("set autoindent on") + vis:command("set tabwidth 2") end) --- vis-plug -- --- this automatically installs vis-plug if it is not found ---local plug = (function() if not pcall(require, 'plugins/vis-plug') then --- os.execute('git clone --quiet https://github.com/erf/vis-plug ' .. --- (os.getenv('XDG_CONFIG_HOME') or os.getenv('HOME') .. '/.config') --- .. '/vis/plugins/vis-plug') ---end return require('plugins/vis-plug') end)() -local plug = require('plugins/vis-plug') +-- initializing plugin manager +local plug = require("plugins/vis-plug") +-- configure plugins in an array of tables with git urls and options local plugins = { - { 'thimc/vis-colorizer' }, - { 'git://repo.or.cz/vis-pairs' }, - { 'e-zk/vis-shebang'}, - { 'Nomarian/vis-remove-trailing-whitespace', alias='rtw' }, + { "thimc/vis-colorizer" }, + { "git://repo.or.cz/vis-pairs" }, + { "e-zk/vis-shebang" }, + { "nomarian/vis-remove-trailing-whitespace", alias = "rtw" }, } --- initialize vis-plug and all of its plugins +-- initialize vis-plug and plugins plug.init(plugins, true) -- initialize remove-trailing-whitespace plugin