Sunday, March 16, 2014

calling a function in vimrc before defining it

I wrote a function in my vimrc that builds my statusline (I use it to toggle certain elements). The function call occurs earlier in the file than the actual definition, and I wondered whether that would be a problem, but when I started up MacVim it all worked fine. In terminal Vim however, I get an error on startup (E117: Unknown function: BuildStatusLn), though it still works fine.

Is there a way around this? Is it bad practice? Does anyone know why it's not raising an error in MacVim?

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

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: