Commits

Ed Brannin  committed 091ff32

Added a command for wrapping ranges in Confluence tags. Needs a tweak to work with variable argument count.

  • Participants
  • Parent commits 9759f2a

Comments (0)

Files changed (1)

 endfunction
 verbose command! -range=% -nargs=0 Sum <line1>,<line2>call Sum()
 
+" Convert TSV to CSV
+function! JiraWrapFunc(block, param, start, end)
+python <<EOF
+import vim
+b = vim.current.buffer
+block = vim.eval("a:block")
+arg   = vim.eval("a:param")
+start = int(vim.eval("a:start")) - 1
+end   = int(vim.eval("a:end"))
+b.append("{%s}" % (block), end)
+if arg:
+    b.append("{%s:%s}" % (block, arg), start)
+else:
+    b.append("{%s}" % (block), start)
+#r[:] = "%s:%s" % (block, arg)
+EOF
+endfunction
+verbose command! -range=% -nargs=+ JiraWrap call JiraWrapFunc(<f-args>, <line1>, <line2>)