Skip to content
Browse files

updating stuff

  • Loading branch information...
1 parent c695ccf commit 16c58990a9ca98a2e522b13108f4378fbda9c1de Tammer Saleh committed Feb 17, 2013
Showing with 19,853 additions and 0 deletions.
  1. +57 −0 vim/bundle/YouCompleteMe/.gitignore
  2. +674 −0 vim/bundle/YouCompleteMe/COPYING.txt
  3. +878 −0 vim/bundle/YouCompleteMe/README.md
  4. +547 −0 vim/bundle/YouCompleteMe/autoload/youcompleteme.vim
  5. +119 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/CMakeLists.txt
  6. +31 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/algorithm/string.hpp
  7. +176 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/algorithm/string/case_conv.hpp
  8. +312 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/algorithm/string/classification.hpp
  9. +199 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/algorithm/string/compare.hpp
  10. +83 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/algorithm/string/concept.hpp
  11. +28 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/algorithm/string/config.hpp
  12. +36 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/algorithm/string/constants.hpp
  13. +123 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/algorithm/string/detail/case_conv.hpp
  14. +353 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/algorithm/string/detail/classification.hpp
  15. +204 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/algorithm/string/detail/find_format.hpp
  16. +273 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/algorithm/string/detail/find_format_all.hpp
  17. +89 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/algorithm/string/detail/find_format_store.hpp
  18. +87 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/algorithm/string/detail/find_iterator.hpp
  19. +646 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/algorithm/string/detail/finder.hpp
  20. +122 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/algorithm/string/detail/finder_regex.hpp
  21. +119 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/algorithm/string/detail/formatter.hpp
  22. +61 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/algorithm/string/detail/formatter_regex.hpp
  23. +77 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/algorithm/string/detail/predicate.hpp
  24. +159 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/algorithm/string/detail/replace_storage.hpp
  25. +200 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/algorithm/string/detail/sequence.hpp
  26. +95 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/algorithm/string/detail/trim.hpp
  27. +106 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/algorithm/string/detail/util.hpp
  28. +844 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/algorithm/string/erase.hpp
  29. +334 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/algorithm/string/find.hpp
  30. +287 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/algorithm/string/find_format.hpp
  31. +386 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/algorithm/string/find_iterator.hpp
  32. +270 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/algorithm/string/finder.hpp
  33. +120 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/algorithm/string/formatter.hpp
  34. +193 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/algorithm/string/iter_find.hpp
  35. +145 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/algorithm/string/join.hpp
  36. +475 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/algorithm/string/predicate.hpp
  37. +42 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/algorithm/string/predicate_facade.hpp
  38. +646 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/algorithm/string/regex.hpp
  39. +90 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/algorithm/string/regex_find_format.hpp
  40. +928 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/algorithm/string/replace.hpp
  41. +193 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/algorithm/string/sequence_traits.hpp
  42. +163 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/algorithm/string/split.hpp
  43. +85 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/algorithm/string/std/list_traits.hpp
  44. +85 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/algorithm/string/std/slist_traits.hpp
  45. +52 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/algorithm/string/std/string_traits.hpp
  46. +26 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/algorithm/string/std_containers_traits.hpp
  47. +398 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/algorithm/string/trim.hpp
  48. +33 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/algorithm/string/yes_no_type.hpp
  49. +23 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/algorithm/string_regex.hpp
  50. +181 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/aligned_storage.hpp
  51. +55 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/archive/add_facet.hpp
  52. +99 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/archive/archive_exception.hpp
  53. +301 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/archive/basic_archive.hpp
  54. +222 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/archive/basic_binary_iarchive.hpp
  55. +190 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/archive/basic_binary_iprimitive.hpp
  56. +180 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/archive/basic_binary_oarchive.hpp
  57. +184 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/archive/basic_binary_oprimitive.hpp
  58. +73 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/archive/basic_streambuf_locale_saver.hpp
  59. +91 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/archive/basic_text_iarchive.hpp
  60. +144 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/archive/basic_text_iprimitive.hpp
  61. +116 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/archive/basic_text_oarchive.hpp
  62. +173 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/archive/basic_text_oprimitive.hpp
  63. +67 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/archive/basic_xml_archive.hpp
  64. +127 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/archive/basic_xml_iarchive.hpp
  65. +145 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/archive/basic_xml_oarchive.hpp
  66. +103 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/archive/binary_iarchive.hpp
  67. +96 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/archive/binary_iarchive_impl.hpp
  68. +66 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/archive/binary_oarchive.hpp
  69. +97 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/archive/binary_oarchive_impl.hpp
  70. +93 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/archive/binary_wiarchive.hpp
  71. +61 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/archive/binary_woarchive.hpp
  72. +100 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/archive/codecvt_null.hpp
  73. +20 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/archive/detail/abi_prefix.hpp
  74. +19 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/archive/detail/abi_suffix.hpp
  75. +55 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/archive/detail/archive_serializer_map.hpp
  76. +48 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/archive/detail/auto_link_archive.hpp
  77. +47 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/archive/detail/auto_link_warchive.hpp
  78. +110 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/archive/detail/basic_iarchive.hpp
  79. +95 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/archive/detail/basic_iserializer.hpp
  80. +106 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/archive/detail/basic_oarchive.hpp
  81. +93 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/archive/detail/basic_oserializer.hpp
  82. +73 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/archive/detail/basic_pointer_iserializer.hpp
  83. +72 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/archive/detail/basic_pointer_oserializer.hpp
  84. +79 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/archive/detail/basic_serializer.hpp
  85. +69 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/archive/detail/basic_serializer_map.hpp
  86. +169 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/archive/detail/check.hpp
  87. +88 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/archive/detail/common_iarchive.hpp
  88. +87 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/archive/detail/common_oarchive.hpp
  89. +79 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/archive/detail/decl.hpp
  90. +77 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/archive/detail/interface_iarchive.hpp
  91. +84 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/archive/detail/interface_oarchive.hpp
  92. +632 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/archive/detail/iserializer.hpp
  93. +531 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/archive/detail/oserializer.hpp
  94. +91 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/archive/detail/register_archive.hpp
  95. +21 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/archive/detail/utf8_codecvt_facet.hpp
  96. +224 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/archive/dinkumware.hpp
  97. +71 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/archive/impl/archive_serializer_map.ipp
  98. +129 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/archive/impl/basic_binary_iarchive.ipp
  99. +209 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/archive/impl/basic_binary_iprimitive.ipp
  100. +46 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/archive/impl/basic_binary_oarchive.ipp
  101. +160 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/archive/impl/basic_binary_oprimitive.ipp
  102. +79 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/archive/impl/basic_text_iarchive.ipp
  103. +152 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/archive/impl/basic_text_iprimitive.ipp
  104. +62 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/archive/impl/basic_text_oarchive.ipp
  105. +114 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/archive/impl/basic_text_oprimitive.ipp
  106. +178 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/archive/impl/basic_xml_grammar.hpp
  107. +114 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/archive/impl/basic_xml_iarchive.ipp
  108. +275 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/archive/impl/basic_xml_oarchive.ipp
  109. +128 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/archive/impl/text_iarchive_impl.ipp
  110. +124 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/archive/impl/text_oarchive_impl.ipp
  111. +118 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/archive/impl/text_wiarchive_impl.ipp
  112. +85 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/archive/impl/text_woarchive_impl.ipp
  113. +204 −0 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/archive/impl/xml_iarchive_impl.ipp
Sorry, we could not display the entire diff because too many files (3,248) changed.
View
57 vim/bundle/YouCompleteMe/.gitignore
@@ -0,0 +1,57 @@
+# Compiled Object files
+*.slo
+*.lo
+*.o
+
+# Compiled Dynamic libraries
+*.so
+*.dylib
+
+# Compiled Static libraries
+*.lai
+*.la
+*.a
+
+# CMake
+CMakeCache.txt
+CMakeFiles
+Makefile
+cmake_install.cmake
+install_manifest.txt
+
+# Python
+*.py[cod]
+
+# Installer logs
+pip-log.txt
+
+# Unit test / coverage reports
+.coverage
+.tox
+nosetests.xml
+
+#Translations
+*.mo
+
+#Mr Developer
+.mr.developer.cfg
+
+# custom
+ycm_core_tests
+
+# When we use the bcp tool to copy over the parts of boost we care about, it
+# also copies some cruft files we don't need; this ignores them
+cpp/BoostParts/libs/*/build
+cpp/BoostParts/libs/*/test
+
+# These folders in cpp/llvm contain lots of upstream cruft we don't care
+# about and would rather not have in our tree...
+cpp/llvm/docs/*
+cpp/llvm/tools/clang/www/*
+
+# ... but excluding these LLVMBuild.txt files breaks the build so we need to
+# explicitely include them
+!LLVMBuild.txt
+
+# Exclude auto generated vim doc tags.
+doc/tags
View
674 vim/bundle/YouCompleteMe/COPYING.txt
@@ -0,0 +1,674 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they
+know their rights.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Use with the GNU Affero General Public License.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+ <program> Copyright (C) <year> <name of author>
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+<http://www.gnu.org/licenses/>.
+
+ The GNU General Public License does not permit incorporating your program
+into proprietary programs. If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License. But first, please read
+<http://www.gnu.org/philosophy/why-not-lgpl.html>.
View
878 vim/bundle/YouCompleteMe/README.md
@@ -0,0 +1,878 @@
+YouCompleteMe: a code-completion engine for Vim
+===============================================
+
+YouCompleteMe is a fast, as-you-type, fuzzy-search code completion engine for
+[Vim][]. It has several completion engines: an identifier-based engine that
+works with every programming language, a semantic, [Clang][]-based engine that
+provides native semantic code completion for C/C++/Objective-C/Objective-C++
+(from now on referred to as "the C-family languages") and an omnifunc-based
+completer that uses data from Vim's omnicomplete system to provide semantic
+completions for many other languages (Python, Ruby, PHP etc.).
+
+![YouCompleteMe GIF demo](http://i.imgur.com/0OP4ood.gif)
+
+Here's an explanation of what happens in the short GIF demo above.
+
+First, realize that **no keyboard shortcuts had to be pressed** to get the list
+of completion candidates at any point in the demo. The user just types and the
+suggestions pop up by themselves. If the user doesn't find the completion
+suggestions relevant and/or just wants to type, he can do so; the completion
+engine will not interfere.
+
+When the user sees a useful completion string being offered, he presses the TAB
+key to accept it. This inserts the completion string. Repeated presses of the
+TAB key cycle through the offered completions.
+
+If the offered completions are not relevant enough, the user can continue typing
+to further filter out unwanted completions.
+
+A critical thing to notice is that the completion **filtering is NOT based on
+the input being a string prefix of the completion** (but that works too). The
+input needs to be a _[subsequence][] match_ of a completion. This is a fancy way
+of saying that any input characters need to be present in a completion string in
+the order in which they appear in the input. So `abc` is a subsequence of
+`xaybgc`, but not of `xbyxaxxc`. After the filter, a complicated sorting system
+ranks the completion strings so that the most relevant ones rise to the top of
+the menu (so you usually need to press TAB just once).
+
+**All of the above works with any programming language** because of the
+identifier-based completion engine. It collects all of the identifiers in the
+current file and other files you visit and searches them when you type
+(identifiers are put into per-filetype groups).
+
+The demo also shows the semantic engine in use. When the user presses `.`, `->`
+or `::` while typing in insert mode, the semantic engine is triggered (it can
+also be triggered with a keyboard shortcut; see the rest of the docs).
+
+The last thing that you can see in the demo is YCM's integration with
+[Syntastic][] (the little red X that shows up in the left gutter) if you are
+editing a C-family file. As Clang compiles your file and detects warnings or
+errors, they will be piped to Syntastic for display. You don't need to save your
+file or press any keyboard shortcut to trigger this, it "just happens" in the
+background.
+
+In essence, YCM obsoletes the following Vim plugins because it has all of their
+features plus extra:
+
+- clang_complete
+- AutoComplPop
+- Supertab
+- neocomplcache
+
+Mac OS X super-quick installation
+---------------------------------
+
+Please refer to the full Installation Guide below; the following commands are
+provided on a best-effort basis and may not work for you.
+
+Install the latest version of [MacVim][]. Yes, MacVim. And yes, the _latest_.
+
+If you don't use the MacVim GUI, it is recommended to use the Vim binary that is
+inside the MacVim.app package (`MacVim.app/Contents/MacOS/Vim`). To ensure it
+works correctly copy the `mvim` script from the [MacVim][] download to your
+local binary folder (for example `/usr/local/bin/mvim`) and then symlink it:
+
+ ln -s /usr/local/bin/mvim vim
+
+Install YouCompleteMe with [Vundle][].
+
+**Remember:** YCM is a plugin with a compiled component. If you **update** YCM
+using Vundle and the ycm_core library API has changed (happens rarely), YCM will
+notify you to recompile it. You should then rerun the install process.
+
+It's recommended that you have the latest Xcode installed along with the latest
+Command Line Tools (that you install from within Xcode).
+
+Install CMake. Preferably with [Homebrew][brew], but here's the [stand-alone
+CMake installer][cmake-download].
+
+_If_ you have installed a Homebrew Python and/or Homebrew MacVim, see the FAQ
+for details.
+
+Compiling YCM **with** semantic support for C-family languages:
+
+ cd ~/.vim/bundle/YouCompleteMe
+ ./install.sh --clang-completer
+
+Compiling YCM **without** semantic support for C-family languages:
+
+ cd ~/.vim/bundle/YouCompleteMe
+ ./install.sh
+
+That's it. You're done. Refer to the User Guide section on how to use YCM. Don't
+forget that if you want the C-family semantic completion engine to work, you
+will need to provide the compilation flags for your project to YCM. It's all in
+the User Guide.
+
+YCM comes with sane defaults for its options, but you still may want to take a
+look at what's available for configuration. There are a few interesting options
+that are conservatively turned off by default that you may want to turn on.
+
+Ubuntu Linux x64 super-quick installation
+-----------------------------------------
+
+Please refer to the full Installation Guide below; the following commands are
+provided on a best-effort basis and may not work for you.
+
+Make sure you have Vim 7.3.584 with python2 support. At the time of writing, the
+version of Vim shipping with Ubuntu is too old. You may need to [compile Vim
+from source][vim-build] (don't worry, it's easy).
+
+Install YouCompleteMe with [Vundle][].
+
+**Remember:** YCM is a plugin with a compiled component. If you **update** YCM
+using Vundle and the ycm_core library API has changed (happens rarely), YCM will
+notify you to recompile it. You should then rerun the install process.
+
+Install CMake. `sudo apt-get install cmake`
+
+Make sure you have Python headers installed: `sudo apt-get install python-dev`.
+
+Compiling YCM **with** semantic support for C-family languages:
+
+ cd ~/.vim/bundle/YouCompleteMe
+ ./install.sh --clang-completer
+
+Compiling YCM **without** semantic support for C-family languages:
+
+ cd ~/.vim/bundle/YouCompleteMe
+ ./install.sh
+
+That's it. You're done. Refer to the User Guide section on how to use YCM. Don't
+forget that if you want the C-family semantic completion engine to work, you
+will need to provide the compilation flags for your project to YCM. It's all in
+the User Guide.
+
+YCM comes with sane defaults for its options, but you still may want to take a
+look at what's available for configuration. There are a few interesting options
+that are conservatively turned off by default that you may want to turn on.
+
+
+Full Installation Guide
+-----------------------
+
+These are the steps necessary to get YCM working on a Unix OS like Linux or
+Mac OS X. My apologies to Windows users, but I don't have a guide for them. The
+code is platform agnostic, so if everything is configured correctly, YCM
+_should_ work on Windows without issues (but as of writing, it's untested on
+that platform).
+
+See the FAQ if you have any issues.
+
+**Remember:** YCM is a plugin with a compiled component. If you **update** YCM
+using Vundle and the ycm_core library API has changed (happens rarely), YCM will
+notify you to recompile it. You should then rerun the install process.
+
+**Please follow the instructions carefully. Read EVERY WORD.**
+
+1. **Ensure that your version of Vim is _at least_ 7.3.584 _and_ that it has
+ support for python2 scripting**.
+
+ Inside Vim, type `:version`. Look at the first two to three lines of output;
+ it should say `Vi IMproved 7.3` and then below that, `Included patches:
+ 1-X`, where X will be some number. That number needs to be 584 or higher.
+
+ If your version of Vim is not recent enough, you may need to [compile Vim
+ from source][vim-build] (don't worry, it's easy).
+
+ After you have made sure that you have Vim 7.3.584+, type the following in
+ Vim: `:echo has('python')`. The output should be 1. If it's 0, then get a
+ version of Vim with Python support.
+
+2. **Install YCM** with [Vundle][] (or [Pathogen][], but Vundle is a better
+ idea). With Vundle, this would mean adding a `Bundle
+ 'Valloric/YouCompleteMe'` line to your [vimrc][].
+
+3. [Complete this step ONLY if you care about semantic completion support for
+ C-family languages. Otherwise it's not neccessary.]
+
+ **Download the latest version of `libclang`**. Clang is an open-source
+ compiler that can compile C/C++/Objective-C/Objective-C++. The `libclang`
+ library it provides is used to power the YCM semantic completion engine for
+ those languages. YCM needs libclang version 3.2 or higher.
+
+ You can use the system libclang _only if you are sure it is version 3.2 or
+ higher_, otherwise don't. Even if it is, I recommend using the [official
+ binaries from llvm.org][clang-download] if at all possible. Make sure you
+ download the correct archive file for your OS.
+
+4. **Compile the `ycm_core` plugin plugin** (ha!) that YCM needs. This is the
+ C++ engine that YCM uses to get fast completions.
+
+ You will need to have `cmake` installed in order to generate the required
+ makefiles. Linux users can install cmake with their package manager (`sudo
+ apt-get install cmake` for Ubuntu) whereas other users can [download and
+ install][cmake-download] cmake from its project site. Mac users can also get
+ it through [Homebrew][brew] with `brew install cmake`.
+
+ You also need to make sure you have Python headers installed. On a
+ Debian-like Linux distro, this would be `sudo apt-get install python-dev`.
+ On Mac they should already be present.
+
+ Here we'll assume you installed YCM with Vundle. That means that the
+ top-level YCM directory is in `~/.vim/bundle/YouCompleteMe`.
+
+ We'll create a new folder where build files will be placed. Run the
+ following:
+
+ cd ~
+ mkdir ycm_build
+ cd ycm_build
+
+ Now we need to generate the makefiles. If you DON'T care about semantic
+ support for C-family languages, run the following command in the `ycm_build`
+ directory: `cmake -G "Unix Makefiles" . ~/.vim/bundle/YouCompleteMe/cpp`
+
+ If you DO care about semantic support for C-family languages, then your
+ `cmake` call will be a bit more complicated. We'll assume you downloaded a
+ binary distribution of LLVM+Clang from llvm.org in step 3 and that you
+ extracted the archive file to folder `~/ycm_temp/llvm_root_dir` (with `bin`,
+ `lib`, `include` etc. folders right inside that folder). With that in mind,
+ run the following command in the `ycm_build` directory: `cmake -G "Unix Makefiles" -DPATH_TO_LLVM_ROOT=~/ycm_temp/llvm_root_dir . ~/.vim/bundle/YouCompleteMe/cpp`
+
+ Now that makefiles have been generated, simply run `make ycm_core`.
+
+ For those who want to use the system version of libclang, you would pass
+ `-DUSE_SYSTEM_LIBCLANG=ON` to cmake _instead of_ the
+ `-DPATH_TO_LLVM_ROOT=...` flag.
+
+ You could also force the use of a custom libclang library with
+ `-DEXTERNAL_LIBCLANG_PATH=/path/to/libclang.so` flag (the library would end
+ with `.dylib` on a Mac). Again, this flag would be used _instead of_ the
+ other flags.
+
+5. [Complete this step ONLY if you care about semantic completion support for
+ C-family languages. Otherwise it's not neccessary.]
+
+ **Copy the libclang library file into the `YouCompleteMe/python` folder.**
+ The library file is `libclang.so` on Linux and `libclang.dylib` on Mac.
+
+ We'll assume you downloaded a binary distribution of LLVM+Clang from
+ llvm.org in step 3 and that you extracted the archive file to folder
+ `~/ycm_temp/llvm_root_dir` (with `bin`, `lib`, `include` etc. folders right
+ inside that folder).
+
+ We'll also assume you installed YCM with Vundle. That means that the
+ top-level YCM directory is in `~/.vim/bundle/YouCompleteMe`.
+
+ On Linux, run: `cp ~/ycm_temp/llvm_root_dir/lib/libclang.so ~/.vim/bundle/YouCompleteMe/python`
+
+ On Mac, run: `cp ~/ycm_temp/llvm_root_dir/lib/libclang.dylib ~/.vim/bundle/YouCompleteMe/python`
+
+ **DO NOT FORGET THIS STEP**. If you forget to copy over `libclang.so`
+ version 3.2 into the `YouCompleteMe/python` folder then YCM _will not work_
+ if you selected C-family support during YCM compilation.
+
+That's it. You're done. Refer to the User Guide section on how to use YCM. Don't
+forget that if you want the C-family semantic completion engine to work, you
+will need to provide the compilation flags for your project to YCM. It's all in
+the User Guide.
+
+YCM comes with sane defaults for its options, but you still may want to take a
+look at what's available for configuration. There are a few interesting options
+that are conservatively turned off by default that you may want to turn on.
+
+User Guide
+----------
+
+### General Usage
+
+- If the offered completions are too broad, keep typing characters; YCM will
+ continue refining the offered completions based on your input.
+- Use the TAB key to accept a completion and continue pressing TAB to cycle
+ through the completions. Use Shift-TAB to cycle backwards. Note that if you're
+ using console Vim (that is, not Gvim or MacVim) then it's likely that the
+ Shift-TAB binding will not work because the console will not pass it to Vim.
+ You can remap the keys; see the options section below.
+
+### Completion string ranking
+
+The subsequence filter removes any completions that do not match the input, but
+then the sorting system kicks in. It's actually very complicated and uses lots
+of factors, but suffice it to say that "word boundary" (WB) subsequence
+character matches are "worth" more than non-WB matches. In effect, this means
+given an input of "gua", the completion "getUserAccount" would be ranked higher
+in the list than the "Fooguxa" completion (both of which are subsequence
+matches). A word-boundary character are all capital characters, characters
+preceded by an underscore and the first letter character in the completion
+string.
+
+### General Semantic Completion Engine Usage
+
+- You can use Ctrl+Space to trigger the completion suggestions anywhere, even
+ without a string prefix. This is useful to see which top-level functions are
+ available for use.
+
+### C-family Semantic Completion Engine Usage
+
+- You _really_ also want to install the latest version of the [Syntastic][] Vim
+ plugin. It has support for YCM and together they will provide you with compile
+ errors/warnings practically instantly and without saving the file.
+
+YCM looks for a `.ycm_extra_conf.py` file in the directory of the opened file
+or in any directory above it in the hierarchy (recursively); when the file is
+found, it is loaded (only once!) as a Python module. YCM calls a `FlagsForFile`
+method in that module which should provide it with the information necessary to
+compile the current file. (You can also provide a path to a global
+`.ycm_extra_conf.py` file and override this searching behavior. See the Options
+section for more details.)
+
+This system was designed this way so that the user can perform any arbitrary
+sequence of operations to produce a list of compilation flags YCM should hand
+to Clang.
+
+[See YCM's own `.ycm_extra_conf.py`][flags_example] for details on how this
+works. You should be able to use it as a starting point. Hint: just replace the
+strings in the `flags` variable with compilation flags necessary for your
+project. That should be enough for 99% of projects.
+
+Yes, [Clang's `CompilationDatabase` system][compdb] is also supported. Again, see the
+above linked example file.
+
+If Clang encounters errors when compiling the header files that your file
+includes, then it's probably going to take a long time to get completions. When
+the completion menu finally appears, it's going to have a large number of
+unrelated completion strings (type/function names that are not actually
+members). This is because Clang fails to build a precompiled preamble for your
+file if there are any errors in the included headers and that preamble is key to
+getting fast completions.
+
+Call the `:YcmDiags` command to see if any errors or warnings were detected in
+your file. Even better, use Syntastic.
+
+### Syntastic integration
+
+YCM has explicit support for [Syntastic][] (and vice-versa) if you compiled YCM
+with Clang support; this means that any diagnostics (errors or warnings) that
+Clang encounters while compiling your file will be fed back to Syntastic for
+display.
+
+YCM will recompile your file in the background `updatetime` (see `:h updatetime`
+in Vim) milliseconds after you stop typing (to be specific, on `CursorHold` and
+`CursorHoldI` Vim events). YCM will change your `updatetime` value to be `2000`
+milliseconds (there's an option to tell it not to do this if you wish).
+
+The new diagnostics (if any) will be fed back to Syntastic the next time you
+press any key on the keyboard. So if you stop typing and just wait for the new
+diagnostics to come in, that _will not work_. You need to press some key for the
+GUI to update.
+
+Having to press a key to get the updates is unfortunate, but cannot be changed
+due to the way Vim internals operate; there is no way that a background task can
+update Vim's GUI after it has finished running. You _have to_ press a key. This
+will make YCM check for any pending diagnostics updates.
+
+You _can_ force a full, blocking compilation cycle with the
+`:YcmForceCompileAndDiagnostics` command (you may want to map that command to a
+key; try putting `nnoremap <F5> :YcmForceCompileAndDiagnostics<CR>` in your
+vimrc). Calling this command will force YCM to immediately recompile your file
+and display any new diagnostics it encounters. Do note that recompilation with
+this command may take a while and during this time the Vim GUI _will_ be
+blocked.
+
+After the errors are displayed by Syntastic, it will display a short diagnostic
+message when you move your cursor to the line with the error. You can get a
+detailed diagnostic message with the `<leader>d` key mapping (can be changed in
+the options) YCM provides when your cursor is on the line with the diagnostic.
+
+You can also see the full diagnostic message for all the diagnostics in the
+current file in Vim's `locationlist`, which can be opened with the `:lopen` and
+`:lclose` commands. A good way to toggle the display of the `locationlist` with
+a single key mapping is provided by another (very small) Vim plugin called
+[ListToggle][] (which also makes it possible to change the height of the
+`locationlist` window), also written by yours truly.
+
+### Writing New Semantic Completers
+
+You have two options here: writing an `omnifunc` for Vim's omnicomplete system
+that YCM will then use through its omni-completer, or a custom completer for YCM
+using the [Completer API][completer-api].
+
+Here are the differences between the two approaches:
+
+- You have to use VimScript to write the omnifunc, but get to use Python to
+ write for the Completer API; this by itself should make you want to use the
+ API.
+- The Completer API is a _much_ more powerful way to integrate with YCM and it
+ provides a wider set of features. For instance, you can make your Completer
+ query your semantic back-end in an asynchronous fashion, thus not blocking
+ Vim's GUI thread while your completion system is processing stuff. This is
+ impossible with VimScript. All of YCM's completers use the Completer API.
+- Performance with the Completer API is better since Python executes faster than
+ VimScript.
+
+If you want to use the `omnifunc` system, see the relevant Vim docs with `:h
+complete-functions`. For the Completer API, see [the API docs][completer-api].
+
+If you want to upstream your completer into YCM's source, you should use the
+Completer API.
+
+Commands
+--------
+
+### The `YcmForceCompileAndDiagnostics` command
+
+Calling this command will force YCM to immediately recompile your file
+and display any new diagnostics it encounters. Do note that recompilation with
+this command may take a while and during this time the Vim GUI _will_ be
+blocked.
+
+You may want to map this command to a key; try putting `nnoremap <F5>
+:YcmForceCompileAndDiagnostics<CR>` in your vimrc.
+
+### The `YcmDiags` command
+
+Calling this command will fill Vim's `locationlist` with errors or warnings if
+any were detected in your file and then open it.
+
+A better option would be to use Syntastic which will keep your `locationlist`
+up to date automatically and will also show error/warning notifications in Vim's
+gutter.
+
+### The `YcmShowDetailedDiagnostic` command
+
+This command shows the full diagnostic text when the user's cursor is on the
+line with the diagnostic.
+
+### The `YcmDebugInfo` command
+
+This will print out various debug information for the current file. Useful to
+see what compile commands will be used for the file if you're using the semantic
+completion engine.
+
+Options
+-------
+
+All options have reasonable defaults so if the plug-in works after installation
+you don't need to change any options. These options can be configured in your
+[vimrc script][vimrc] by including a line like this:
+
+ let g:ycm_min_num_of_chars_for_completion = 1
+
+Note that after changing an option in your [vimrc script] [vimrc] you have to
+restart Vim for the changes to take effect.
+
+### The `g:ycm_min_num_of_chars_for_completion` option
+
+This option controls the number of characters the user needs to type before
+completion suggestions are triggered. For example, if the option is set to `2`,
+then when the user types a second alphanumeric character after a whitespace
+character, completion suggestions will be triggered.
+
+Default: `2`
+
+ let g:ycm_min_num_of_chars_for_completion = 2
+
+### The `g:ycm_filetypes_to_completely_ignore` option
+
+This option controls for which Vim filetypes (see `:h filetype`) should YCM be
+turned off. The option value should be a Vim dictionary with keys being filetype
+strings (like `python`, `cpp` etc) and values being unimportant (the dictionary
+is used like a hash set, meaning that only the keys matter). The listed
+filetypes will be completely ignored by YCM, meaning that neither the
+identifier-based completion engine nor the semantic engine will operate in files
+of those filetypes.
+
+You can get the filetype of the current file in Vim with `:set ft?`.
+
+Default: `{notes: 1, markdown: 1, text: 1}`
+
+ let g:ycm_filetypes_to_completely_ignore = {
+ \ 'notes' : 1,
+ \ 'markdown' : 1,
+ \ 'text' : 1,
+ \}
+
+### The `g:ycm_filetype_specific_completion_to_disable` option
+
+This option controls for which Vim filetypes (see `:h filetype`) should the YCM
+semantic completion engine be turned off. The option value should be a Vim
+dictionary with keys being filetype strings (like `python`, `cpp` etc) and
+values being unimportant (the dictionary is used like a hash set, meaning that
+only the keys matter). The listed filetypes will be ignored by the YCM semantic
+completion engine, but the identifier-based completion engine will still trigger
+in files of those filetypes.
+
+Note that even if semantic completion is not turned off for a specific filetype,
+you will not get semantic completion if the semantic engine does not support
+that filetype. Currently, the semantic engine only supports the `c`, `cpp`,
+`objc` and `objcpp` filetypes.
+
+You can get the filetype of the current file in Vim with `:set ft?`.
+
+Default: `{}`
+
+ let g:ycm_filetype_specific_completion_to_disable = {}
+
+### The `g:ycm_allow_changing_updatetime` option
+
+When this option is set to `1`, YCM will change the `updatetime` Vim option to
+`2000` (see `:h updatetime`). This may conflict with some other plugins you have
+(but it's unlikely). The `updatetime` option is the number of milliseconds that
+have to pass before Vim's `CursorHold` (see `:h CursorHold`) event fires. YCM
+runs the completion engines' "file comprehension" systems in the background on
+every such event; the identifier-based engine collects the identifiers whereas
+the semantic engine compiles the file to build an AST.
+
+The Vim default of `4000` for `updatetime` is a bit long, so YCM reduces
+this. Set this option to `0` to force YCM to leave your `updatetime` setting
+alone.
+
+Default: `1`
+
+ let g:ycm_allow_changing_updatetime = 1
+
+### The `g:ycm_complete_in_comments_and_strings` option
+
+When this option is set to `1`, YCM will show the completion menu even when
+typing inside strings and comments.
+
+Default: `0`
+
+ let g:ycm_complete_in_comments_and_strings = 0
+
+### The `g:ycm_collect_identifiers_from_comments_and_strings` option
+
+When this option is set to `1`, YCM's identifier completer will also collect
+identifiers from strings and comments. Otherwise, the text in comments and
+strings will be ignored.
+
+Default: `0`
+
+ let g:ycm_collect_identifiers_from_comments_and_strings = 0
+
+### The `g:ycm_add_preview_to_completeopt` option
+
+When this option is set to `1`, YCM will add the `preview` string to Vim's
+`completeopt` option (see `:h completeopt`). If your `completeopt` option
+already has `preview` set, there will be no effect. You can see the current
+state of your `completeopt` setting with `:set completeopt?` (yes, the question
+mark is important).
+
+When `preview` is present in `completeopt`, YCM will use the `preview` window at
+the top of the file to store detailed information about the current completion
+candidate (but only if the candidate came from the semantic engine). For
+instance, it would show the full function prototype and all the function
+overloads in the window if the current completion is a function name.
+
+Default: `0`
+
+ let g:ycm_add_preview_to_completeopt = 0
+
+### The `g:ycm_autoclose_preview_window_after_completion` option
+
+When this option is set to `1`, YCM will auto-close the `preview` window after
+the user accepts the offered completion string. If there is no `preview` window
+triggered because there is no `preview` string in `completeopt`, this option is
+irrelevant. See the `g:ycm_add_preview_to_completeopt` option for more details.
+
+Default: `0`
+
+ let g:ycm_autoclose_preview_window_after_completion = 0
+
+### The `g:ycm_max_diagnostics_to_display` option
+
+This option controls the maximum number of diagnostics shown to the user when
+errors or warnings are detected in the file. This option is only relevant if you
+are using the semantic completion engine and have installed the version of the
+Syntastic plugin that supports YCM.
+
+Default: `30`
+
+ let g:ycm_max_diagnostics_to_display = 30
+
+### The `g:ycm_key_list_select_completion` option
+
+This option controls the key mappings used to select the first completion
+string. Invoking any of them repeatedly cycles forward through the completion
+list.
+
+Some users like adding `<Enter>` to this list.
+
+Default: `['<TAB>', '<Down>']`
+
+ let g:ycm_key_list_select_completion = ['<TAB>', '<Down>']
+
+### The `g:ycm_key_list_previous_completion` option
+
+This option controls the key mappings used to select the previous completion
+string. Invoking any of them repeatedly cycles backwards through the completion
+list.
+
+Note that one of the defaults is `<S-TAB>` which means Shift-TAB. That mapping
+will probably only work in GUI Vim (Gvim or MacVim) and not in plain console Vim
+because the terminal usually does not forward modifier key combinations to Vim.
+
+Default: `['<S-TAB>', '<Up>']`
+
+ let g:ycm_key_list_previous_completion = ['<S-TAB>', '<Up>']
+
+### The `g:ycm_key_invoke_completion` option
+
+This option controls the key mapping used to invoke the completion menu for
+semantic completion. By default, semantic completion is trigged automatically
+after typing `.`, `->` and `::` in insert mode (if semantic completion support
+has been compiled in). This key mapping can be used to trigger semantic
+completion anywhere. Useful for searching for top-level functions and classes.
+
+Note that the default of `<C-Space>` means Ctrl-Space. Also note that the
+default mapping will probably only work in GUI Vim (Gvim or MacVim) and not in
+plain console Vim because the terminal usually does not forward modifier key
+combinations to Vim.
+
+Setting this option to an empty string will make sure no mapping is created.
+
+Default: `<C-Space>`
+
+ let g:ycm_key_invoke_completion = '<C-Space>'
+
+### The `g:ycm_key_detailed_diagnostics` option
+
+This option controls the key mapping used to show the full diagnostic text when
+the user's cursor is on the line with the diagnostic. It basically calls
+`:YcmShowDetailedDiagnostic`.
+
+Setting this option to an empty string will make sure no mapping is created.
+
+Default: `<leader>d`
+
+ let g:ycm_key_detailed_diagnostics = '<leader>d'
+
+### The `g:ycm_global_ycm_extra_conf` option
+
+Normally, YCM searches for a `.ycm_extra_conf.py` file for compilation flags
+(see the User Guide for more details on how this works). You can use this option
+to override this searching behavior by providing a full, absolute path to a
+global `.ycm_extra_conf.py` file (although you can call the global file whatever
+you want).
+
+You can place such a global file anywhere in your filesystem.
+
+Default: `''`
+
+ let g:ycm_global_ycm_extra_conf = ''
+
+### The `g:ycm_semantic_triggers` option
+
+This option controls the character-based triggers for the various semantic
+completion engines. The option holds a dictionary of key-values, where the keys
+are Vim's filetype strings delimited by commas and values are lists of strings,
+where the strings are the triggers.
+
+A "trigger" is a sequence of one or more characters that trigger semantic
+completion when typed. For instance, C++ (`cpp` filetype) has `.` listed as a
+trigger. So when the user types `foo.`, the semantic engine will trigger and
+serve `foo`'s list of member functions and variables. Since C++ also has `->`
+listed as a trigger, the same thing would happen when the user typed `foo->`.
+
+Default: `[see next line]`
+
+ let g:ycm_semantic_triggers = {
+ \ 'c' : ['->', '.'],
+ \ 'objc' : ['->', '.'],
+ \ 'cpp,objcpp' : ['->', '.', '::'],
+ \ 'perl,php' : ['->'],
+ \ 'cs,java,javascript,d,vim,ruby,python,perl6,scala,vb,elixir' : ['.'],
+ \ 'lua' : ['.', ':'],
+ \ 'erlang' : [':'],
+ }
+
+FAQ
+---
+
+### I get a linker warning regarding `libpython` on Mac when compiling YCM
+
+If the warning is `ld: warning: path '/usr/lib/libpython2.7.dylib' following -L
+not a directory`, then feel free to ignore it; it's caused by a limitation of
+CMake and is not an issue. Everything should still work fine.
+
+### I get a weird window at the top of my file when I use the semantic engine
+
+This is Vim's `preview` window. Vim uses it to show you extra information about
+something if such information is available. YCM provides Vim with such extra
+information. For instance, when you select a function in the completion list,
+the `preview` window will hold that function's prototype and the prototypes of
+any overloads of the function. It will stay there after you select the
+completion so that you can use the information about the parameters and their
+types to write the function call.
+
+If you would like this window to auto-close after you select a completion
+string, set the `g:ycm_autoclose_preview_window_after_completion` option to `1`
+in your `vimrc` file.
+
+If you don't want this window to ever show up, add `set completeopt-=preview` to
+your `vimrc`. Also make sure that the `g:ycm_add_preview_to_completeopt` option
+is set to `0`.
+
+### It appears that YCM is not working
+
+In Vim, run `:messages` and carefully read the output. YCM will echo messages to
+the message log if it encounters problems. It's likely you misconfigured
+something and YCM is complaining about it.
+
+Also, you may want to run the `:YcmDebugInfo` command; it will make YCM spew out
+various debugging information, including the compile flags for the file if the
+file is a C-family language file and you have compiled in Clang support.
+
+### I cannot get the Syntastic integration to work
+
+Try to update your version of Syntastic. At the time of writing (Jan 2013), the
+YCM integration is very recent and it's likely that your version of Syntastic
+does not have it.
+
+### Sometimes it takes much longer to get semantic completions than normal
+
+This means that libclang (which YCM uses for C-family semantic completion)
+failed to pre-compile your file's preamble. In other words, there was an error
+compiling some of the source code you pulled in through your header files. I
+suggest calling the `:YcmDiags` command to see what they were (even better, have
+Syntastic installed and call `:lopen`).
+
+Bottom line, if libclang can't pre-compile your file's preamble because there
+were errors in it, you're going to get slow completions because there's no AST
+cache.
+
+### YCM auto-inserts completion strings I don't want!
+
+This means you probably have some mappings that interfere with YCM's internal
+ones. Make sure you don't have something mapped to `<C-p>`, `<C-x>` or `<C-u>`
+(in insert mode).
+
+YCM _never_ selects something for you; it just shows you a menu and the user has
+to explicitly select something. If something is being selected automatically,
+this means there's a bug or a misconfiguration somewhere.
+
+### I get a `E227: mapping already exists for <blah>` error when I start Vim
+
+This means that YCM tried to set up a key mapping but failed because you already
+had something mapped to that key combination. The `<blah>` part of the message
+will tell you what was the key combination that failed.
+
+Look in the options section and see if which of the default mappings conflict
+with your own. Then change that option value to something else so that the
+conflict goes away.
+
+### I'm trying to use a Homebrew Vim with YCM and I'm getting segfaults
+
+Something (I don't know what) is wrong with the way that Homebrew configures and
+builds Vim. I recommend using [MacVim][]. Even if you don't like the MacVim GUI,
+you can use the Vim binary that is inside the MacVim.app package (it's
+`MacVim.app/Contents/MacOS/Vim`) and get the Vim console experience.
+
+### I have a Homebrew Python and/or MacVim; can't compile/SIGABRT when starting
+
+You should probably run `brew rm python; brew install python` to get the latest
+fixes that should make YCM work with such a configuration. Also rebuild Macvim
+then. If you still get problems with this, see [issue #18][issue18] for
+suggestions.
+
+### I get `LONG_BIT definition appears wrong for platform` when compiling
+
+Look at the output of your CMake call. There should be a line in it like the
+following (with `.dylib` in place of `.so` on a Mac):
+
+```
+-- Found PythonLibs: /usr/lib/libpython2.7.so (Required is at least version "2.5")
+```
+
+That would be the **correct** output. An example of **incorrect** output would
+be the following:
+
+```
+-- Found PythonLibs: /usr/lib/libpython2.7.so (found suitable version "2.5.1", minimum required is "2.5")
+```
+
+Notice how there's an extra bit of output there, the `found suitable version
+"<version>"` part, where `<version>` is not the same as the version of the
+dynamic library. In the example shown, the library is version 2.7 but the second
+string is version `2.5.1`.
+
+This means that CMake found one version of Python headers and a different
+version for the library. This is wrong. It can happen when you have multiple
+versions of Python installed on your machine.
+
+You should probably add the following flags to your cmake call (again, `dylib`
+instead of `so` on a Mac):
+
+```
+-DPYTHON_INCLUDE_DIR=/usr/include/python2.7 -DPYTHON_LIBRARY=/usr/lib/libpython2.7.so
+```
+
+This will force the paths to the Python include directory and the Python library
+to use. You may need to set these flags to something else, but you need to make
+sure you use the same version of Python that your Vim binary is built against,
+which is highly likely to be the system's default Python.
+
+### Why isn't YCM just written in plain VimScript, FFS?
+
+Because of the identifier completion engine and subsequence-based filtering.
+Let's say you have _many_ dozens of files open in a single Vim instance (I often
+do); the identifier-based engine then needs to store thousands (if not tens of
+thousands) of identifiers in its internal data-structures. When the user types,
+YCM needs to perform subsequence-based filtering on _all_ of those identifiers
+(every single one!) in less than 10 milliseconds.
+
+I'm sorry, but that level of performance is just plain impossible to achieve
+with VimScript. I've tried, and the language is just too slow. No, you can't get
+acceptable performance even if you limit yourself to just the identifiers in the
+current file and simple prefix-based fitering.
+
+### Why does YCM demand such a recent version of Vim?
+
+During YCM's development several show-stopper bugs where encountered in Vim.
+Those needed to be fixed upstream (and were). A few months after those bugs were
+fixed, Vim trunk landed the `pyeval()` function which improved YCM performance
+even more since less time was spent serializing and deserializing data between
+Vim and the embedded Python interpreter. A few critical bugfixes for `pyeval()`
+landed in Vim 7.3.584 (and a few commits before that).
+
+### I get annoying messages in Vim's status area when I type
+
+If you're referring to the `User defined completion <bla bla> back at original`
+and similar, then sadly there's no fix for those. Vim will emit them no matter
+how hard I try to silence them.
+
+You'll have to learn to ignore them. It's a shitty "solution", I know.
+
+### Nasty bugs happen if I have the `vim-autoclose` plugin installed
+
+Use the [delimitMate][] plugin instead. It does the same thing without
+conflicting with YCM.
+
+
+Contact
+-------
+
+If you have questions, bug reports, suggestions, etc. please use the [issue
+tracker][tracker]. The latest version is available at
+<http://valloric.github.com/YouCompleteMe/>.
+
+The author's homepage is <http://val.markovic.io>.
+
+License
+-------
+
+This software is licensed under the [GPL v3 license][gpl].
+© 2012 Strahinja Val Markovic &lt;<val@markovic.io>&gt;.
+
+
+[Clang]: http://clang.llvm.org/
+[vundle]: https://github.com/gmarik/vundle#about
+[pathogen]: https://github.com/tpope/vim-pathogen#pathogenvim
+[clang-download]: http://llvm.org/releases/download.html#3.2
+[brew]: http://mxcl.github.com/homebrew/
+[cmake-download]: http://www.cmake.org/cmake/resources/software.html
+[macvim]: http://code.google.com/p/macvim/#Download
+[vimrc]: http://vimhelp.appspot.com/starting.txt.html#vimrc
+[gpl]: http://www.gnu.org/copyleft/gpl.html
+[vim]: http://www.vim.org/
+[syntastic]: https://github.com/scrooloose/syntastic
+[flags_example]: https://github.com/Valloric/YouCompleteMe/blob/master/cpp/ycm/.ycm_extra_conf.py
+[compdb]: http://clang.llvm.org/docs/JSONCompilationDatabase.html
+[subsequence]: http://en.wikipedia.org/wiki/Subsequence
+[listtoggle]: https://github.com/Valloric/ListToggle
+[vim-build]: https://github.com/Valloric/YouCompleteMe/wiki/Building-Vim-from-source
+[tracker]: https://github.com/Valloric/YouCompleteMe/issues?state=open
+[issue18]: https://github.com/Valloric/YouCompleteMe/issues/18
+[delimitMate]: https://github.com/Raimondi/delimitMate
+[completer-api]: https://github.com/Valloric/YouCompleteMe/blob/master/python/completers/completer.py
View
547 vim/bundle/YouCompleteMe/autoload/youcompleteme.vim
@@ -0,0 +1,547 @@
+" Copyright (C) 2011, 2012 Strahinja Val Markovic <val@markovic.io>
+"
+" This file is part of YouCompleteMe.
+"
+" YouCompleteMe is free software: you can redistribute it and/or modify
+" it under the terms of the GNU General Public License as published by
+" the Free Software Foundation, either version 3 of the License, or
+" (at your option) any later version.
+"
+" YouCompleteMe is distributed in the hope that it will be useful,
+" but WITHOUT ANY WARRANTY; without even the implied warranty of
+" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+" GNU General Public License for more details.
+"
+" You should have received a copy of the GNU General Public License
+" along with YouCompleteMe. If not, see <http://www.gnu.org/licenses/>.
+
+" This is basic vim plugin boilerplate
+let s:save_cpo = &cpo
+set cpo&vim
+
+" This needs to be called outside of a function
+let s:script_folder_path = escape( expand( '<sfile>:p:h' ), '\' )
+let s:searched_and_results_found = 0
+let s:should_use_filetype_completion = 0
+let s:completion_start_column = 0
+let s:omnifunc_mode = 0
+
+let s:old_cursor_position = []
+let s:cursor_moved = 0
+let s:moved_vertically_in_insert_mode = 0
+let s:previous_num_chars_on_current_line = -1
+
+function! youcompleteme#Enable()
+ " When vim is in diff mode, don't run
+ if &diff
+ return
+ endif
+
+ py import sys
+ py import vim
+ exe 'python sys.path.insert( 0, "' . s:script_folder_path . '/../python" )'
+ py import ycm
+
+ if !pyeval( 'ycm.CompatibleWithYcmCore()')
+ echohl WarningMsg |
+ \ echomsg "YouCompleteMe unavailable, ycm_core too old, PLEASE RECOMPILE" |
+ \ echohl None
+ return
+ endif
+
+ py ycm_state = ycm.YouCompleteMe()
+
+ augroup youcompleteme
+ autocmd!
+ autocmd CursorMovedI * call s:OnCursorMovedInsertMode()
+ autocmd CursorMoved * call s:OnCursorMovedNormalMode()
+ " Note that these events will NOT trigger for the file vim is started with;
+ " so if you do "vim foo.cc", these events will not trigger when that buffer
+ " is read. This is because youcompleteme#Enable() is called on VimEnter and
+ " that happens *after" BufRead/BufEnter has already triggered for the
+ " initial file.
+ autocmd BufRead,BufEnter * call s:OnBufferVisit()
+ autocmd CursorHold,CursorHoldI * call s:OnCursorHold()
+ autocmd InsertLeave * call s:OnInsertLeave()
+ autocmd InsertEnter * call s:OnInsertEnter()
+ augroup END
+
+ call s:SetUpCompleteopt()
+ call s:SetUpKeyMappings()
+ call s:ForceSyntasticCFamilyChecker()
+
+ if g:ycm_allow_changing_updatetime
+ set ut=2000
+ endif
+
+ " Calling this once solves the problem of BufRead/BufEnter not triggering for
+ " the first loaded file. This should be the last command executed in this
+ " function!
+ call s:OnBufferVisit()
+endfunction
+
+
+function! s:SetUpKeyMappings()
+ " The g:ycm_key_select_completion and g:ycm_key_previous_completion used to
+ " exist and are now here purely for the sake of backwards compatibility; we
+ " don't want to break users if we can avoid it.
+
+ if exists('g:ycm_key_select_completion') &&
+ \ index(g:ycm_key_list_select_completion,
+ \ g:ycm_key_select_completion) == -1
+ call add(g:ycm_key_list_select_completion, g:ycm_key_select_completion)
+ endif
+
+ if exists('g:ycm_key_previous_completion') &&
+ \ index(g:ycm_key_list_previous_completion,
+ \ g:ycm_key_previous_completion) == -1
+ call add(g:ycm_key_list_previous_completion, g:ycm_key_previous_completion)
+ endif
+
+ for key in g:ycm_key_list_select_completion
+ " With this command, when the completion window is visible, the tab key
+ " (default) will select the next candidate in the window. In vim, this also
+ " changes the typed-in text to that of the candidate completion.
+ exe 'inoremap <expr>' . key .
+ \ ' pumvisible() ? "\<C-n>" : "\' . key .'"'
+ endfor
+
+
+ for key in g:ycm_key_list_previous_completion
+ " This selects the previous candidate for shift-tab (default)
+ exe 'inoremap <expr>' . key .
+ \ ' pumvisible() ? "\<C-p>" : "\' . key .'"'
+ endfor
+
+ if strlen(g:ycm_key_invoke_completion)
+ " <c-x><c-o> trigger omni completion, <c-p> deselects the first completion
+ " candidate that vim selects by default
+ exe 'inoremap <unique> ' . g:ycm_key_invoke_completion . ' <C-X><C-O><C-P>'
+ endif
+
+ if strlen(g:ycm_key_detailed_diagnostics)
+ exe 'nnoremap <unique> ' . g:ycm_key_detailed_diagnostics .
+ \ ' :YcmShowDetailedDiagnostic<cr>'
+ endif
+endfunction
+
+
+function! s:ForceSyntasticCFamilyChecker()
+ " Needed so that YCM is used as the syntastic checker
+ let g:syntastic_cpp_checkers = ['ycm']
+ let g:syntastic_c_checkers = ['ycm']
+ let g:syntastic_objc_checkers = ['ycm']
+ let g:syntastic_objcpp_checkers = ['ycm']
+endfunction
+
+
+function! s:AllowedToCompleteInCurrentFile()
+ " If the user set the current filetype as a filetype that YCM should ignore,
+ " then we don't do anything
+ return !get( g:ycm_filetypes_to_completely_ignore, &filetype, 0 )
+endfunction
+
+
+function! s:SetUpCompleteopt()
+ " Some plugins (I'm looking at you, vim-notes) change completeopt by for
+ " instance adding 'longest'. This breaks YCM. So we force our settings.
+ " There's no two ways about this: if you want to use YCM then you have to
+ " have these completeopt settings, otherwise YCM won't work at all.
+
+ " We need menuone in completeopt, otherwise when there's only one candidate
+ " for completion, the menu doesn't show up.
+ set completeopt-=menu
+ set completeopt+=menuone
+
+ " This is unnecessary with our features. People use this option to insert
+ " the common prefix of all the matches and then add more differentiating chars
+ " so that they can select a more specific match. With our features, they
+ " don't need to insert the prefix; they just type the differentiating chars.
+ " Also, having this option set breaks the plugin.
+ set completeopt-=longest
+
+ if g:ycm_add_preview_to_completeopt
+ set completeopt+=preview
+ endif
+endfunction
+
+
+function! s:OnBufferVisit()
+ if !s:AllowedToCompleteInCurrentFile()
+ return
+ endif
+
+ call s:SetUpCompleteopt()
+ call s:SetCompleteFunc()
+ call s:OnFileReadyToParse()
+endfunction
+
+
+function! s:OnCursorHold()
+ if !s:AllowedToCompleteInCurrentFile()
+ return
+ endif
+
+ call s:SetUpCompleteopt()
+ " Order is important here; we need to extract any done diagnostics before
+ " reparsing the file again
+ call s:UpdateDiagnosticNotifications()
+ call s:OnFileReadyToParse()
+endfunction
+
+
+function! s:OnFileReadyToParse()
+ py ycm_state.OnFileReadyToParse()
+endfunction
+
+
+function! s:SetCompleteFunc()
+ let &completefunc = 'youcompleteme#Complete'
+ let &l:completefunc = 'youcompleteme#Complete'
+
+ if pyeval( 'ycm_state.NativeFiletypeCompletionUsable()' )
+ let &omnifunc = 'youcompleteme#OmniComplete'
+ let &l:omnifunc = 'youcompleteme#OmniComplete'
+
+ " If we don't have native filetype support but the omnifunc is set to YCM's
+ " omnifunc because the previous file the user was editing DID have native
+ " support, we remove our omnifunc.
+ elseif &omnifunc == 'youcompleteme#OmniComplete'
+ let &omnifunc = ''
+ let &l:omnifunc = ''
+ endif
+endfunction
+
+
+function! s:OnCursorMovedInsertMode()
+ if !s:AllowedToCompleteInCurrentFile()
+ return
+ endif
+
+ call s:UpdateCursorMoved()
+
+ " Basically, we need to only trigger the completion menu when the user has
+ " inserted or deleted a character, NOT just when the user moves in insert mode
+ " (with, say, the arrow keys). If we trigger the menu even on pure moves, then
+ " it's impossible to move in insert mode since the up/down arrows start moving
+ " the selected completion in the completion menu. Yeah, people shouldn't be
+ " moving in insert mode at all (that's what normal mode is for) but explain
+ " that to the users who complain...
+ if !s:BufferTextChangedSinceLastMoveInInsertMode()
+ return
+ endif
+
+ call s:IdentifierFinishedOperations()
+ call s:ClosePreviewWindowIfNeeded()
+ call s:InvokeCompletion()
+endfunction
+
+
+function! s:OnCursorMovedNormalMode()
+ if !s:AllowedToCompleteInCurrentFile()
+ return
+ endif
+
+ call s:UpdateDiagnosticNotifications()
+endfunction
+
+
+function! s:OnInsertLeave()
+ if !s:AllowedToCompleteInCurrentFile()
+ return
+ endif
+
+ let s:omnifunc_mode = 0
+ call s:UpdateDiagnosticNotifications()
+ py ycm_state.OnInsertLeave()
+ call s:ClosePreviewWindowIfNeeded()
+endfunction
+
+
+function! s:OnInsertEnter()
+ if !s:AllowedToCompleteInCurrentFile()
+ return
+ endif
+
+ let s:old_cursor_position = []
+endfunction
+
+
+function! s:UpdateCursorMoved()
+ let current_position = getpos('.')
+ let s:cursor_moved = current_position != s:old_cursor_position
+
+ let s:moved_vertically_in_insert_mode = s:old_cursor_position != [] &&
+ \ current_position[ 1 ] != s:old_cursor_position[ 1 ]
+
+ let s:old_cursor_position = current_position
+endfunction
+
+
+function! s:BufferTextChangedSinceLastMoveInInsertMode()
+ if s:moved_vertically_in_insert_mode
+ let s:previous_num_chars_on_current_line = -1
+ return 0
+ endif
+
+ let num_chars_in_current_cursor_line = strlen( getline('.') )
+
+ if s:previous_num_chars_on_current_line == -1
+ let s:previous_num_chars_on_current_line = num_chars_in_current_cursor_line
+ return 0
+ endif
+
+ let changed_text_on_current_line = num_chars_in_current_cursor_line !=
+ \ s:previous_num_chars_on_current_line
+ let s:previous_num_chars_on_current_line = num_chars_in_current_cursor_line
+
+ return changed_text_on_current_line
+endfunction
+
+
+function! s:ClosePreviewWindowIfNeeded()
+ if !g:ycm_autoclose_preview_window_after_completion
+ return
+ endif
+
+ if s:searched_and_results_found
+ " This command does the actual closing of the preview window. If no preview
+ " window is shown, nothing happens.
+ pclose
+ endif
+endfunction
+
+
+function! s:UpdateDiagnosticNotifications()
+ if get( g:, 'loaded_syntastic_plugin', 0 ) &&
+ \ pyeval( 'ycm_state.NativeFiletypeCompletionUsable()' ) &&
+ \ pyeval( 'ycm_state.DiagnosticsForCurrentFileReady()' )
+ SyntasticCheck
+ endif
+endfunction
+
+
+function! s:IdentifierFinishedOperations()
+ if !pyeval( 'ycm.CurrentIdentifierFinished()' )
+ return
+ endif
+ py ycm_state.OnCurrentIdentifierFinished()
+ let s:omnifunc_mode = 0
+endfunction
+
+
+function! s:InsideCommentOrString()
+ if g:ycm_complete_in_comments_and_strings
+ return 0
+ endif
+
+ " Has to be col('.') -1 because col('.') doesn't exist at this point. We are
+ " in insert mode when this func is called.
+ let syntax_group = synIDattr( synIDtrans( synID( line( '.' ), col( '.' ) - 1, 1 ) ), 'name')
+ if stridx(syntax_group, 'Comment') > -1 || stridx(syntax_group, 'String') > -1
+ return 1
+ endif
+ return 0
+endfunction
+
+
+function! s:OnBlankLine()
+ return pyeval( 'not vim.current.line or vim.current.line.isspace()' )
+endfunction
+
+
+function! s:InvokeCompletion()
+ if &completefunc != "youcompleteme#Complete"
+ return
+ endif
+
+ if s:InsideCommentOrString() || s:OnBlankLine()
+ return
+ endif
+
+ " This is tricky. First, having 'refresh' set to 'always' in the dictionary
+ " that our completion function returns makes sure that our completion function
+ " is called on every keystroke. Second, when the sequence of characters the
+ " user typed produces no results in our search an infinite loop can occur. The
+ " problem is that our feedkeys call triggers the OnCursorMovedI event which we
+ " are tied to. We prevent this infinite loop from starting by making sure that
+ " the user has moved the cursor since the last time we provided completion
+ " results.
+ if !s:cursor_moved
+ return
+ endif
+
+ " <c-x><c-u> invokes the user's completion function (which we have set to
+ " youcompleteme#Complete), and <c-p> tells Vim to select the previous
+ " completion candidate. This is necessary because by default, Vim selects the
+ " first candidate when completion is invoked, and selecting a candidate
+ " automatically replaces the current text with it. Calling <c-p> forces Vim to
+ " deselect the first candidate and in turn preserve the user's current text
+ " until he explicitly chooses to replace it with a completion.
+ call feedkeys( "\<C-X>\<C-U>\<C-P>", 'n' )
+endfunction
+
+
+function! s:CompletionsForQuery( query, use_filetype_completer )
+ if a:use_filetype_completer
+ py completer = ycm_state.GetFiletypeCompleter()
+ else
+ py completer = ycm_state.GetIdentifierCompleter()
+ endif
+
+ " TODO: don't trigger on a dot inside a string constant
+ py completer.CandidatesForQueryAsync( vim.eval( 'a:query' ) )
+
+ let l:results_ready = 0
+ while !l:results_ready
+ let l:results_ready = pyeval( 'completer.AsyncCandidateRequestReady()' )
+ if complete_check()
+ let s:searched_and_results_found = 0
+ return { 'words' : [], 'refresh' : 'always'}
+ endif
+ endwhile
+
+ let l:results = pyeval( 'completer.CandidatesFromStoredRequest()' )
+ let s:searched_and_results_found = len( l:results ) != 0
+ return { 'words' : l:results, 'refresh' : 'always' }
+endfunction
+
+
+" This is our main entry point. This is what vim calls to get completions.
+function! youcompleteme#Complete( findstart, base )
+ " After the user types one character after the call to the omnifunc, the
+ " completefunc will be called because of our mapping that calls the
+ " completefunc on every keystroke. Therefore we need to delegate the call we
+ " 'stole' back to the omnifunc
+ if s:omnifunc_mode
+ return youcompleteme#OmniComplete( a:findstart, a:base )
+ endif
+
+ if a:findstart
+ " InvokeCompletion has this check but we also need it here because of random
+ " Vim bugs and unfortunate interactions with the autocommands of other
+ " plugins
+ if !s:cursor_moved
+ " for vim, -2 means not found but don't trigger an error message
+ " see :h complete-functions
+ return -2
+ endif
+
+
+ " TODO: make this a function-local variable instead of a script-local one
+ let s:completion_start_column = pyeval( 'ycm.CompletionStartColumn()' )
+ let s:should_use_filetype_completion =
+ \ pyeval( 'ycm_state.ShouldUseFiletypeCompleter(' .
+ \ s:completion_start_column . ')' )
+
+ if !s:should_use_filetype_completion &&
+ \ !pyeval( 'ycm_state.ShouldUseIdentifierCompleter(' .
+ \ s:completion_start_column . ')' )
+ " for vim, -2 means not found but don't trigger an error message
+ " see :h complete-functions
+ return -2
+ endif
+ return s:completion_start_column
+ else
+ return s:CompletionsForQuery( a:base, s:should_use_filetype_completion )
+ endif
+endfunction
+
+
+function! youcompleteme#OmniComplete( findstart, base )
+ if a:findstart
+ let s:omnifunc_mode = 1
+ let s:completion_start_column = pyeval( 'ycm.CompletionStartColumn()' )
+ return s:completion_start_column
+ else
+ return s:CompletionsForQuery( a:base, 1 )
+ endif
+endfunction
+
+
+function! s:ShowDetailedDiagnostic()
+ py ycm_state.ShowDetailedDiagnostic()
+endfunction
+
+command! YcmShowDetailedDiagnostic call s:ShowDetailedDiagnostic()
+
+
+" This is what Syntastic calls indirectly when it decides an auto-check is
+" required (currently that's on buffer save) OR when the SyntasticCheck command
+" is invoked
+function! youcompleteme#CurrentFileDiagnostics()
+ return pyeval( 'ycm_state.GetDiagnosticsForCurrentFile()' )
+endfunction
+
+
+function! s:DebugInfo()
+ echom "Printing YouCompleteMe debug information..."
+ let debug_info = pyeval( 'ycm_state.DebugInfo()' )
+ for line in split( debug_info, "\n" )
+ echom '-- ' . line
+ endfor
+endfunction
+
+command! YcmDebugInfo call s:DebugInfo()
+
+
+function! s:ForceCompile()
+ if !pyeval( 'ycm_state.NativeFiletypeCompletionUsable()' )
+ echom "Native filetype completion not supported for current file, "
+ \ . "cannot force recompilation."
+ return 0
+ endif
+
+ echom "Forcing compilation, this will block Vim until done."
+ py ycm_state.OnFileReadyToParse()
+ while 1
+ let diagnostics_ready = pyeval(
+ \ 'ycm_state.DiagnosticsForCurrentFileReady()' )
+ if diagnostics_ready
+ break
+ endif
+
+ let getting_completions = pyeval(
+ \ 'ycm_state.GettingCompletions()' )
+
+ if !getting_completions
+ echom "Unable to retrieve diagnostics."
+ return 0
+ endif
+
+ sleep 100m
+ endwhile
+ return 1
+endfunction
+
+
+function! s:ForceCompileAndDiagnostics()
+ let compilation_succeeded = s:ForceCompile()
+ if !compilation_succeeded
+ return
+ endif
+
+ call s:UpdateDiagnosticNotifications()
+ echom "Diagnostics refreshed."
+endfunction
+
+command! YcmForceCompileAndDiagnostics call s:ForceCompileAndDiagnostics()
+
+
+function! s:ShowDiagnostics()
+ call s:ForceCompile()
+ let diags = pyeval( 'ycm_state.GetDiagnosticsForCurrentFile()' )
+ if !empty( diags )
+ call setloclist( 0, diags )
+ lopen
+ else
+ echom "No warnings or errors detected"
+ endif
+endfunction
+
+command! YcmDiags call s:ShowDiagnostics()
+
+
+" This is basic vim plugin boilerplate
+let &cpo = s:save_cpo
+unlet s:save_cpo
View
119 vim/bundle/YouCompleteMe/cpp/BoostParts/CMakeLists.txt
@@ -0,0 +1,119 @@
+# Copyright (C) 2011, 2012 Strahinja Val Markovic <val@markovic.io>
+#
+# This file is part of YouCompleteMe.
+#
+# YouCompleteMe is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# YouCompleteMe is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with YouCompleteMe. If not, see <http://www.gnu.org/licenses/>.
+
+# The interesting parts of Boost have been extracted using
+# the BCP tool:
+# http://www.boost.org/doc/libs/1_52_0/tools/bcp/doc/html/index.html
+#
+# bcp call: bcp boost/utility.hpp boost/python.hpp boost/bind.hpp boost/lambda/lambda.hpp boost/exception/all.hpp boost/tuple/tuple_io.hpp boost/tuple/tuple_comparison.hpp boost/regex.hpp boost/foreach.hpp boost/smart_ptr.hpp boost/algorithm/string_regex.hpp boost/thread.hpp boost/unordered_map.hpp boost/unordered_set.hpp boost/format.hpp boost/ptr_container/ptr_container.hpp boost/filesystem.hpp boost/filesystem/fstream.hpp boost/utility.hpp ../BoostParts
+
+# WARNING: When doing this from fresh boost sources, note that in the file
+# /boost/config/user.hpp the BOOST_ALL_NO_LIB define has been uncommented.
+# Otherwise, we will get linker errors on MSVC because of boost auto-linking. If
+# you don't care about Windows then feel free to use the raw boost version of
+# /boost/config/user.hpp
+
+cmake_minimum_required( VERSION 2.8 )
+
+project( BoostParts )
+
+set( Python_ADDITIONAL_VERSIONS 2.7 2.6 2.5 )
+find_package( PythonLibs 2.5 REQUIRED )
+
+if ( NOT PYTHONLIBS_VERSION_STRING VERSION_LESS "3.0.0" )
+ message( FATAL_ERROR
+ "CMake found python3 libs instead of python2 libs. YCM works only with "
+ "python2.\n" )
+endif()
+
+file( GLOB_RECURSE SOURCES *.cpp )
+
+# We need to remove all the thread cpp files and then add them on a per-platform
+# basis
+file( GLOB_RECURSE to_remove libs/thread/*.cpp libs/detail/*.cpp )
+
+if( to_remove )
+ list( REMOVE_ITEM SOURCES ${to_remove} )
+endif()
+
+set( COMMON_SOURCES
+ libs/thread/src/future.cpp
+ )
+
+set( WIN_SOURCES
+ libs/thread/src/win32/thread.cpp
+ libs/thread/src/win32/timeconv.inl
+ libs/thread/src/win32/tss_dll.cpp
+ libs/thread/src/win32/tss_pe.cpp
+ )
+
+set( UNIX_SOURCES
+ libs/thread/src/pthread/once.cpp
+ libs/thread/src/pthread/thread.cpp
+ libs/thread/src/pthread/timeconv.inl
+ )
+
+list( APPEND SOURCES ${COMMON_SOURCES} )
+
+if ( WIN32 )
+ list( APPEND SOURCES ${WIN_SOURCES} )
+else()
+ list( APPEND SOURCES ${UNIX_SOURCES} )
+endif()
+
+#############################################################################
+
+if( MSVC )
+ # BOOST_PYTHON_SOURCE makes boost use the correct __declspec and
+ # BOOST_ALL_NO_LIB turns off MSVC library autolinking
+ add_definitions( -DBOOST_PYTHON_SOURCE -DBOOST_ALL_NO_LIB )
+endif()
+
+#############################################################################
+
+include_directories(
+ SYSTEM
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${PYTHON_INCLUDE_DIRS}
+ )
+
+add_library( BoostParts ${SOURCES} )
+
+#############################################################################
+
+if( CMAKE_COMPILER_IS_GNUCXX OR COMPILER_IS_CLANG )
+ # No warnings. We just use Boost as is so warnings coming from it are just
+ # noise.
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -w")
+endif()
+
+#############################################################################
+
+# Linking fails without this
+if( NOT WIN32 AND CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" )
+ set_target_properties( BoostParts PROPERTIES COMPILE_FLAGS "-fPIC")
+endif()
+
+#############################################################################
+
+# Special compiler and linker flags for MSVC
+if( MSVC )
+ add_definitions( /DUNICODE /D_UNICODE /Zc:wchar_t- )
+ set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP" )
+ set( CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Oi /GL" )
+ set_target_properties( ${PROJECT_NAME} PROPERTIES STATIC_LIBRARY_FLAGS "/LTCG" )
+endif()
View
31 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/algorithm/string.hpp
@@ -0,0 +1,31 @@
+// Boost string_algo library string_algo.hpp header file ---------------------------//
+
+// Copyright Pavol Droba 2002-2004.
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/ for updates, documentation, and revision history.
+
+#ifndef BOOST_STRING_ALGO_HPP
+#define BOOST_STRING_ALGO_HPP
+
+/*! \file
+ Cumulative include for string_algo library
+*/
+
+#include <boost/algorithm/string/std_containers_traits.hpp>
+#include <boost/algorithm/string/trim.hpp>
+#include <boost/algorithm/string/case_conv.hpp>
+#include <boost/algorithm/string/predicate.hpp>
+#include <boost/algorithm/string/find.hpp>
+#include <boost/algorithm/string/split.hpp>
+#include <boost/algorithm/string/join.hpp>
+#include <boost/algorithm/string/replace.hpp>
+#include <boost/algorithm/string/erase.hpp>
+#include <boost/algorithm/string/classification.hpp>
+#include <boost/algorithm/string/find_iterator.hpp>
+
+
+#endif // BOOST_STRING_ALGO_HPP
View
176 vim/bundle/YouCompleteMe/cpp/BoostParts/boost/algorithm/string/case_conv.hpp
@@ -0,0 +1,176 @@
+// Boost string_algo library case_conv.hpp header file ---------------------------//
+
+// Copyright Pavol Droba 2002-2003.
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/ for updates, documentation, and revision history.
+
+#ifndef BOOST_STRING_CASE_CONV_HPP
+#define BOOST_STRING_CASE_CONV_HPP
+
+#include <boost/algorithm/string/config.hpp>
+#include <algorithm>
+#include <locale>
+#include <boost/iterator/transform_iterator.hpp>
+
+#include <boost/range/as_literal.hpp>
+#include <boost/range/begin.hpp>