On 06/09/2010 02:52 PM, Pablo Giménez wrote:
> Thanks, I know about this solution.
> But the problem is that I need it to be dynamic, so filetype selection
> should be when the file is loaded


Then something like this (untested):

fun! SetHom()
    if (search("import hou") != 0)
        :set ft=pythonhom
    endif

:au BufRead,BufEnter *.py :call SetHom()<CR>

But then switching to .py files may be sluggish. Maybe best to go to
first line and then do this search since import will be on top.

-ak

-- 
python plugins for vim: http://lightbird.net/pysuite/


-- 
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Reply via email to