Skip to content

pose/vim-python-quickstart

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 

Repository files navigation

#vim-python-quickstart

The idea behind this repo is to provide a basic skeleton or reference of how a vim plugin powered by Python should be structured. It has the right structure for Pathogen, so it should be as easy as cloning this repo in the .vim/bundle/vim-python-quickstart folder.

Invoking the functions defined in the plugin

As I assume that you are using Pathogen you won't need to do anything but call the imported function. To call the hello function of the example just type:

:call hello()

And you will obtain the following message at the bottom of your vim window:

Hello World!

Making changes and trying it again

Edit quickstart.vim and quickstart.py as many times you want. Whenever you want to try the changes just type:

:source path/to/quickstart.vim

In order to save some time and call the function helloafter importing you can do:

:source path/to/quickstart.vim | call hello()

Going beyond

Vim docs are pretty complete, you can find more by doing:

:help python

Pretty easy, heh?

Thanks

The structure was taken from the following project: LycosaExplorer. I recommend that you check it out as an example of a real world python-based vim extension.

Happy Hacking!

About

Example of how to start a Vim plugin (python based)

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors