Search code examples
pythonpython-3.xvimpython-mode

How to launch python-mode on a buffer with vim?


I've just installed python-mode for my Vim, but I can't figure out how to run it on an open buffer, without saving the buffer as a .py file. Only way I can run python-mode seems to be by opening a .py file.


Solution

  • :set filetype=python
    

    This will tell Vim to treat the buffer as if it were a Python file.