title: Why my function in .vimrc got called automatically?
body: <p>As I know, we could define function in .vimrc as below:</p>
  
  <pre><code>function Fun()
      do something here
  endfunction
  </code></pre>
  
  <p>Then we could call it like <code>:call Fun()</code>.</p>
  
  <p>For one of my system, <strong>there's only the function definition in my .vimrc, however the function is always exectued once I get into vim. Why?</strong></p>
  
  <p>Below is version of my vim:</p>
  
  <pre><code># vi --version
  VIM - Vi IMproved 7.2 (2008 Aug 9, compiled Feb 17 2012 10:24:10)
  Included patches: 1-411
  Modified by &lt;bugzilla@redhat.com&gt;
  Compiled by &lt;bugzilla@redhat.com&gt;
  Small version without GUI.  Features included (+) or not (-):
  -arabic -autocmd -balloon_eval -browse +builtin_terms -byte_offset -cindent 
  -clientserver -clipboard -cmdline_compl +cmdline_hist -cmdline_info -comments 
  -cryptv -cscope -cursorshape -dialog -diff -digraphs -dnd -ebcdic -emacs_tags 
  -eval -ex_extra -extra_search -farsi -file_in_path -find_in_path -float 
  -folding -footer +fork() -gettext -hangul_input +iconv -insert_expand +jumplist
   -keymap -langmap -libcall -linebreak -lispindent -listcmds -localmap -menu 
  -mksession -modify_fname -mouse -mouse_dec -mouse_gpm -mouse_jsbterm 
  -mouse_netterm -mouse_sysmouse -mouse_xterm +multi_byte -multi_lang -mzscheme 
  -netbeans_intg -osfiletype -path_extra -perl -printer -profile -python 
  -quickfix -reltime -rightleft -ruby -scrollbind -signs -smartindent -sniff 
  -startuptime -statusline -sun_workshop -syntax -tag_binary -tag_old_static 
  -tag_any_white -tcl +terminfo -termresponse -textobjects -title -toolbar 
  -user_commands -vertsplit -virtualedit +visual -visualextra -viminfo -vreplace 
  +wildignore -wildmenu +windows +writebackup -X11 -xfontset -xim -xsmp 
  -xterm_clipboard -xterm_save 
     system vimrc file: "/etc/virc"
       user vimrc file: "$HOME/.vimrc"
        user exrc file: "$HOME/.exrc"
    fall-back for $VIM: "/usr/share/vim"
  Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H     -O2 -g -pipe -Wall  -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64  -D_FORTIFY_SOURCE=1        
  Linking: gcc   -L/usr/local/lib -o vim       -lm  -lselinux -lncurses -lacl 
  </code></pre>
  
  <p>And my .vimrc:</p>
  
  <pre><code># cat ~/.vimrc
  function Fun1()
          :!ls
  endfunction
  </code></pre>
  
  <p>Function name doesn't matter, I've changed the name as a test.</p>
  
  <p><strong>Update on July 8, 2015:</strong></p>
  
  <p>According to the answer from Ben, and since I'd like my .vimrc be compatible over multiple environments, I wrap the function definition with <code>if has('eval')...endif</code> as my finial solution:</p>
  
  <pre><code>if has('eval')
      function! Fun1()
          do something
      endfunction
  endif
  </code></pre>