<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>osyo-manga</author_name>
  <author_url>https://blog.hatena.ne.jp/osyo-manga/</author_url>
  <blog_title>C++でゲームプログラミング</blog_title>
  <blog_url>https://osyo-manga.hatenadiary.org/</blog_url>
  <categories>
    <anon>vim</anon>
    <anon>VimScript</anon>
  </categories>
  <description>言われてみればそのとおりなんですが、ちょっとはまったので覚書。 Vim script では、ある変数や関数などが定義されているかを判定するために exists({expr}) という組み込み関数を使用します。 使い方は簡単で引数に定義されている変数名や関数名などを渡します let has_xxx = exists(&quot;g:xxx&quot;) let has_func_xxx = exists(&quot;*g:func_xxx&quot;) さて、先日 webapi-vim のネームスペースが変更された時に最初は exists を使用して下記のように切り替える事を考えていました。 function! s:http_get(…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fosyo-manga.hatenadiary.org%2Fentry%2F20120412%2F1334158849&quot; title=&quot;Vim script の exists で autoload の関数は判定してはいけない - C++でゲームプログラミング&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2012-04-12 00:40:49</published>
  <title>Vim script の exists で autoload の関数は判定してはいけない</title>
  <type>rich</type>
  <url>https://osyo-manga.hatenadiary.org/entry/20120412/1334158849</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
