mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-29 10:50:06 +08:00
24 lines
663 B
Lua
24 lines
663 B
Lua
|
--=============================================================================
|
|||
|
-- regex.lua --- use vim regex in lua
|
|||
|
-- Copyright (c) 2016-2019 Wang Shidong & Contributors
|
|||
|
-- Author: Wang Shidong < wsdjeg@outlook.com >
|
|||
|
-- URL: https://spacevim.org
|
|||
|
-- License: GPLv3
|
|||
|
--=============================================================================
|
|||
|
|
|||
|
|
|||
|
-- in viml you can use =~/=~#/=~?
|
|||
|
|
|||
|
|
|||
|
local M = {}
|
|||
|
|
|||
|
M.__cmp = require('spacevim.api').import('vim.compatible')
|
|||
|
|
|||
|
function M.equal(a, b, ...)
|
|||
|
local argv = {...}
|
|||
|
local ignore = argv[1] or false
|
|||
|
if M.__cmp.fn.matchstr(a, b) == '' then return false else return true end
|
|||
|
end
|
|||
|
|
|||
|
return M
|