diff options
Diffstat (limited to 'plugins/titleize.lua')
-rw-r--r-- | plugins/titleize.lua | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/plugins/titleize.lua b/plugins/titleize.lua new file mode 100644 index 0000000..2e4b52a --- /dev/null +++ b/plugins/titleize.lua @@ -0,0 +1,11 @@ +local core = require "core" +local command = require "core.command" + +command.add("core.docview", { + ["titleize:titleize"] = function() + core.active_view.doc:replace(function(text) + return text:gsub("%f[%w](%w)", string.upper) + end) + end, +}) + |