سؤال

I'm doing some plugin programming for cinema 4d in python and decided to man up and start using a real code editor, VIM. followed the instructions on this page:

http://sontek.net/turning-vim-into-a-modern-python-ide

my question is what changes do i have to make to the .vimrc file to get vim to recognize cinema 4d python files, they have a .pyp suffix. I'm sure this is an easy fix, but i'm just starting out on vim and would sure appreciate a leg up here.

هل كانت مفيدة؟

المحلول

Use autocmd to set the filetype when opening an existing or starting a new file. I think this should do it:

autocmd BufRead,BufNewFile *.pyp set filetype=python

See :help autocmd for the full details of how this works.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top