I am attempting to learn more about scripting Vim and writing plugins with python, but I'm having trouble getting started. Although I've read :h python
(first step, read the manual), I had trouble parsing it.
So I thought it would be a good idea to try to understand a very simple python plugin. In this question, a user wants to make a box like
################################################################################
#################################### LOAD ######################################
################################################################################
around words that they type.
How can we do this in vim through python?
Specifically, I would like to write a function MyPythonFunction()
and be able to have the line
some words
with my cursor on that line, perform :call MyPythonFunction()
, and have this function (written as much as possible in python) create the block of hashes with the line of text centered in the middle row.