Wednesday, December 7, 2011

how do I get debug output from vim script?

Hi guys,

I am new on vim script coding. Today I read usr_43.txt, and tried to make a script to detect the source code with suffix sql3. I did like this,

vim ~/.vim/ftplugin/sqlte3.vim

if exists("b:did_ftplugin")
    echo "yes : did_ftpplugin"
    finish
elseif
    echo "no : did_ftplugin"
endif

let b:did_ftplugin = 1

if did_filetype()
    echo "yes : did_filetype"
    finish
elseif
    echo "no : do file type"
endif

And then I edit ~/.vim/ftdetect/sql3.vim, the content is the following,

au BufRead,BufNewFile *.sql3 set filetype=sql3

Now I wanna test it work or not. I vim test.sql3, but I get nothing output from vim status bar.
I would like to know how do I know my function is working?

--
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

No comments: