From 676f04945010aeb2ae71325bf2d1d6f336a5e162 Mon Sep 17 00:00:00 2001 From: rxi Date: Thu, 23 Apr 2020 20:49:37 +0100 Subject: Moved all plugins to `plugins` dir --- plugins/titleize.lua | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 plugins/titleize.lua (limited to 'plugins/titleize.lua') 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, +}) + -- cgit v1.2.3