]> gitweb.fluxo.info Git - rhatto/dotfiles/luakit.git/commitdiff
Adds tabmove command
authorSilvio Rhatto <rhatto@riseup.net>
Tue, 26 Sep 2017 17:28:43 +0000 (14:28 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Tue, 26 Sep 2017 17:28:43 +0000 (14:28 -0300)
config.dot/luakit.link/keys.lua

index 0e858ad71278c08df568c5d71a2a922b004fcab9..d5cb352961ef21d3288d2bf4a8868e780a3c7ee4 100644 (file)
@@ -6,6 +6,16 @@
 local modes  = require "modes"
 local window = require "window"
 
+-- Commands
+modes.add_cmds({
+  { ":tabmove, :tabm, :tm", "Move tab to a position", function (w, m)
+    -- Start from zero to follow VIM standards
+    if m.arg ~= nil then
+      w.tabs:reorder(w.view, m.arg + 1)
+    end
+  end},
+})
+
 -- Remove some default bindings
 modes.remove_binds("normal", { "y" })