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.
marked as duplicate, since more people voted on that. But I thinkunclear what you're askingwould be better (I voted for that option)... You could make the question better, and ask for re-open! – Martin Tournoij Feb 06 '15 at 13:02