1

Switch to lua

This commit is contained in:
Alex Yatskov 2022-10-21 20:13:40 -07:00
parent 7e6d996a9d
commit 1f280d9a52
2 changed files with 5 additions and 13 deletions

5
plugin/hflip.lua Normal file
View File

@ -0,0 +1,5 @@
if not vim.g.hflip then
local hflip = require('hflip')
vim.api.nvim_create_user_command('HFlip', hflip.hflip, {})
vim.g.hflip = true
end

View File

@ -1,13 +0,0 @@
" in plugin/hflip.vim
if exists('g:loaded_hflip') | finish | endif " prevent loading file twice
let s:save_cpo = &cpo " save user coptions
set cpo&vim " reset them to defaults
" command to run our plugin
command! HFlip lua require'hflip'.hflip()
let &cpo = s:save_cpo " and restore after
unlet s:save_cpo
let g:loaded_hflip = 1