diff --git a/plugin/hflip.lua b/plugin/hflip.lua new file mode 100644 index 0000000..54c4501 --- /dev/null +++ b/plugin/hflip.lua @@ -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 diff --git a/plugin/hflip.vim b/plugin/hflip.vim deleted file mode 100644 index 351c4c9..0000000 --- a/plugin/hflip.vim +++ /dev/null @@ -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